From e61f07a0c732fcf9e12fc1404b125c7b08732327 Mon Sep 17 00:00:00 2001 From: Tayler Hetherington Date: Sun, 30 Dec 2012 15:26:01 -0800 Subject: Fixing a GPUWattch bug where the cache statistics weren't updated if there are stalls in the memory pipelines (Only a problem for cycle-by-cycle analysis). [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 14928] --- src/gpgpu-sim/shader.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/gpgpu-sim/shader.cc b/src/gpgpu-sim/shader.cc index 982edeb..cb1c7a9 100644 --- a/src/gpgpu-sim/shader.cc +++ b/src/gpgpu-sim/shader.cc @@ -1529,6 +1529,8 @@ void ldst_unit::cycle() done &= texture_cycle(pipe_reg, rc_fail, type); done &= memory_cycle(pipe_reg, rc_fail, type); m_mem_rc = rc_fail; + set_stats(); // Sets stats in m_stats object + if (!done) { // log stall types and return assert(rc_fail != NO_RC_FAIL); m_stats->gpgpu_n_stall_shd_mem++; @@ -1581,8 +1583,6 @@ void ldst_unit::cycle() m_dispatch_reg->clear(); } } - // Sets stats in m_stats object - set_stats(); } void shader_core_ctx::register_cta_thread_exit( unsigned cta_num ) -- cgit v1.3