summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bardsley <Andrew.Bardsley@arm.com>2014-05-09 18:58:48 -0400
committerAndrew Bardsley <Andrew.Bardsley@arm.com>2014-05-09 18:58:48 -0400
commitf5c3f60601c8877196f11f8fc7f79d57e9775426 (patch)
treee29837958a2c285bff0e00ecba73fd12df60dca2
parentbf78299f04f0a99a72a4a2977777ee67877784cb (diff)
downloadgem5-f5c3f60601c8877196f11f8fc7f79d57e9775426.tar.xz
cpu: Useful getters for ActivityRecorder
Add some useful getters to ActivityRecorder
-rw-r--r--src/cpu/activity.hh11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/cpu/activity.hh b/src/cpu/activity.hh
index 7913bf5e7..f8d57f1af 100644
--- a/src/cpu/activity.hh
+++ b/src/cpu/activity.hh
@@ -71,8 +71,14 @@ class ActivityRecorder
/** Deactivates a stage. */
void deactivateStage(const int idx);
+ /** Returns the activity status of a stage. */
+ bool getStageActive(const int idx) const { return stageActive[idx]; }
+
+ /** Returns the number of stages. */
+ int getNumStages() const { return numStages; }
+
/** Returns how many things are active within the recorder. */
- int getActivityCount() { return activityCount; }
+ int getActivityCount() const { return activityCount; }
/** Sets the count to a starting value. Can be used to disable
* the idling option.
@@ -94,10 +100,11 @@ class ActivityRecorder
*/
void validate();
+ const std::string &name() const { return _name; }
+
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