summaryrefslogtreecommitdiff
path: root/src/gpgpu-sim/l2cache.cc
diff options
context:
space:
mode:
authorWilson Fung <[email protected]>2012-06-07 21:06:00 -0800
committerAndrew Boktor <[email protected]>2014-08-14 13:47:32 -0700
commit07cf089e9d81e71c104ee81c63ee5d8be904d1b0 (patch)
treeb993aed37dbdccd99d9aff0b34fd4243d59a58d6 /src/gpgpu-sim/l2cache.cc
parent7f9189c1970d1a1d1d007f55d54923b48cccc545 (diff)
Fix for bug 168 (internal). The overall average memory latency should now be reporting the actual overall, instead of the average of just the final sampling window for AerialVision.
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 13045]
Diffstat (limited to 'src/gpgpu-sim/l2cache.cc')
-rw-r--r--src/gpgpu-sim/l2cache.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gpgpu-sim/l2cache.cc b/src/gpgpu-sim/l2cache.cc
index e57717f..a252c84 100644
--- a/src/gpgpu-sim/l2cache.cc
+++ b/src/gpgpu-sim/l2cache.cc
@@ -228,8 +228,10 @@ void memory_stats_t::visualizer_print( gzFile visualizer_file )
gzprintf(visualizer_file, "Ltwowritehit: %d\n", L2_write_hit);
gzprintf(visualizer_file, "Ltworeadmiss: %d\n", L2_read_miss);
gzprintf(visualizer_file, "Ltworeadhit: %d\n", L2_read_hit);
- if (num_mfs)
- gzprintf(visualizer_file, "averagemflatency: %lld\n", mf_total_lat/num_mfs);
+ signed long long average_mf_latency = 0;
+ if (mf_num_lat_pw)
+ average_mf_latency = mf_tot_lat_pw / mf_num_lat_pw;
+ gzprintf(visualizer_file, "averagemflatency: %lld\n", average_mf_latency);
}
void gpgpu_sim::L2c_print_cache_stat() const