diff options
author | Ali Saidi <Ali.Saidi@ARM.com> | 2014-10-29 23:18:26 -0500 |
---|---|---|
committer | Ali Saidi <Ali.Saidi@ARM.com> | 2014-10-29 23:18:26 -0500 |
commit | b31d9e93e2744b044d7ccc2d9113bc367038e14f (patch) | |
tree | 7ca7fd7caabb154373af00c762886d8e149a4506 /src/mem | |
parent | baf88e908d285191c13b5e96c16065957e5af7a6 (diff) | |
download | gem5-b31d9e93e2744b044d7ccc2d9113bc367038e14f.tar.xz |
arm, mem: Fix drain bug and provide drain prints for more components.
Diffstat (limited to 'src/mem')
-rw-r--r-- | src/mem/cache/mshr_queue.cc | 3 | ||||
-rw-r--r-- | src/mem/dram_ctrl.cc | 2 | ||||
-rw-r--r-- | src/mem/simple_mem.cc | 5 |
3 files changed, 9 insertions, 1 deletions
diff --git a/src/mem/cache/mshr_queue.cc b/src/mem/cache/mshr_queue.cc index 7bfbb90f5..9146cddf7 100644 --- a/src/mem/cache/mshr_queue.cc +++ b/src/mem/cache/mshr_queue.cc @@ -45,7 +45,9 @@ * Definition of MSHRQueue class functions. */ +#include "base/trace.hh" #include "mem/cache/mshr_queue.hh" +#include "debug/Drain.hh" using namespace std; @@ -191,6 +193,7 @@ MSHRQueue::deallocateOne(MSHR *mshr) if (drainManager && allocated == 0) { // Notify the drain manager that we have completed draining if // there are no other outstanding requests in this MSHR queue. + DPRINTF(Drain, "MSHRQueue now empty, signalling drained\n"); drainManager->signalDrainDone(); drainManager = NULL; setDrainState(Drainable::Drained); diff --git a/src/mem/dram_ctrl.cc b/src/mem/dram_ctrl.cc index f65f7e1dd..1beebdd01 100644 --- a/src/mem/dram_ctrl.cc +++ b/src/mem/dram_ctrl.cc @@ -737,6 +737,7 @@ DRAMCtrl::processRespondEvent() // if there is nothing left in any queue, signal a drain if (writeQueue.empty() && readQueue.empty() && drainManager) { + DPRINTF(Drain, "DRAM controller done draining\n"); drainManager->signalDrainDone(); drainManager = NULL; } @@ -1290,6 +1291,7 @@ DRAMCtrl::processNextReqEvent() } else { // check if we are drained if (respQueue.empty () && drainManager) { + DPRINTF(Drain, "DRAM controller done draining\n"); drainManager->signalDrainDone(); drainManager = NULL; } diff --git a/src/mem/simple_mem.cc b/src/mem/simple_mem.cc index 27d3f1186..4e1020de5 100644 --- a/src/mem/simple_mem.cc +++ b/src/mem/simple_mem.cc @@ -44,6 +44,7 @@ #include "base/random.hh" #include "mem/simple_mem.hh" +#include "debug/Drain.hh" using namespace std; @@ -200,6 +201,7 @@ SimpleMemory::dequeue() reschedule(dequeueEvent, std::max(packetQueue.front().tick, curTick()), true); } else if (drainManager) { + DPRINTF(Drain, "Drainng of SimpleMemory complete\n"); drainManager->signalDrainDone(); drainManager = NULL; } @@ -240,7 +242,8 @@ SimpleMemory::drain(DrainManager *dm) if (!packetQueue.empty()) { count += 1; drainManager = dm; - } + DPRINTF(Drain, "SimpleMemory Queue has requests, waiting to drain\n"); + } if (count) setDrainState(Drainable::Draining); |