MinorCPU fix for corrupt numCycles when resuming from a previous simulation.
---
src/cpu/minor/cpu.cc | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
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;
DPRINTF(MinorCPU, "MinorCPU takeOverFrom\n");
BaseCPU::takeOverFrom(old_cpu);
-
- /* Don't think I need to do anything here */
}
void