summaryrefslogtreecommitdiff
path: root/src/python
diff options
context:
space:
mode:
authorAndrew Lukefahr <lukefahr@umich.edu>2014-10-11 15:02:22 -0500
committerAndrew Lukefahr <lukefahr@umich.edu>2014-10-11 15:02:22 -0500
commitf94fd44991ce51dd7f24364cac1ba060bf24e02d (patch)
tree6af35e1d9c40a6f37307a1ec586ad52720343670 /src/python
parent2816521f0d56ac6869454b7e8369971e0b6cc8d7 (diff)
downloadgem5-f94fd44991ce51dd7f24364cac1ba060bf24e02d.tar.xz
sim: draining bug for fast-forwaring multiple cores
fix draining bug where multiple cores hit max_insts_any_thread simultaneously Committed by: Nilay Vaish <nilay@cs.wisc.edu>
Diffstat (limited to 'src/python')
-rw-r--r--src/python/m5/simulate.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/python/m5/simulate.py b/src/python/m5/simulate.py
index 8529a7472..5673e26c7 100644
--- a/src/python/m5/simulate.py
+++ b/src/python/m5/simulate.py
@@ -184,7 +184,11 @@ def drain(root):
# If we've got some objects that can't drain immediately, then simulate
if unready_objs > 0:
dm.setCount(unready_objs)
- simulate()
+ #WARNING: if a valid exit event occurs while draining, it will not
+ # get returned to the user script
+ exit_event = simulate()
+ while exit_event.getCause() != 'Finished drain':
+ exit_event = simulate()
else:
all_drained = True
internal.drain.cleanupDrainManager(dm)