X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=base%2Fstatistics.cc;h=eaefd5f15a69ed0f754adfd11d8e075e1dc33e97;hb=5aa71721193c49016ffa69934b44ce38672e4eed;hp=78012bff735f5db656fbc87d505888475a119003;hpb=62d756f253f8ced44d8a054fa229da4b3cce896a;p=gem5.git diff --git a/base/statistics.cc b/base/statistics.cc index 78012bff7..eaefd5f15 100644 --- a/base/statistics.cc +++ b/base/statistics.cc @@ -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 @@ -37,12 +37,12 @@ #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;