add in the files to the SConscript for split caches
[gem5.git] / base / statistics.cc
index 78012bff735f5db656fbc87d505888475a119003..eaefd5f15a69ed0f754adfd11d8e075e1dc33e97 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003-2004 The Regents of The University of Michigan
+ * Copyright (c) 2003-2005 The Regents of The University of Michigan
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
 #include "base/cprintf.hh"
 #include "base/hostinfo.hh"
 #include "base/misc.hh"
-#include "base/python.hh"
 #include "base/statistics.hh"
 #include "base/str.hh"
 #include "base/time.hh"
 #include "base/trace.hh"
 #include "base/stats/statdb.hh"
+#include "config/stats_binning.hh"
 
 using namespace std;
 
@@ -273,7 +273,8 @@ check()
     for (i = Database::stats().begin(); i != end; ++i) {
         StatData *data = *i;
         assert(data);
-        data->check();
+        if (!data->check() || !data->baseCheck())
+            panic("stat check failed for %s\n", data->name);
     }
 
     int j = 0;
@@ -285,6 +286,13 @@ check()
 
     Database::stats().sort(StatData::less);
 
+#if STATS_BINNING
+    if (MainBin::curBin() == NULL) {
+        static MainBin mainBin("main bin");
+        mainBin.activate();
+    }
+#endif
+
     if (i == end)
         return;