summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAhmed El-Shafiey <[email protected]>2012-12-20 16:57:54 -0800
committerAndrew Boktor <[email protected]>2014-08-14 13:49:23 -0700
commitfecd769d1e7813b6cf962218208810049e2ad777 (patch)
treecbb7b9e6ec38fb713a1ee2a29ea3d66d6b1faec1 /src
parent7c67c73a642794e2f95cb9b7f5b8377363adc0f2 (diff)
parsing the XML file only if the power simulator is enabled -- this bug was introduced from the prervious changelist
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 14853]
Diffstat (limited to 'src')
-rw-r--r--src/gpgpu-sim/gpu-sim.cc2
-rw-r--r--src/gpuwattch/gpgpu_sim_wrapper.cc8
-rw-r--r--src/gpuwattch/gpgpu_sim_wrapper.h2
3 files changed, 7 insertions, 5 deletions
diff --git a/src/gpgpu-sim/gpu-sim.cc b/src/gpgpu-sim/gpu-sim.cc
index 5b946d3..6cb237b 100644
--- a/src/gpgpu-sim/gpu-sim.cc
+++ b/src/gpgpu-sim/gpu-sim.cc
@@ -487,7 +487,7 @@ gpgpu_sim::gpgpu_sim( const gpgpu_sim_config &config )
ptx_file_line_stats_create_exposed_latency_tracker(m_config.num_shader());
#ifdef GPGPUSIM_POWER_MODEL
- m_gpgpusim_wrapper = new gpgpu_sim_wrapper(config.g_power_config_name);
+ m_gpgpusim_wrapper = new gpgpu_sim_wrapper(config.g_power_simulation_enabled,config.g_power_config_name);
#endif
m_shader_stats = new shader_core_stats(m_shader_config);
diff --git a/src/gpuwattch/gpgpu_sim_wrapper.cc b/src/gpuwattch/gpgpu_sim_wrapper.cc
index cf658cd..adbd03c 100644
--- a/src/gpuwattch/gpgpu_sim_wrapper.cc
+++ b/src/gpuwattch/gpgpu_sim_wrapper.cc
@@ -94,7 +94,7 @@ enum pwr_cmp_t {
};
-gpgpu_sim_wrapper::gpgpu_sim_wrapper( char* xmlfile) {
+gpgpu_sim_wrapper::gpgpu_sim_wrapper( bool power_simulation_enabled, char* xmlfile) {
count=0;
gcount=0;
@@ -127,7 +127,7 @@ gpgpu_sim_wrapper::gpgpu_sim_wrapper( char* xmlfile) {
g_metric_trace_filename = NULL;
g_steady_state_tracking_filename = NULL;
xml_filename= xmlfile;
- g_power_simulation_enabled= false;
+ g_power_simulation_enabled= power_simulation_enabled;
g_power_trace_enabled= false;
g_steady_power_levels_enabled= false;
g_power_trace_zlevel= 0;
@@ -137,7 +137,9 @@ gpgpu_sim_wrapper::gpgpu_sim_wrapper( char* xmlfile) {
gpu_stat_sample_freq=0;
p=new ParseXML();
- p->parse(xml_filename);
+ if (g_power_simulation_enabled){
+ p->parse(xml_filename);
+ }
proc = new Processor(p);
power_trace_file = NULL;
metric_trace_file = NULL;
diff --git a/src/gpuwattch/gpgpu_sim_wrapper.h b/src/gpuwattch/gpgpu_sim_wrapper.h
index b88af66..97cffd3 100644
--- a/src/gpuwattch/gpgpu_sim_wrapper.h
+++ b/src/gpuwattch/gpgpu_sim_wrapper.h
@@ -46,7 +46,7 @@ using namespace std;
class gpgpu_sim_wrapper {
public:
- gpgpu_sim_wrapper(char* xmlfile);
+ gpgpu_sim_wrapper(bool power_simulation_enabled, char* xmlfile);
~gpgpu_sim_wrapper();
void init_mcpat(char* xmlfile, char* powerfile, char* power_trace_file,char* metric_trace_file,