36 ifListening(params.start_listening),
37 globalInstTracker(params.global_inst_tracker)
50 DPRINTF(InstTracker,
"Start listening to RetiredInsts\n");
71 panic_if(!_ifRemoved,
"Failed to remove listener");
72 if (_listener !=
nullptr) {
74 DPRINTF(InstTracker,
"Deleted Listener pointer\n");
78 DPRINTF(InstTracker,
"Stop listening to RetiredInsts\n");
86 for (
const auto &threshold :
params.inst_thresholds) {
88 DPRINTF(InstTracker,
"adding the instruction threshold\n"
89 "instThreshold = %lu\n", threshold);
91 DPRINTF(InstTracker,
"instThresholdSet size = %lu\n",
100 DPRINTF(InstTracker,
"Instruction count reached the threshold\n"
std::unordered_set< uint64_t > instThresholdSet
a set of thresholds for the number of instructions that should be executed before the simulation exit...
GlobalInstTracker(const GlobalInstTrackerParams ¶ms)
uint64_t instCount
the number of instructions that have been executed across all the cores
void updateAndCheckInstCount(const uint64_t &inst)
this function is called by the LocalInstTracker object to update the instruction count and check if t...
virtual void regProbeListeners()
setup the probelistener
bool ifListening
a boolean variable that determines if the LocalInstTracker is listening to the ProbePoints or not
GlobalInstTracker * globalInstTracker
the pointer to the GlobalInstTracker object.
void stopListening()
stop listening to the ProbePoints
LocalInstTracker(const LocalInstTrackerParams ¶ms)
ProbeListenerArg< LocalInstTracker, uint64_t > LocalInstTrackerListener
void retiredInstsHandler(const uint64_t &inst)
this function is called when the ProbePoint "RetiredInsts" is notified
This class is a minimal wrapper around SimObject.
ProbeManager * getProbeManager()
std::vector< ProbeListener * > listeners
bool removeListener(std::string point_name, ProbeListener &listener)
Remove a ProbeListener from the ProbePoint named by pointName.
Abstract superclass for simulation objects.
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
const Params & params() const
Copyright (c) 2024 Arm Limited All rights reserved.
void exitSimLoopNow(const std::string &message, int exit_code, Tick repeat, bool serialize)
Schedule an event as above, but make it high priority so it runs before any normal events which are s...