Replace ad-hoc or locally defined power-of-2 tests
[gem5.git] / base / statistics.cc
index 6f5caf1fe20b7507219db95408115120d56d8917..c9756464176d5e5a5530024ce13cc1b8a20f8f95 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;
 
@@ -253,7 +253,7 @@ char *
 MainBin::memory(off_t off)
 {
     if (memsize == -1)
-        memsize = CeilPow2((size_t) offset());
+        memsize = ceilPow2((size_t) offset());
 
     if (!mem) {
         mem = new char[memsize];
@@ -286,7 +286,7 @@ check()
 
     Database::stats().sort(StatData::less);
 
-#if defined(STATS_BINNING)
+#if STATS_BINNING
     if (MainBin::curBin() == NULL) {
         static MainBin mainBin("main bin");
         mainBin.activate();