36 #include "debug/Activity.hh"
41 int longest_latency,
int activity)
42 : _name(name), activityBuffer(longest_latency, 0),
43 longestLatency(longest_latency), activityCount(activity),
84 DPRINTF(Activity,
"No activity left!\n");
102 DPRINTF(Activity,
"Stage %i already active.\n", idx);
119 DPRINTF(Activity,
"Stage %i already inactive.\n", idx);
const std::string & name()
void validate()
Debug function to ensure that the activity count matches the contents of the time buffer...
TimeBuffer< bool > activityBuffer
Time buffer that tracks if any cycles has active communication in them.
bool * stageActive
Records which stages are active/inactive.
int activityCount
Tracks how many stages and cycles of time buffer have activity.
int numStages
Number of stages that can be marked as active or inactive.
void activity()
Records that there is activity this cycle.
void reset()
Clears the time buffer and the activity count.
ActivityRecorder(const std::string &name, int num_stages, int longest_latency, int count)
void deactivateStage(const int idx)
Deactivates a stage.
void dump()
Debug function to dump the contents of the time buffer.
void activateStage(const int idx)
Marks a stage as active.
int longestLatency
Longest latency time buffer in the CPU.
void advance()
Advances the activity buffer, decrementing the activityCount if active communication just left the ti...
void cprintf(const char *format, const Args &...args)