summaryrefslogtreecommitdiff
path: root/src/cpu/o3/commit_impl.hh
diff options
context:
space:
mode:
authorJoel Hestness <hestness@cs.utexas.edu>2011-02-06 22:14:17 -0800
committerJoel Hestness <hestness@cs.utexas.edu>2011-02-06 22:14:17 -0800
commitb4c10bd6800b5ab5adee3035f1908d7a49a14ca9 (patch)
treed21b1bbf5c8df8c77d77b6983779b24189a1d8cb /src/cpu/o3/commit_impl.hh
parenta679e732cee821616c20cc13c22ad2877072ff14 (diff)
downloadgem5-b4c10bd6800b5ab5adee3035f1908d7a49a14ca9.tar.xz
mcpat: Adds McPAT performance counters
Updated patches from Rick Strong's set that modify performance counters for McPAT
Diffstat (limited to 'src/cpu/o3/commit_impl.hh')
-rw-r--r--src/cpu/o3/commit_impl.hh34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/cpu/o3/commit_impl.hh b/src/cpu/o3/commit_impl.hh
index a49e1497e..50c08e162 100644
--- a/src/cpu/o3/commit_impl.hh
+++ b/src/cpu/o3/commit_impl.hh
@@ -230,6 +230,27 @@ DefaultCommit<Impl>::regStats()
.flags(total)
;
+ statComFloating
+ .init(cpu->numThreads)
+ .name(name() + ".COM:fp_insts")
+ .desc("Number of committed floating point instructions.")
+ .flags(total)
+ ;
+
+ statComInteger
+ .init(cpu->numThreads)
+ .name(name()+".COM:int_insts")
+ .desc("Number of committed integer instructions.")
+ .flags(total)
+ ;
+
+ statComFunctionCalls
+ .init(cpu->numThreads)
+ .name(name()+".COM:function_calls")
+ .desc("Number of function calls committed.")
+ .flags(total)
+ ;
+
commitEligible
.init(cpu->numThreads)
.name(name() + ".COM:bw_limited")
@@ -1321,6 +1342,19 @@ DefaultCommit<Impl>::updateComInstStats(DynInstPtr &inst)
if (inst->isMemBarrier()) {
statComMembars[tid]++;
}
+
+ // Integer Instruction
+ if (inst->isInteger())
+ statComInteger[tid]++;
+
+ // Floating Point Instruction
+ if (inst->isFloating())
+ statComFloating[tid]++;
+
+ // Function Calls
+ if (inst->isCall())
+ statComFunctionCalls[tid]++;
+
}
////////////////////////////////////////