Bug fix & cleanup in config code.
[gem5.git] / test / stattest.cc
index 7bf355c0eb57c021cb36e76c3d0a571108f0d028..d0b6916bb5ec4b00a80825113b87508dcb8e8cfa 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003 The Regents of The University of Michigan
+ * Copyright (c) 2003-2004 The Regents of The University of Michigan
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -41,7 +41,7 @@
 #include "sim/host.hh"
 
 using namespace std;
-using namespace Statistics;
+using namespace Stats;
 
 Tick curTick = 0;
 Tick ticksPerSecond = ULL(2000000000);
@@ -66,8 +66,8 @@ Vector2d<> s16;
 Formula f1;
 Formula f2;
 Formula f3;
-Formula f4;
-Formula f5;
+Value f4;
+Value f5;
 Formula f6;
 Formula f7;
 
@@ -279,11 +279,14 @@ main(int argc, char *argv[])
         ;
 
     f4
+        .functor(testfunc)
         .name("Formula4")
         .desc("this is formula 4")
         ;
 
+    TestClass testclass;
     f5
+        .functor(testclass)
         .name("Formula5")
         .desc("this is formula 5")
         ;
@@ -296,9 +299,6 @@ main(int argc, char *argv[])
     f1 = s1 + s2;
     f2 = (-s1) / (-s2) * (-s3 + ULL(100) + s4);
     f3 = sum(s5) * s7;
-    f4 = functor(testfunc);
-    TestClass testclass;
-    f5 = functor(testclass);
     f6 += constant(10.0);
     f6 += s5[3];
     f7 = constant(1);