diff --git a/src/gpgpu-sim/shader.cc b/src/gpgpu-sim/shader.cc index 8b226b6e9..c6e7b8f67 100644 --- a/src/gpgpu-sim/shader.cc +++ b/src/gpgpu-sim/shader.cc @@ -748,6 +748,8 @@ void shader_core_stats::visualizer_print(gzFile visualizer_file) { } gzprintf(visualizer_file, "\n"); + gzprintf(visualizer_file, "ctas_completed: %d\n", ctas_completed); + ctas_completed = 0; // warp issue breakdown unsigned sid = m_config->gpgpu_warp_issue_shader; unsigned count = 0; @@ -2685,6 +2687,7 @@ void shader_core_ctx::register_cta_thread_exit(unsigned cta_num, m_cta_status[cta_num]--; if (!m_cta_status[cta_num]) { // Increment the completed CTAs + m_stats->ctas_completed++; m_gpu->inc_completed_cta(); m_n_active_cta--; m_barriers.deallocate_barrier(cta_num); @@ -2751,6 +2754,7 @@ void gpgpu_sim::shader_print_runtime_stat(FILE *fout) { void gpgpu_sim::shader_print_scheduler_stat(FILE *fout, bool print_dynamic_info) const { + fprintf(fout, "ctas_completed %d, ", m_shader_stats->ctas_completed); // Print out the stats from the sampling shader core const unsigned scheduler_sampling_core = m_shader_config->gpgpu_warp_issue_shader; diff --git a/src/gpgpu-sim/shader.h b/src/gpgpu-sim/shader.h index 04cf7478b..6481790bc 100644 --- a/src/gpgpu-sim/shader.h +++ b/src/gpgpu-sim/shader.h @@ -1669,6 +1669,7 @@ struct shader_core_stats_pod { unsigned *single_issue_nums; unsigned *dual_issue_nums; + unsigned ctas_completed; // memory access classification int gpgpu_n_mem_read_local; int gpgpu_n_mem_write_local; @@ -1782,6 +1783,7 @@ class shader_core_stats : public shader_core_stats_pod { dual_issue_nums = (unsigned *)calloc(config->gpgpu_num_sched_per_core, sizeof(unsigned)); + ctas_completed = 0; n_simt_to_mem = (long *)calloc(config->num_shader(), sizeof(long)); n_mem_to_simt = (long *)calloc(config->num_shader(), sizeof(long));