34#include "debug/Activity.hh"
40 int longest_latency,
int activity)
41 : _name(
name), activityBuffer(longest_latency, 0),
42 longestLatency(longest_latency), activityCount(activity),
83 DPRINTF(Activity,
"No activity left!\n");
101 DPRINTF(Activity,
"Stage %i already active.\n", idx);
118 DPRINTF(Activity,
"Stage %i already inactive.\n", idx);
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 dump()
Debug function to dump the contents of the time buffer.
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 validate()
Debug function to ensure that the activity count matches the contents of the time buffer.
void reset()
Clears the time buffer and the activity count.
void activity()
Records that there is activity this cycle.
bool * stageActive
Records which stages are active/inactive.
ActivityRecorder(const std::string &name, int num_stages, int longest_latency, int count)
void deactivateStage(const int idx)
Deactivates a stage.
TimeBuffer< bool > activityBuffer
Time buffer that tracks if any cycles has active communication in them.
void activateStage(const int idx)
Marks a stage as active.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
void cprintf(const char *format, const Args &...args)
const std::string & name()