From: Andreas Sandberg Date: Tue, 7 Jul 2015 08:51:04 +0000 (+0100) Subject: python: Remove redundant drain when changing memory modes X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1dc5e63b889647a153f01351f560a3beaa41f293;p=gem5.git python: Remove redundant drain when changing memory modes When the Python helper code switches CPU models, it sometimes also needs to change the memory mode of the simulator. When this happens, it accidentally tried to drain the simulator despite having done so already. This changeset removes the redundant drain. --- diff --git a/src/python/m5/simulate.py b/src/python/m5/simulate.py index 5673e26c7..2aee677bd 100644 --- a/src/python/m5/simulate.py +++ b/src/python/m5/simulate.py @@ -224,7 +224,6 @@ def _changeMemoryMode(system, mode): raise TypeError, "Parameter of type '%s'. Must be type %s or %s." % \ (type(system), objects.Root, objects.System) if system.getMemoryMode() != mode: - drain(system) system.setMemoryMode(mode) else: print "System already in target mode. Memory mode unchanged."