summaryrefslogtreecommitdiff
path: root/src/sim
diff options
context:
space:
mode:
authorAnthony Gutierrez <atgutier@umich.edu>2012-02-12 16:07:39 -0600
committerAnthony Gutierrez <atgutier@umich.edu>2012-02-12 16:07:39 -0600
commit542d0ceebca1d24bfb433ce9fe916b0586f8d029 (patch)
tree45afbefa2ec6a79de564d2c4505667a4d974e1f5 /src/sim
parent230540e655efd09ad057e7fde2ac257f355c06d1 (diff)
downloadgem5-542d0ceebca1d24bfb433ce9fe916b0586f8d029.tar.xz
cpu: add separate stats for insts/ops both globally and per cpu model
Diffstat (limited to 'src/sim')
-rw-r--r--src/sim/stat_control.cc20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/sim/stat_control.cc b/src/sim/stat_control.cc
index eb5fe1307..965c081ee 100644
--- a/src/sim/stat_control.cc
+++ b/src/sim/stat_control.cc
@@ -97,11 +97,13 @@ SimTicksReset simTicksReset;
struct Global
{
Stats::Formula hostInstRate;
+ Stats::Formula hostOpRate;
Stats::Formula hostTickRate;
Stats::Value hostMemory;
Stats::Value hostSeconds;
Stats::Value simInsts;
+ Stats::Value simOps;
Global();
};
@@ -109,13 +111,21 @@ struct Global
Global::Global()
{
simInsts
- .functor(BaseCPU::numSimulatedInstructions)
+ .functor(BaseCPU::numSimulatedInsts)
.name("sim_insts")
.desc("Number of instructions simulated")
.precision(0)
.prereq(simInsts)
;
+ simOps
+ .functor(BaseCPU::numSimulatedOps)
+ .name("sim_ops")
+ .desc("Number of ops (including micro ops) simulated")
+ .precision(0)
+ .prereq(simOps)
+ ;
+
simSeconds
.name("sim_seconds")
.desc("Number of seconds simulated")
@@ -147,6 +157,13 @@ Global::Global()
.prereq(simInsts)
;
+ hostOpRate
+ .name("host_op_rate")
+ .desc("Simulator op (including micro ops) rate (op/s)")
+ .precision(0)
+ .prereq(simOps)
+ ;
+
hostMemory
.functor(memUsage)
.name("host_mem_usage")
@@ -169,6 +186,7 @@ Global::Global()
simSeconds = simTicks / simFreq;
hostInstRate = simInsts / hostSeconds;
+ hostOpRate = simOps / hostSeconds;
hostTickRate = simTicks / hostSeconds;
registerResetCallback(&simTicksReset);