45 for (
int i = 0;
i <
params.bb_excluded_addr_ranges.size();
i++) {
48 params.bb_excluded_addr_ranges[
i].start(),
49 params.bb_excluded_addr_ranges[
i].end()
53 params.bb_excluded_addr_ranges[
i].start(),
54 params.bb_excluded_addr_ranges[
i].end()
161 if (pcstate.npc() <
pc) {
179 "Start listening to the RetiredInstsPC\n");
201 LooppointAnalysisManagerParams &
params)
The AddrRange class encapsulates an address range, and supports a number of tests to check if two ran...
virtual bool inUserMode() const =0
void updateGlobalBBV(const Addr pc)
This function is called by the LooppointAnalysis probe listener when it reaches the branch instructio...
Addr mostRecentBackwardBranchPC
This variable stores the Program Counter address of the most recent valid backward branch that we con...
std::unordered_map< Addr, uint64_t > backwardBranchCounter
This counter is for the valid backward branches that we consider as candidates for marking the execut...
void countBackwardBranch(const Addr pc)
This function is called by the LooppointAnalysis probe listener when it finds a valid backward branch...
uint64_t globalInstCounter
This is a counter for the globally executed instructions.
std::unordered_map< Addr, uint64_t > globalBBV
This is the global basic block vector that contains the count of each basic block that is executed.
LooppointAnalysisManager(const LooppointAnalysisManagerParams ¶ms)
uint64_t regionLength
This variable stores the number of instructions that we used to define a region.
std::vector< AddrRange > bbExcludedAddrRanges
Any basic block that is in this range will not be analyzed.
virtual void regProbeListeners()
Register probe listeners for this object.
void stopListening()
When this function is called, it sets the class variable ifListening to false, then removes the probe...
AddrRange markerValidAddrRange
We only consider the loops within this address range as candidates for marking the execution points.
void updateLocalBBV(const Addr pc)
This function updates the localBBV for the input PC's basic block.
uint64_t bbInstCounter
The counter for the number of instructions within the current basic block.
LooppointAnalysisManager * lpaManager
This is the pointer to the LooppointAnalysisManager SimObject that is managing all the LooppointAnaly...
LooppointAnalysis(const LooppointAnalysisParams ¶ms)
std::unordered_map< Addr, uint64_t > localBBV
The basic block vector for the current core that the LooppointAnalysis is attached to.
bool ifListening
Only when this is set to true, the LooppointAnalysis will listen to the probe points.
AddrRange bbValidAddrRange
This is the valid address range for the basic block that the LooppointAnalysis considers analyzing.
void checkPc(const std::pair< SimpleThread *, StaticInstPtr > &inst_pair)
This function is called when a the probe point notifies the LoopPointAnalysis probe listener.
void startListening()
When this function is called, it sets the class variable ifListening to true, then calls the regProbe...
std::vector< ProbeListenerPtr<> > listeners
ProbeListenerObject(const ProbeListenerObjectParams ¶ms)
void connectListener(Args &&...args)
The SimpleThread object provides a combination of the ThreadState object and the ThreadContext interf...
ThreadContext * getTC()
Returns the pointer to this SimpleThread's ThreadContext.
BaseISA * getIsaPtr() const override
bool isDirectCtrl() const
bool isLastMicroop() const
virtual const PCStateBase & pcState() const =0
const Params & params() const
SimObject(const Params &p)
Copyright (c) 2024 Arm Limited All rights reserved.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
RefCountingPtr< StaticInst > StaticInstPtr
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...