changeset 16ceeed96e1c in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=16ceeed96e1c
description:
        cpu: fix lastStopped unserialisation

        MinorCPU fix for corrupt numCycles when resuming from a previous 
simulation.
        ---
         src/cpu/minor/cpu.cc | 7 +++++--
         1 file changed, 5 insertions(+), 2 deletions(-)

diffstat:

 src/cpu/minor/cpu.cc |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (24 lines):

diff -r e0cbca57e1e9 -r 16ceeed96e1c src/cpu/minor/cpu.cc
--- a/src/cpu/minor/cpu.cc      Fri May 27 16:54:59 2016 +0100
+++ b/src/cpu/minor/cpu.cc      Fri May 27 16:55:01 2016 +0100
@@ -227,6 +227,11 @@
 void
 MinorCPU::drainResume()
 {
+    /* When taking over from another cpu make sure lastStopped
+     * is reset since it might have not been defined previously
+     * and might lead to a stats corruption */
+    pipeline->resetLastStopped();
+
     if (switchedOut()) {
         DPRINTF(Drain, "drainResume while switched out.  Ignoring\n");
         return;
@@ -268,8 +273,6 @@
     DPRINTF(MinorCPU, "MinorCPU takeOverFrom\n");
 
     BaseCPU::takeOverFrom(old_cpu);
-
-    /* Don't think I need to do anything here */
 }
 
 void
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to