From: Andrew Lukefahr Date: Sat, 11 Oct 2014 20:02:22 +0000 (-0500) Subject: sim: draining bug for fast-forwaring multiple cores X-Git-Tag: stable_2014_12_14 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f94fd44991ce51dd7f24364cac1ba060bf24e02d;p=gem5.git sim: draining bug for fast-forwaring multiple cores fix draining bug where multiple cores hit max_insts_any_thread simultaneously Committed by: Nilay Vaish --- 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)