This prevents having to access it from within the ThreadContext.
Change-Id: I34f5815a11201b8fc41871c18bdbbcd0f40305cf
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22102
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
int count = 0;
do {
oldpc = thread->instAddr();
- system->pcEventQueue.service(tc);
+ system->pcEventQueue.service(oldpc, tc);
count++;
} while (oldpc != thread->instAddr());
if (count > 1) {
Addr oldPC;
do {
oldPC = thread->instAddr();
- cpu.system->pcEventQueue.service(thread);
+ cpu.system->pcEventQueue.service(oldPC, thread);
num_pc_event_checks++;
} while (oldPC != thread->instAddr());
!thread[tid]->trapPending);
do {
oldpc = pc[tid].instAddr();
- cpu->system->pcEventQueue.service(thread[tid]->getTC());
+ cpu->system->pcEventQueue.service(
+ oldpc, thread[tid]->getTC());
count++;
} while (oldpc != pc[tid].instAddr());
if (count > 1) {
}
bool
-PCEventQueue::doService(ThreadContext *tc)
+PCEventQueue::doService(Addr pc, ThreadContext *tc)
{
- // This will fail to break on Alpha PALcode addresses, but that is
- // a rare use case.
- Addr pc = tc->instAddr();
+ // Using the raw PC address will fail to break on Alpha PALcode addresses,
+ // but that is a rare use case.
int serviced = 0;
range_t range = equal_range(pc);
for (iterator i = range.first; i != range.second; ++i) {
protected:
Map pcMap;
- bool doService(ThreadContext *tc);
+ bool doService(Addr pc, ThreadContext *tc);
public:
PCEventQueue();
bool remove(PCEvent *event) override;
bool schedule(PCEvent *event) override;
- bool service(ThreadContext *tc)
+ bool service(Addr pc, ThreadContext *tc)
{
if (pcMap.empty())
return false;
- return doService(tc);
+ return doService(pc, tc);
}
range_t equal_range(Addr pc);
Addr oldpc, pc = threadInfo[curThread]->thread->instAddr();
do {
oldpc = pc;
- system->pcEventQueue.service(threadContexts[curThread]);
+ system->pcEventQueue.service(oldpc, threadContexts[curThread]);
pc = threadInfo[curThread]->thread->instAddr();
} while (oldpc != pc);
}