changeset 6e89c756e1fb in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=6e89c756e1fb
description:
sim: Add additional debug information when draining
This patch adds some additional information when draining the system
which
allows the user to debug which SimObject(s) in the system is failing to
drain.
Only enabled for the builds with tracing enabled and is subject to the
Drain
debug flag being set at runtime.
diffstat:
src/sim/drain.cc | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diffs (29 lines):
diff -r a10d9e2ef671 -r 6e89c756e1fb src/sim/drain.cc
--- a/src/sim/drain.cc Fri Apr 01 16:22:44 2016 +0100
+++ b/src/sim/drain.cc Fri Dec 11 17:29:53 2015 +0000
@@ -43,6 +43,7 @@
#include "base/trace.hh"
#include "debug/Drain.hh"
#include "sim/sim_exit.hh"
+#include "sim/sim_object.hh"
DrainManager DrainManager::_instance;
@@ -67,8 +68,15 @@
DPRINTF(Drain, "Trying to drain %u objects.\n", drainableCount());
_state = DrainState::Draining;
- for (auto *obj : _allDrainable)
- _count += obj->dmDrain() == DrainState::Drained ? 0 : 1;
+ for (auto *obj : _allDrainable) {
+ DrainState status = obj->dmDrain();
+ if (DTRACE(Drain) && status != DrainState::Drained) {
+ SimObject *temp = dynamic_cast<SimObject*>(obj);
+ if (temp)
+ DPRINTF(Drain, "Failed to drain %s\n", temp->name());
+ }
+ _count += status == DrainState::Drained ? 0 : 1;
+ }
if (_count == 0) {
DPRINTF(Drain, "Drain done.\n");
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev