diff options
Diffstat (limited to 'src/gpuwattch/gpgpu_sim_wrapper.cc')
| -rw-r--r-- | src/gpuwattch/gpgpu_sim_wrapper.cc | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/gpuwattch/gpgpu_sim_wrapper.cc b/src/gpuwattch/gpgpu_sim_wrapper.cc index 1316e55..bedaae1 100644 --- a/src/gpuwattch/gpgpu_sim_wrapper.cc +++ b/src/gpuwattch/gpgpu_sim_wrapper.cc @@ -151,7 +151,6 @@ void gpgpu_sim_wrapper::init_mcpat(char* xmlfile, char* powerfilename, char* pow s++; } - if(mcpat_init){ g_power_filename = powerfilename; g_power_trace_filename =power_trace_filename; @@ -174,9 +173,10 @@ void gpgpu_sim_wrapper::init_mcpat(char* xmlfile, char* powerfilename, char* pow metric_trace_file = NULL; steady_state_tacking_file = NULL; + if (g_power_trace_enabled ){ - power_trace_file = gzopen(g_power_trace_filename, (mcpat_init)? "w" : "a"); - metric_trace_file = gzopen(g_metric_trace_filename, (mcpat_init)? "w" : "a"); + power_trace_file = gzopen(g_power_trace_filename, "w"); + metric_trace_file = gzopen(g_metric_trace_filename, "w"); if ((power_trace_file == NULL) || (metric_trace_file == NULL)) { printf("error - could not open trace files \n"); exit(1); @@ -199,7 +199,7 @@ void gpgpu_sim_wrapper::init_mcpat(char* xmlfile, char* powerfilename, char* pow gzclose(metric_trace_file); } if(g_steady_power_levels_enabled){ - steady_state_tacking_file = gzopen(g_steady_state_tracking_filename, (mcpat_init)? "w" : "a"); + steady_state_tacking_file = gzopen(g_steady_state_tracking_filename, "w"); if ((steady_state_tacking_file == NULL)) { printf("error - could not open trace files \n"); exit(1); @@ -224,6 +224,16 @@ void gpgpu_sim_wrapper::init_mcpat(char* xmlfile, char* powerfilename, char* pow } +void gpgpu_sim_wrapper::reset_perf_counters(bool do_print){ + if(do_print) + print_trace_files(); + + for(unsigned i=0; i<num_per_counts; ++i){ + perf_count[i] = 0; + } + return; +} + void gpgpu_sim_wrapper::set_inst_power(bool clk_gated_lanes, double tot_cycles, double busy_cycles, double tot_inst, double int_inst, double fp_inst, double load_inst, double store_inst, double committed_inst) { p->sys.core[0].gpgpu_clock_gated_lanes = clk_gated_lanes; |
