summaryrefslogtreecommitdiff
path: root/test/stattest.cc
diff options
context:
space:
mode:
authorNathan Binkert <binkertn@umich.edu>2003-10-20 23:08:27 -0400
committerNathan Binkert <binkertn@umich.edu>2003-10-20 23:08:27 -0400
commit02bacb2dfdfcb3161f8fbada4bf3108566989fcd (patch)
treef3db2a424695f8634fdc70e51e35c21a0721f306 /test/stattest.cc
parentdf488c0e70eb827d895c12aba85d5de168505b02 (diff)
downloadgem5-02bacb2dfdfcb3161f8fbada4bf3108566989fcd.tar.xz
Implement reset for stats.
base/statistics.cc: base/statistics.hh: Implement a reset for for the statistics package. This will cause all stats to be set to their default value. Only the currently enabled bin will be reset. test/Makefile: Make tests work again now that we're naming include dirs explicitly test/stattest.cc: test reset --HG-- extra : convert_revision : 8d21cedf6ee91ed0a2412042ea5cb12f79b90eb3
Diffstat (limited to 'test/stattest.cc')
-rw-r--r--test/stattest.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/test/stattest.cc b/test/stattest.cc
index a009c16d8..38a15900d 100644
--- a/test/stattest.cc
+++ b/test/stattest.cc
@@ -32,15 +32,16 @@
#include <unistd.h>
#include "base/cprintf.hh"
-#include "sim/host.hh"
#include "base/misc.hh"
#include "base/statistics.hh"
+#include "sim/host.hh"
+#include "sim/sim_stats.hh"
using namespace std;
using namespace Statistics;
Tick curTick = 0;
-//Tick ticksPerSecond = ULL(2000000000);
+Tick ticksPerSecond = ULL(2000000000);
Scalar<> s1;
Scalar<> s2;
@@ -493,10 +494,17 @@ main(int argc, char *argv[])
s12.sample(100);
MainBin::activate(bin1);
+ cout << "dump 1" << endl;
dump(cout);
cout << endl << endl;
MainBin::activate(bin2);
+ cout << "dump 2" << endl;
+ dump(cout);
+ cout << endl << endl;
+
+ cout << "dump 3" << endl;
+ reset();
dump(cout);
cout << endl << endl;