summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gpgpu-sim/power_interface.cc2
-rw-r--r--src/gpuwattch/gpgpu_sim_wrapper.cc23
-rw-r--r--src/gpuwattch/gpgpu_sim_wrapper.h2
3 files changed, 24 insertions, 3 deletions
diff --git a/src/gpgpu-sim/power_interface.cc b/src/gpgpu-sim/power_interface.cc
index 4ff6cf2..0c67039 100644
--- a/src/gpgpu-sim/power_interface.cc
+++ b/src/gpgpu-sim/power_interface.cc
@@ -124,5 +124,5 @@ void mcpat_cycle(const gpgpu_sim_config &config, const struct shader_core_config
}
void mcpat_reset_perf_count(class gpgpu_sim_wrapper *wrapper, bool do_print){
- wrapper->reset_perf_counters(do_print);
+ wrapper->reset_counters(do_print);
}
diff --git a/src/gpuwattch/gpgpu_sim_wrapper.cc b/src/gpuwattch/gpgpu_sim_wrapper.cc
index bfcf4a1..df90de5 100644
--- a/src/gpuwattch/gpgpu_sim_wrapper.cc
+++ b/src/gpuwattch/gpgpu_sim_wrapper.cc
@@ -224,7 +224,7 @@ void gpgpu_sim_wrapper::init_mcpat(char* xmlfile, char* powerfilename, char* pow
}
-void gpgpu_sim_wrapper::reset_perf_counters(bool do_print){
+void gpgpu_sim_wrapper::reset_counters(bool do_print){
if(do_print)
print_trace_files();
@@ -234,6 +234,27 @@ void gpgpu_sim_wrapper::reset_perf_counters(bool do_print){
for(unsigned i=0; i<num_pwr_cmps; ++i){
pwr_cmp_avg[i]= 0;
}
+
+ for(unsigned i=0; i<num_pwr_cmps; ++i){
+ pwr_cmp_max[i]= 0;
+ }
+
+ for(unsigned i=0; i<num_pwr_cmps; ++i){
+ pwr_cmp_min[i]= 0;
+ }
+
+ for(unsigned i=0; i<num_pwr_cmps; ++i){
+ perf_count_avg[i]= 0;
+ }
+
+ for(unsigned i=0; i<num_pwr_cmps; ++i){
+ perf_count_min[i]= 0;
+ }
+
+ for(unsigned i=0; i<num_pwr_cmps; ++i){
+ perf_count_max[i]= 0;
+ }
+
return;
}
diff --git a/src/gpuwattch/gpgpu_sim_wrapper.h b/src/gpuwattch/gpgpu_sim_wrapper.h
index 115db43..f37d4f8 100644
--- a/src/gpuwattch/gpgpu_sim_wrapper.h
+++ b/src/gpuwattch/gpgpu_sim_wrapper.h
@@ -61,7 +61,7 @@ public:
void print_trace_files();
void update_components_power();
void update_coefficients();
- void reset_perf_counters(bool do_print);
+ void reset_counters(bool do_print);
void print_power_kernel_stats(double gpu_sim_cycle, double gpu_tot_sim_cycle, double init_value, const std::string & kernel_info_string);
void power_metrics_calculations();
void 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);