diff options
| author | Wilson Fung <[email protected]> | 2012-01-12 03:12:11 -0800 |
|---|---|---|
| committer | Andrew Boktor <[email protected]> | 2014-08-14 13:19:02 -0700 |
| commit | aa71c23cfafc4c69ba4628da528fc572aaa5cc1a (patch) | |
| tree | 32b6cd8449b87c72ea5ad68bdb13a4f7ddcc6ee1 /src | |
| parent | 3ffba72094e4cbdae521343d7cceedd62428853e (diff) | |
Revived PC-Histogram in AerialVision.
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 11308]
Diffstat (limited to 'src')
| -rw-r--r-- | src/gpgpu-sim/gpu-sim.cc | 4 | ||||
| -rw-r--r-- | src/gpgpu-sim/shader.cc | 10 | ||||
| -rw-r--r-- | src/gpgpu-sim/stat-tool.cc | 5 |
3 files changed, 18 insertions, 1 deletions
diff --git a/src/gpgpu-sim/gpu-sim.cc b/src/gpgpu-sim/gpu-sim.cc index cc47da9..ddee6eb 100644 --- a/src/gpgpu-sim/gpu-sim.cc +++ b/src/gpgpu-sim/gpu-sim.cc @@ -514,7 +514,9 @@ void gpgpu_sim::init() m_cluster[i]->reinit(); m_shader_stats->new_grid(); // initialize the control-flow, memory access, memory latency logger - create_thread_CFlogger( m_config.num_shader(), m_shader_config->n_thread_per_shader, 0, m_config.gpgpu_cflog_interval ); + if (m_config.g_visualizer_enabled) { + create_thread_CFlogger( m_config.num_shader(), m_shader_config->n_thread_per_shader, 0, m_config.gpgpu_cflog_interval ); + } shader_CTA_count_create( m_config.num_shader(), m_config.gpgpu_cflog_interval); if (m_config.gpgpu_cflog_interval != 0) { insn_warp_occ_create( m_config.num_shader(), m_shader_config->warp_size ); diff --git a/src/gpgpu-sim/shader.cc b/src/gpgpu-sim/shader.cc index 3d37688..0275757 100644 --- a/src/gpgpu-sim/shader.cc +++ b/src/gpgpu-sim/shader.cc @@ -2204,4 +2204,14 @@ void shader_core_ctx::checkExecutionStatusAndUpdate(warp_inst_t &inst, unsigned m_warp[inst.warp_id()].set_completed(t); m_warp[inst.warp_id()].ibuffer_flush(); } + + // PC-Histogram Update + unsigned warp_id = inst.warp_id(); + unsigned pc = inst.pc; + for (unsigned t = 0; t < m_config->warp_size; t++) { + if (inst.active(t)) { + int tid = warp_id * m_config->warp_size + t; + cflog_update_thread_pc(m_sid, tid, pc); + } + } } diff --git a/src/gpgpu-sim/stat-tool.cc b/src/gpgpu-sim/stat-tool.cc index 77e4aca..94998f2 100644 --- a/src/gpgpu-sim/stat-tool.cc +++ b/src/gpgpu-sim/stat-tool.cc @@ -149,10 +149,12 @@ void destroy_thread_CFlogger( ) void cflog_update_thread_pc( int logger_id, int thread_id, address_type pc ) { + if (thread_CFlogger == NULL) return; // this means no visualizer output if (thread_id < 0) return; thread_CFlogger[logger_id]->update_thread_pc(thread_id, pc); } +// deprecated void cflog_snapshot( int logger_id, unsigned long long cycle ) { thread_CFlogger[logger_id]->snap_shot(cycle); @@ -160,6 +162,7 @@ void cflog_snapshot( int logger_id, unsigned long long cycle ) void cflog_print(FILE *fout) { + if (thread_CFlogger == NULL) return; // this means no visualizer output for (int i = 0; i < n_thread_CFloggers; i++) { thread_CFlogger[i]->print_histo(fout); } @@ -167,6 +170,7 @@ void cflog_print(FILE *fout) void cflog_visualizer_print(FILE *fout) { + if (thread_CFlogger == NULL) return; // this means no visualizer output for (int i = 0; i < n_thread_CFloggers; i++) { thread_CFlogger[i]->print_visualizer(fout); } @@ -174,6 +178,7 @@ void cflog_visualizer_print(FILE *fout) void cflog_visualizer_gzprint(gzFile fout) { + if (thread_CFlogger == NULL) return; // this means no visualizer output for (int i = 0; i < n_thread_CFloggers; i++) { thread_CFlogger[i]->print_visualizer(fout); } |
