From a2a8dac5c2a26e91432415f409b55f04cff9c2e4 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Mon, 14 Oct 2019 15:31:26 -0700 Subject: cpu: Access inst events through ThreadContext instead of the CPU. Also delete the CPU interface. Change-Id: I62a6b0a9a303d672f4083bdedf393f9f6d07331f Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22109 Reviewed-by: Andreas Sandberg Maintainer: Andreas Sandberg Tested-by: kokoro --- src/cpu/o3/cpu.cc | 2 +- src/cpu/o3/probe/elastic_trace.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/cpu/o3') diff --git a/src/cpu/o3/cpu.cc b/src/cpu/o3/cpu.cc index e49d4997e..bb3f0c301 100644 --- a/src/cpu/o3/cpu.cc +++ b/src/cpu/o3/cpu.cc @@ -1521,7 +1521,7 @@ FullO3CPU::instDone(ThreadID tid, const DynInstPtr &inst) system->totalNumInsts++; // Check for instruction-count-based events. - serviceInstCountEvents(tid, thread[tid]->numInst); + thread[tid]->tc->serviceInstCountEvents(thread[tid]->numInst); } thread[tid]->numOp++; thread[tid]->numOps++; diff --git a/src/cpu/o3/probe/elastic_trace.cc b/src/cpu/o3/probe/elastic_trace.cc index 586688600..3e98e5a19 100644 --- a/src/cpu/o3/probe/elastic_trace.cc +++ b/src/cpu/o3/probe/elastic_trace.cc @@ -109,8 +109,8 @@ ElasticTrace::regProbeListeners() } else { // Schedule an event to register all elastic trace probes when // specified no. of instructions are committed. - cpu->scheduleInstCountEvent( - 0, ®EtraceListenersEvent, startTraceInst); + cpu->getContext(0)->scheduleInstCountEvent( + ®EtraceListenersEvent, startTraceInst); } } -- cgit v1.2.3