diff options
Diffstat (limited to 'src/cpu')
-rw-r--r-- | src/cpu/simple/base.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/cpu/simple/base.cc b/src/cpu/simple/base.cc index d6b124efc..9fc1d1dd9 100644 --- a/src/cpu/simple/base.cc +++ b/src/cpu/simple/base.cc @@ -428,11 +428,10 @@ void BaseSimpleCPU::postExecute() { #if FULL_SYSTEM - if (thread->profile) { + if (thread->profile && curStaticInst) { bool usermode = TheISA::inUserMode(tc); thread->profilePC = usermode ? 1 : thread->readPC(); - StaticInstPtr si(inst, thread->readPC()); - ProfileNode *node = thread->profile->consume(tc, si); + ProfileNode *node = thread->profile->consume(tc, curStaticInst); if (node) thread->profileNode = node; } |