summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkshay Jain <[email protected]>2018-03-22 04:34:40 -0400
committerAkshay Jain <[email protected]>2018-03-22 04:34:40 -0400
commit160db7d46af433d12288505005ebd8c41be59922 (patch)
tree044400633f38dc440c008114e5c75da0cdd26611
parent777ab7fd6761a6250bc8e4f37994125a3f8d331b (diff)
Change 253 by jain156@akshayj-lt1 on 2017/05/30 00:40:03
Replaced the mem div stats with mem div histogram
-rw-r--r--src/gpgpu-sim/shader.cc8
-rw-r--r--src/gpgpu-sim/shader.h9
2 files changed, 10 insertions, 7 deletions
diff --git a/src/gpgpu-sim/shader.cc b/src/gpgpu-sim/shader.cc
index 72e0266..e7204c8 100644
--- a/src/gpgpu-sim/shader.cc
+++ b/src/gpgpu-sim/shader.cc
@@ -438,8 +438,9 @@ void shader_core_stats::print( FILE* fout ) const
fprintf(fout,"gpgpu_n_mem_texture = %d\n", gpgpu_n_mem_texture);
fprintf(fout,"gpgpu_n_mem_const = %d\n", gpgpu_n_mem_const);
- fprintf(fout,"gpgpu_n_times_gmem_accesses_by_warps = %lld\n", gpgpu_n_times_gmem_accesses_by_warps);
- fprintf(fout,"gpgpu_n_total_gmem_accesses_by_warps = %lld\n", gpgpu_n_total_gmem_accesses_by_warps);
+ fprintf(fout,"gpgpu_mem_divergence_hist ");
+ gpgpu_mem_divergence_hist->fprint(fout);
+ fprintf(fout,"\n");
fprintf(fout, "gpgpu_n_load_insn = %d\n", gpgpu_n_load_insn);
fprintf(fout, "gpgpu_n_store_insn = %d\n", gpgpu_n_store_insn);
@@ -749,8 +750,7 @@ void shader_core_ctx::func_exec_inst( warp_inst_t &inst )
starting_queue_size = inst.accessq_count();
inst.generate_mem_accesses();
if ( inst.space.get_type() == global_space ) {
- m_stats->gpgpu_n_times_gmem_accesses_by_warps++;
- m_stats->gpgpu_n_total_gmem_accesses_by_warps += inst.accessq_count() - starting_queue_size;
+ m_stats->gpgpu_mem_divergence_hist->add2bin(inst.accessq_count() - starting_queue_size);
}
}
diff --git a/src/gpgpu-sim/shader.h b/src/gpgpu-sim/shader.h
index 2475677..45658ac 100644
--- a/src/gpgpu-sim/shader.h
+++ b/src/gpgpu-sim/shader.h
@@ -53,6 +53,8 @@
#include "stats.h"
#include "gpu-cache.h"
#include "traffic_breakdown.h"
+#include "histogram.h"
+
@@ -1471,9 +1473,8 @@ struct shader_core_stats_pod {
int gpgpu_n_mem_write_global;
int gpgpu_n_mem_read_inst;
- //warps memory divergence count
- unsigned long long gpgpu_n_times_gmem_accesses_by_warps;
- unsigned long long gpgpu_n_total_gmem_accesses_by_warps;
+ //warps combined memory divergence histogram
+ linear_histogram* gpgpu_mem_divergence_hist;
int gpgpu_n_mem_l2_writeback;
int gpgpu_n_mem_l1_write_allocate;
@@ -1543,6 +1544,7 @@ public:
m_incoming_traffic_stats = new traffic_breakdown("memtocore");
gpgpu_n_shmem_bank_access = (unsigned *)calloc(config->num_shader(), sizeof(unsigned));
+ gpgpu_mem_divergence_hist = new linear_histogram(1, "", config->warp_size+1);
m_shader_dynamic_warp_issue_distro.resize( config->num_shader() );
m_shader_warp_slot_issue_distro.resize( config->num_shader() );
@@ -1557,6 +1559,7 @@ public:
free(m_n_diverge);
free(shader_cycle_distro);
free(last_shader_cycle_distro);
+ free(gpgpu_mem_divergence_hist);
}
void new_grid()