From f94343c8768af0fe5571c965e306c387b812b767 Mon Sep 17 00:00:00 2001 From: Tayler Hetherington Date: Mon, 28 Jan 2013 13:56:32 -0800 Subject: Cleaning up steady state printing function [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 15124] --- src/gpuwattch/gpgpu_sim_wrapper.cc | 87 +++++++++++++++----------------------- src/gpuwattch/gpgpu_sim_wrapper.h | 3 ++ 2 files changed, 37 insertions(+), 53 deletions(-) (limited to 'src') diff --git a/src/gpuwattch/gpgpu_sim_wrapper.cc b/src/gpuwattch/gpgpu_sim_wrapper.cc index 3bee7b0..1316e55 100644 --- a/src/gpuwattch/gpgpu_sim_wrapper.cc +++ b/src/gpuwattch/gpgpu_sim_wrapper.cc @@ -634,16 +634,38 @@ void gpgpu_sim_wrapper::dump() proc->displayEnergy(2,5); } +void gpgpu_sim_wrapper::print_steady_state(int position, double init_val){ + double temp_avg = sample_val / (double)samples.size() ; + double temp_ipc = (init_val-init_inst_val)/ (double) (samples.size()*gpu_stat_sample_freq); + + if((samples.size() > gpu_steady_min_period)){ // If steady state occurred for some time, print to file + has_written_avg=true; + gzprintf(steady_state_tacking_file,"%u,%d,%f,%f,",sample_start,gcount,temp_avg,temp_ipc); + for(unsigned i=0; irt_power.readOp.dynamic; @@ -678,55 +700,14 @@ void gpgpu_sim_wrapper::detect_print_steady_state(int position, double init_val) } }else{ // Value exceeds threshold, not considered steady state - - if(samples.size() > gpu_steady_min_period){ // If steady state occurred for some time, print to file - has_written_avg = true; - gzprintf(steady_state_tacking_file,"%u,%d,%f,%f,",sample_start,gcount,temp_avg,temp_ipc); - for(unsigned i=0; i gpu_steady_min_period)){ // If steady state occurred for some time, print to file - gzprintf(steady_state_tacking_file,"%u,%d,%f,%f,",sample_start,gcount,temp_avg,temp_ipc); - for(unsigned i=0; i