Merge zizzer.eecs.umich.edu:/bk/m5
[gem5.git] / sim / stat_control.cc
index 28ee348b5b149e3c0f3bb1541cc41dcfbf78cf57..578073efa1fc0e31108a23a9412a53733a47c89b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003 The Regents of The University of Michigan
+ * Copyright (c) 2004 The Regents of The University of Michigan
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
 #include "base/str.hh"
 #include "base/time.hh"
 #include "base/stats/output.hh"
-#include "cpu/base_cpu.hh"
+#include "cpu/base.hh"
 #include "sim/eventq.hh"
 #include "sim/sim_object.hh"
 #include "sim/stat_control.hh"
-#include "sim/universe.hh"
+#include "sim/root.hh"
 
 using namespace std;
 
@@ -80,6 +80,12 @@ statElapsedTime()
     return elapsed();
 }
 
+Tick
+statElapsedTicks()
+{
+    return curTick - startTick;
+}
+
 SimTicksReset simTicksReset;
 
 void
@@ -99,13 +105,13 @@ InitSimStats()
         ;
 
     simFreq
-        .scalar(ticksPerSecond)
+        .scalar(Clock::Frequency)
         .name("sim_freq")
         .desc("Frequency of simulated ticks")
         ;
 
     simTicks
-        .scalar(curTick)
+        .functor(statElapsedTicks)
         .name("sim_ticks")
         .desc("Number of ticks simulated")
         ;