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/base.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/cpu/base.cc') diff --git a/src/cpu/base.cc b/src/cpu/base.cc index 7040cb7ea..e8927dfcd 100644 --- a/src/cpu/base.cc +++ b/src/cpu/base.cc @@ -314,8 +314,8 @@ BaseCPU::init() *counter = numThreads; for (ThreadID tid = 0; tid < numThreads; ++tid) { Event *event = new CountedExitEvent(cause, *counter); - scheduleInstCountEvent( - tid, event, params()->max_insts_all_threads); + threadContexts[tid]->scheduleInstCountEvent( + event, params()->max_insts_all_threads); } } @@ -725,7 +725,7 @@ BaseCPU::scheduleInstStop(ThreadID tid, Counter insts, const char *cause) const Tick now(getCurrentInstCount(tid)); Event *event(new LocalSimLoopExitEvent(cause, 0)); - scheduleInstCountEvent(tid, event, now + insts); + threadContexts[tid]->scheduleInstCountEvent(event, now + insts); } Tick -- cgit v1.2.3