summaryrefslogtreecommitdiff
path: root/src/base/statistics.hh
diff options
context:
space:
mode:
authorAli Saidi <Ali.Saidi@ARM.com>2012-05-10 18:04:26 -0500
committerAli Saidi <Ali.Saidi@ARM.com>2012-05-10 18:04:26 -0500
commit413ba1fdaf666118c9a340d0c23c466f4b7d7fee (patch)
tree518724709eb3383ad66ea362a4ade55ccd294887 /src/base/statistics.hh
parentf6895e8bd46a1533c607fe528a2da68b64e722dc (diff)
downloadgem5-413ba1fdaf666118c9a340d0c23c466f4b7d7fee.tar.xz
stats: track if the stats have been enabled and prevent requesting master id
Track the point in the initialization where statistics have been registered. After this point registering new masterIds can no longer work as some SimObjects may have sized stats vectors based on the previous value. If someone tries to register a masterId after this point the simulator executes fatal().
Diffstat (limited to 'src/base/statistics.hh')
-rw-r--r--src/base/statistics.hh2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/base/statistics.hh b/src/base/statistics.hh
index 1f8a59326..cb63af708 100644
--- a/src/base/statistics.hh
+++ b/src/base/statistics.hh
@@ -3126,6 +3126,8 @@ sum(Temp val)
/** Dump all statistics data to the registered outputs */
void dump();
void reset();
+void enable();
+bool enabled();
/**
* Register a callback that should be called whenever statistics are