From 918b3ef50790f0ae7c8c079754f7332933572d5b Mon Sep 17 00:00:00 2001 From: Wilson Fung Date: Thu, 11 Apr 2013 05:17:09 -0800 Subject: 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] --- src/gpgpu-sim/gpu-cache.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/gpgpu-sim/gpu-cache.cc') 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 +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(); -- cgit v1.3