diff options
author | Nathan Binkert <binkertn@umich.edu> | 2005-11-20 17:55:11 -0500 |
---|---|---|
committer | Nathan Binkert <binkertn@umich.edu> | 2005-11-20 17:55:11 -0500 |
commit | 6e6422ab22f867a49b1c59b3b2589cf6647dddee (patch) | |
tree | c29f567d887dbc7485a474ee1125c1b64599a384 | |
parent | 0dcb288365931b5b6c1048302c23656473fea1af (diff) | |
download | gem5-6e6422ab22f867a49b1c59b3b2589cf6647dddee.tar.xz |
For SimpleCPU profiling code, only update the exec context's
profileNode if we got a new one
cpu/simple/cpu.cc:
Only update the exec context's profileNode if we got a new one
--HG--
extra : convert_revision : a16a7410070b0d811032dc4b86b1368df913b2be
-rw-r--r-- | cpu/simple/cpu.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cpu/simple/cpu.cc b/cpu/simple/cpu.cc index 862fe5b2c..d352d8c03 100644 --- a/cpu/simple/cpu.cc +++ b/cpu/simple/cpu.cc @@ -764,7 +764,9 @@ SimpleCPU::tick() if (xc->profile) { bool usermode = (xc->regs.ipr[AlphaISA::IPR_DTB_CM] & 0x18) != 0; xc->profilePC = usermode ? 1 : xc->regs.pc; - xc->profileNode = xc->profile->consume(xc, inst); + ProfileNode *node = xc->profile->consume(xc, inst); + if (node) + xc->profileNode = node; } #endif |