diff options
author | Nathan Binkert <nate@binkert.org> | 2009-01-21 14:56:18 -0800 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2009-01-21 14:56:18 -0800 |
commit | 10fc45da27f0c18c1a8b90af3d76127fc4467391 (patch) | |
tree | 47cc264e2316fe21adeb043a77cef792a43993d8 /src/cpu/activity.hh | |
parent | dbac448b088eea12d8b20400c7a770e57e28d771 (diff) | |
download | gem5-10fc45da27f0c18c1a8b90af3d76127fc4467391.tar.xz |
o3cpu: give a name to the activity recorder for better tracing
Diffstat (limited to 'src/cpu/activity.hh')
-rw-r--r-- | src/cpu/activity.hh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/cpu/activity.hh b/src/cpu/activity.hh index e99927339..d75ff150e 100644 --- a/src/cpu/activity.hh +++ b/src/cpu/activity.hh @@ -49,9 +49,11 @@ * idle. If count is zero, then the CPU can safely idle as it has no * more outstanding work to do. */ -class ActivityRecorder { +class ActivityRecorder +{ public: - ActivityRecorder(int num_stages, int longest_latency, int count); + ActivityRecorder(const std::string &name, int num_stages, + int longest_latency, int count); /** Records that there is activity this cycle. */ void activity(); @@ -92,6 +94,10 @@ class ActivityRecorder { void validate(); private: + // provide name() for DPRINTF. + std::string _name; + const std::string &name() { return _name; } + /** Time buffer that tracks if any cycles has active communication * in them. It should be as long as the longest communication * latency in the system. Each time any time buffer is written, |