For SimpleCPU profiling code, only update the exec context's
authorNathan Binkert <binkertn@umich.edu>
Sun, 20 Nov 2005 22:55:11 +0000 (17:55 -0500)
committerNathan Binkert <binkertn@umich.edu>
Sun, 20 Nov 2005 22:55:11 +0000 (17:55 -0500)
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

cpu/simple/cpu.cc

index 862fe5b2c9890176c29f6f3b6697b64e6c59404c..d352d8c03fa0c5401b19607613134027ee1a256d 100644 (file)
@@ -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