diff options
author | Ali Saidi <Ali.Saidi@ARM.com> | 2012-01-25 17:18:25 +0000 |
---|---|---|
committer | Ali Saidi <Ali.Saidi@ARM.com> | 2012-01-25 17:18:25 +0000 |
commit | bd55c9e2af7fd6c06af48a020c29cb33ba1ca3fc (patch) | |
tree | df0af32af5206386a62c936c34079f70b73516f8 /src/sim | |
parent | e1c48dfce556ddb5ae2189dd8ef5ef542170b304 (diff) | |
download | gem5-bd55c9e2af7fd6c06af48a020c29cb33ba1ca3fc.tar.xz |
sim: display final value of curTick in stats
Different from sim_ticks in that this value is restored from checkpoints and is never reset.
Useful for aligning with framebuffer output ticks
Diffstat (limited to 'src/sim')
-rw-r--r-- | src/sim/stat_control.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/sim/stat_control.cc b/src/sim/stat_control.cc index 7cf77174f..eb5fe1307 100644 --- a/src/sim/stat_control.cc +++ b/src/sim/stat_control.cc @@ -53,6 +53,7 @@ using namespace std; Stats::Formula simSeconds; Stats::Value simTicks; +Stats::Value finalTick; Stats::Value simFreq; namespace Stats { @@ -85,6 +86,12 @@ statElapsedTicks() return curTick() - startTick; } +Tick +statFinalTick() +{ + return curTick(); +} + SimTicksReset simTicksReset; struct Global @@ -126,6 +133,13 @@ Global::Global() .desc("Number of ticks simulated") ; + finalTick + .functor(statFinalTick) + .name("final_tick") + .desc("Number of ticks from beginning of simulation \ +(restored from checkpoints and never reset)") + ; + hostInstRate .name("host_inst_rate") .desc("Simulator instruction rate (inst/s)") |