cpu: add more debug flags
Change-Id: I4edd8f383294f76d3e76895d3a631cba21a45f90
This commit is contained in:
@@ -79,8 +79,16 @@ void
|
||||
LooppointAnalysis::checkPc(const std::pair<SimpleThread*,
|
||||
StaticInstPtr>& inst_pair)
|
||||
{
|
||||
SimpleThread* thread = inst_pair.first;
|
||||
const StaticInstPtr &inst = inst_pair.second;
|
||||
|
||||
if (inst->isMicroop() && !inst->isLastMicroop())
|
||||
{
|
||||
// ignore this if it is a microop
|
||||
return;
|
||||
}
|
||||
|
||||
SimpleThread* thread = inst_pair.first;
|
||||
|
||||
auto &pcstate =
|
||||
thread->getTC()->pcState().as<GenericISA::PCStateWithNext>();
|
||||
Addr pc = pcstate.pc();
|
||||
@@ -113,12 +121,6 @@ LooppointAnalysis::checkPc(const std::pair<SimpleThread*,
|
||||
return;
|
||||
}
|
||||
|
||||
if (inst->isMicroop() && !inst->isLastMicroop())
|
||||
{
|
||||
// ignore this if it is a microop
|
||||
return;
|
||||
}
|
||||
|
||||
lpaManager->updateEncountered(pc);
|
||||
// if we have not encountered this pc before, we should now update it to
|
||||
// the corresponding category
|
||||
@@ -195,9 +197,12 @@ LooppointAnalysis::regProbeListeners()
|
||||
{
|
||||
if (ifListening)
|
||||
{
|
||||
listeners.push_back(new looppointAnalysisListener(this,
|
||||
"Commit", &LooppointAnalysis::checkPc));
|
||||
DPRINTF(LooppointAnalysis, "Start listening to the RetiredInstsPC\n");
|
||||
if (listeners.size() == 0) {
|
||||
listeners.push_back(new looppointAnalysisListener(this,
|
||||
"Commit", &LooppointAnalysis::checkPc));
|
||||
DPRINTF(LooppointAnalysis,
|
||||
"Start listening to the RetiredInstsPC\n");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -250,6 +255,11 @@ LooppointAnalysisManager::countBackwardBranch(const Addr pc)
|
||||
// exit event.
|
||||
// we can reset the counters through the simulation script using
|
||||
// the helper functions in the LooppointAnalysisManager class
|
||||
DPRINTF(LooppointAnalysis, "simpoint starting point found\n");
|
||||
DPRINTF(LooppointAnalysis, "globalInstCounter = %lu\n",
|
||||
globalInstCounter);
|
||||
DPRINTF(LooppointAnalysis, "regionLength = %lu\n",
|
||||
regionLength);
|
||||
exitSimLoopNow("simpoint starting point found");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -287,6 +287,7 @@ class LooppointAnalysisManager: public SimObject
|
||||
void clearGlobalBBV()
|
||||
{
|
||||
globalBBV.clear();
|
||||
DPRINTF(LooppointAnalysis,"globalBBV is cleared\n");
|
||||
};
|
||||
|
||||
uint64_t getGlobalInstCounter() const
|
||||
@@ -297,6 +298,8 @@ class LooppointAnalysisManager: public SimObject
|
||||
void clearGlobalInstCounter()
|
||||
{
|
||||
globalInstCounter = 0;
|
||||
DPRINTF(LooppointAnalysis,"globalInstCounter is cleared\n current "
|
||||
"globalInstCounter = %lu\n", globalInstCounter);
|
||||
};
|
||||
|
||||
void incrementGlobalInstCounter()
|
||||
|
||||
Reference in New Issue
Block a user