cpu: Get rid of the serviceInstCountEvents method.
This was useful when transitioning away from the CPU based comInstEventQueue, but now that objects backing the ThreadContexts have access to the underlying comInstEventQueue and can manipulate it directly, they don't need to do so through a generic interface. Getting rid of this function narrows and simplifies the interface. Change-Id: I202d466d266551675ef6792d38c658d8a8f1cb8b Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22113 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -97,7 +97,6 @@ class ThreadContext : public ::ThreadContext
|
||||
bool remove(PCEvent *e) override { return false; }
|
||||
|
||||
Tick nextInstEventCount() override { return MaxTick; }
|
||||
void serviceInstCountEvents(Tick count) override {}
|
||||
void scheduleInstCountEvent(Event *event, Tick count) override {}
|
||||
void descheduleInstCountEvent(Event *event) override {}
|
||||
Tick getCurrentInstCount() override;
|
||||
|
||||
@@ -98,11 +98,6 @@ class CheckerThreadContext : public ThreadContext
|
||||
return actualTC->nextInstEventCount();
|
||||
}
|
||||
void
|
||||
serviceInstCountEvents(Tick count) override
|
||||
{
|
||||
actualTC->serviceInstCountEvents(count);
|
||||
}
|
||||
void
|
||||
scheduleInstCountEvent(Event *event, Tick count) override
|
||||
{
|
||||
actualTC->scheduleInstCountEvent(event, count);
|
||||
|
||||
@@ -686,7 +686,7 @@ BaseKvmCPU::tick()
|
||||
// Service any pending instruction events. The vCPU should
|
||||
// have exited in time for the event using the instruction
|
||||
// counter configured by setupInstStop().
|
||||
tc->serviceInstCountEvents(ctrInsts);
|
||||
thread->comInstEventQueue.serviceEvents(ctrInsts);
|
||||
|
||||
if (tryDrain())
|
||||
_status = Idle;
|
||||
|
||||
@@ -870,8 +870,7 @@ Execute::doInstCommitAccounting(MinorDynInstPtr inst)
|
||||
cpu.system->totalNumInsts++;
|
||||
|
||||
/* Act on events related to instruction counts */
|
||||
cpu.getContext(inst->id.threadId)->
|
||||
serviceInstCountEvents(thread->numInst);
|
||||
thread->comInstEventQueue.serviceEvents(thread->numInst);
|
||||
}
|
||||
thread->numOp++;
|
||||
thread->numOps++;
|
||||
|
||||
@@ -1521,7 +1521,7 @@ FullO3CPU<Impl>::instDone(ThreadID tid, const DynInstPtr &inst)
|
||||
system->totalNumInsts++;
|
||||
|
||||
// Check for instruction-count-based events.
|
||||
thread[tid]->tc->serviceInstCountEvents(thread[tid]->numInst);
|
||||
thread[tid]->comInstEventQueue.serviceEvents(thread[tid]->numInst);
|
||||
}
|
||||
thread[tid]->numOp++;
|
||||
thread[tid]->numOps++;
|
||||
|
||||
@@ -93,11 +93,6 @@ class O3ThreadContext : public ThreadContext
|
||||
MaxTick : thread->comInstEventQueue.nextTick();
|
||||
}
|
||||
void
|
||||
serviceInstCountEvents(Tick count) override
|
||||
{
|
||||
thread->comInstEventQueue.serviceEvents(count);
|
||||
}
|
||||
void
|
||||
scheduleInstCountEvent(Event *event, Tick count) override
|
||||
{
|
||||
thread->comInstEventQueue.schedule(event, count);
|
||||
|
||||
@@ -500,7 +500,7 @@ BaseSimpleCPU::preExecute()
|
||||
t_info.setMemAccPredicate(true);
|
||||
|
||||
// check for instruction-count-based events
|
||||
thread->getTC()->serviceInstCountEvents(t_info.numInst);
|
||||
thread->comInstEventQueue.serviceEvents(t_info.numInst);
|
||||
|
||||
// decode the instruction
|
||||
inst = gtoh(inst);
|
||||
|
||||
@@ -205,11 +205,6 @@ class SimpleThread : public ThreadState, public ThreadContext
|
||||
MaxTick : comInstEventQueue.nextTick();
|
||||
}
|
||||
void
|
||||
serviceInstCountEvents(Tick count) override
|
||||
{
|
||||
comInstEventQueue.serviceEvents(count);
|
||||
}
|
||||
void
|
||||
scheduleInstCountEvent(Event *event, Tick count) override
|
||||
{
|
||||
comInstEventQueue.schedule(event, count);
|
||||
|
||||
@@ -193,7 +193,6 @@ class ThreadContext : public PCEventScope
|
||||
virtual EndQuiesceEvent *getQuiesceEvent() = 0;
|
||||
|
||||
virtual Tick nextInstEventCount() = 0;
|
||||
virtual void serviceInstCountEvents(Tick count) = 0;
|
||||
virtual void scheduleInstCountEvent(Event *event, Tick count) = 0;
|
||||
virtual void descheduleInstCountEvent(Event *event) = 0;
|
||||
virtual Tick getCurrentInstCount() = 0;
|
||||
|
||||
Reference in New Issue
Block a user