summaryrefslogtreecommitdiff
path: root/src/cpu/checker
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2019-11-06 14:17:45 -0800
committerGabe Black <gabeblack@google.com>2019-11-07 11:03:46 +0000
commitf41045ef75a391286c32069c8474fb2a0cc66f72 (patch)
tree9dbc314895a54c229c25db45423e61626dbdb636 /src/cpu/checker
parent8ef9d3211e6ea10da15c69a6e42f0850cb016240 (diff)
downloadgem5-f41045ef75a391286c32069c8474fb2a0cc66f72.tar.xz
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 <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'src/cpu/checker')
-rw-r--r--src/cpu/checker/thread_context.hh6
1 files changed, 5 insertions, 1 deletions
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(); }