From 0b3897fc90901953e9d016466c37ab507f85023c Mon Sep 17 00:00:00 2001 From: Anthony Gutierrez Date: Wed, 15 Aug 2012 10:38:08 -0400 Subject: O3,ARM: fix some problems with drain/switchout functionality and add Drain DPRINTFs This patch fixes some problems with the drain/switchout functionality for the O3 cpu and for the ARM ISA and adds some useful debug print statements. This is an incremental fix as there are still a few bugs/mem leaks with the switchout code. Particularly when switching from an O3CPU to a TimingSimpleCPU. However, when switching from O3 to O3 cores with the ARM ISA I haven't encountered any more assertion failures; now the kernel will typically panic inside of simulation. --- src/dev/copy_engine.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/dev/copy_engine.cc') diff --git a/src/dev/copy_engine.cc b/src/dev/copy_engine.cc index 809649718..bb15abab6 100644 --- a/src/dev/copy_engine.cc +++ b/src/dev/copy_engine.cc @@ -49,6 +49,7 @@ #include "base/cp_annotate.hh" #include "base/trace.hh" #include "debug/DMACopyEngine.hh" +#include "debug/Drain.hh" #include "dev/copy_engine.hh" #include "mem/packet.hh" #include "mem/packet_access.hh" @@ -638,7 +639,7 @@ bool CopyEngine::CopyEngineChannel::inDrain() { if (ce->getState() == SimObject::Draining) { - DPRINTF(DMACopyEngine, "processing drain\n"); + DPRINTF(Drain, "CopyEngine done draining, processing drain event\n"); assert(drainEvent); drainEvent->process(); drainEvent = NULL; @@ -655,7 +656,7 @@ CopyEngine::CopyEngineChannel::drain(Event *de) unsigned int count = 1; count += cePort.drain(de); - DPRINTF(DMACopyEngine, "unable to drain, returning %d\n", count); + DPRINTF(Drain, "CopyEngineChannel not drained\n"); drainEvent = de; return count; } @@ -673,7 +674,7 @@ CopyEngine::drain(Event *de) else changeState(Drained); - DPRINTF(DMACopyEngine, "call to CopyEngine::drain() returning %d\n", count); + DPRINTF(Drain, "CopyEngine not drained\n"); return count; } -- cgit v1.2.3