From: Gabe Black Date: Wed, 6 Nov 2019 22:17:45 +0000 (-0800) Subject: cpu: Fix a bug in getCurrentInstCount in the checker CPU. X-Git-Tag: v19.0.0.0~316 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f41045ef75a391286c32069c8474fb2a0cc66f72;p=gem5.git cpu: Fix a bug in getCurrentInstCount in the checker CPU. An earlier change accidentally left out the actualTC-> prefix in the getCurrentInstCount method which was supposed to delegate the call to another thread context. Without that, it just called itself and would infinitely recurse. This bug was pointed out in email by Robert Henry. Change-Id: Ibf1fee6b48ff87790309c6d435bd76fa95c6cab9 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22623 Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power Tested-by: kokoro --- diff --git a/src/cpu/checker/thread_context.hh b/src/cpu/checker/thread_context.hh index 347c4bab6..dbdfa80cd 100644 --- a/src/cpu/checker/thread_context.hh +++ b/src/cpu/checker/thread_context.hh @@ -102,7 +102,11 @@ class CheckerThreadContext : public ThreadContext { actualTC->descheduleInstCountEvent(event); } - Tick getCurrentInstCount() override { return getCurrentInstCount(); } + Tick + getCurrentInstCount() override + { + return actualTC->getCurrentInstCount(); + } BaseCPU *getCpuPtr() override { return actualTC->getCpuPtr(); }