summaryrefslogtreecommitdiff
path: root/src/gpgpu-sim/gpu-cache.cc
diff options
context:
space:
mode:
authorWilson Fung <[email protected]>2013-04-11 05:17:09 -0800
committerAndrew Boktor <[email protected]>2014-08-14 13:50:46 -0700
commit918b3ef50790f0ae7c8c079754f7332933572d5b (patch)
tree161654598f0190244978e330173b3828a42a3f2d /src/gpgpu-sim/gpu-cache.cc
parent3164bfc1910cf17e7dd4033cd07ac264f656336f (diff)
Replaced the legacy L2 cache access stats with more meaningful breakdown that categorize access by their access type (global memory read/write, local memory read/write, instruction read, ... etc.).
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 15784]
Diffstat (limited to 'src/gpgpu-sim/gpu-cache.cc')
-rw-r--r--src/gpgpu-sim/gpu-cache.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gpgpu-sim/gpu-cache.cc b/src/gpgpu-sim/gpu-cache.cc
index a687965..d5856aa 100644
--- a/src/gpgpu-sim/gpu-cache.cc
+++ b/src/gpgpu-sim/gpu-cache.cc
@@ -29,6 +29,20 @@
#include "stat-tool.h"
#include <assert.h>
+const char * cache_request_status_str(enum cache_request_status status)
+{
+ static const char * static_cache_request_status_str[] = {
+ "HIT",
+ "HIT_RESERVED",
+ "MISS",
+ "RESERVATION_FAIL"
+ };
+
+ assert(sizeof(static_cache_request_status_str) / sizeof(const char*) == NUM_CACHE_REQUEST_STATUS);
+ assert(status < NUM_CACHE_REQUEST_STATUS);
+
+ return static_cache_request_status_str[status];
+}
void l2_cache_config::init(linear_to_raw_address_translation *address_mapping){
cache_config::init();