From e4d7bf562e8e90fa4523efc186322bff416c0506 Mon Sep 17 00:00:00 2001 From: Tim Rogers Date: Sat, 9 Feb 2013 14:58:14 -0800 Subject: Fixing a slew of compiler warnings [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 15218] --- src/gpuwattch/XML_Parse.cc | 5 +++++ src/gpuwattch/XML_Parse.h | 14 ++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) (limited to 'src/gpuwattch') diff --git a/src/gpuwattch/XML_Parse.cc b/src/gpuwattch/XML_Parse.cc index 28b0efe..8e33f3f 100644 --- a/src/gpuwattch/XML_Parse.cc +++ b/src/gpuwattch/XML_Parse.cc @@ -43,6 +43,11 @@ using namespace std; +const char * perf_count_label[] = {"TOT_INST,", "FP_INT,", "IC_H,", "IC_M,", "DC_RH,", "DC_RM,", "DC_WH,", "DC_WM,", + "TC_H,", "TC_M,", "CC_H,", "CC_M,", "SHRD_ACC,", "REG_RD,", "REG_WR,", "NON_REG_OPs,", + "SP_ACC,", "SFU_ACC,", "FPU_ACC,", "MEM_RD,","MEM_WR,", "MEM_PRE,", "L2_RH,", "L2_RM,", "L2_WH,", + "L2_WM,", "NOC_A,", "PIPE_A,", "IDLE_CORE_N,", "CONST_DYNAMICN"}; + void ParseXML::parse(char* filepath) { unsigned int i,j,k,m,n; diff --git a/src/gpuwattch/XML_Parse.h b/src/gpuwattch/XML_Parse.h index 53e408b..698445e 100644 --- a/src/gpuwattch/XML_Parse.h +++ b/src/gpuwattch/XML_Parse.h @@ -56,10 +56,16 @@ ToXMLStringTool tx,tx2; */ //all subnodes at the level of system.core(0-n) //cache_policy is added into cache property arrays;//0 no write or write-though with non-write allocate;1 write-back with write-allocate -static const char * perf_count_label[] = {"TOT_INST,", "FP_INT,", "IC_H,", "IC_M,", "DC_RH,", "DC_RM,", "DC_WH,", "DC_WM,", - "TC_H,", "TC_M,", "CC_H,", "CC_M,", "SHRD_ACC,", "REG_RD,", "REG_WR,", "NON_REG_OPs,", - "SP_ACC,", "SFU_ACC,", "FPU_ACC,", "MEM_RD,","MEM_WR,", "MEM_PRE,", "L2_RH,", "L2_RM,", "L2_WH,", - "L2_WM,", "NOC_A,", "PIPE_A,", "IDLE_CORE_N,", "CONST_DYNAMICN"}; +// +//tgrogers - This was a static array declared in the header... +// Not too sure why the authors did this, maybe they didn't understand the context +// of the "static" keyword outside a class declaration. As it was written, each object file +// had it's own copy of the string list - which is okay, since the string is constant but +// wastes space and causes the compiler to complain about unused vars in files where this header +// is included but they don't use the variable. Now this is extern'd here and the storage/definition +// is in the XML_Parse.cc file +extern const char * perf_count_label[]; + enum perf_count_t { TOT_INST=0, FP_INT, -- cgit v1.3