O3 IEW: Make incrWb and decrWb clearer
[gem5.git] / src / cpu / activity.hh
index e99927339f4802bab9b72aa38fc50771820f8e0b..7913bf5e7f4fa7b6e1454e3b8317ee7a2a8a7f71 100644 (file)
@@ -31,8 +31,8 @@
 #ifndef __CPU_ACTIVITY_HH__
 #define __CPU_ACTIVITY_HH__
 
-#include "base/timebuf.hh"
 #include "base/trace.hh"
+#include "cpu/timebuf.hh"
 
 /**
  * ActivityRecorder helper class that informs the CPU if it can switch
  * 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);
+    ~ActivityRecorder();
 
     /** Records that there is activity this cycle. */
     void activity();
@@ -92,6 +95,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,