changeset 32e4b41c10e5 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=32e4b41c10e5
description:
        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:

 src/sim/stat_control.cc |  14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diffs (38 lines):

diff -r d70a85ee7062 -r 32e4b41c10e5 src/sim/stat_control.cc
--- a/src/sim/stat_control.cc   Wed Jan 25 17:18:25 2012 +0000
+++ b/src/sim/stat_control.cc   Wed Jan 25 17:18:25 2012 +0000
@@ -53,6 +53,7 @@
 
 Stats::Formula simSeconds;
 Stats::Value simTicks;
+Stats::Value finalTick;
 Stats::Value simFreq;
 
 namespace Stats {
@@ -85,6 +86,12 @@
     return curTick() - startTick;
 }
 
+Tick
+statFinalTick()
+{
+    return curTick();
+}
+
 SimTicksReset simTicksReset;
 
 struct Global
@@ -126,6 +133,13 @@
         .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)")
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to