From 542d0ceebca1d24bfb433ce9fe916b0586f8d029 Mon Sep 17 00:00:00 2001 From: Anthony Gutierrez Date: Sun, 12 Feb 2012 16:07:39 -0600 Subject: cpu: add separate stats for insts/ops both globally and per cpu model --- src/sim/stat_control.cc | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'src/sim') 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); -- cgit v1.2.3