summaryrefslogtreecommitdiff
path: root/src/python/m5/__init__.py
diff options
context:
space:
mode:
authorNathan Binkert <binkertn@umich.edu>2007-03-06 22:16:18 -0800
committerNathan Binkert <binkertn@umich.edu>2007-03-06 22:16:18 -0800
commit21391d494cf138f390e57dc0e34512f9ee2fac8e (patch)
tree98f27ae97e1ba8b883ff6ab24f636537b1009b58 /src/python/m5/__init__.py
parent44f91bb4443ed55a8e75096f1a821fd7605b7771 (diff)
downloadgem5-21391d494cf138f390e57dc0e34512f9ee2fac8e.tar.xz
Cleanup
--HG-- extra : convert_revision : 31f1b0f760a6eb861652440f9d42aaf123ef4833
Diffstat (limited to 'src/python/m5/__init__.py')
-rw-r--r--src/python/m5/__init__.py20
1 files changed, 6 insertions, 14 deletions
diff --git a/src/python/m5/__init__.py b/src/python/m5/__init__.py
index 6eac7b6d7..06dc92bc6 100644
--- a/src/python/m5/__init__.py
+++ b/src/python/m5/__init__.py
@@ -187,17 +187,17 @@ def restoreCheckpoint(root, dir):
need_resume.append(root)
def changeToAtomic(system):
- if not isinstance(system, objects.Root) and not isinstance(system, objects.System):
- raise TypeError, "Object is not a root or system object. Checkpoint must be "
- "called on a root object."
+ if not isinstance(system, (objects.Root, objects.System)):
+ raise TypeError, "Parameter of type '%s'. Must be type %s or %s." % \
+ (type(system), objects.Root, objects.System)
doDrain(system)
print "Changing memory mode to atomic"
system.changeTiming(internal.sim_object.SimObject.Atomic)
def changeToTiming(system):
- if not isinstance(system, objects.Root) and not isinstance(system, objects.System):
- raise TypeError, "Object is not a root or system object. Checkpoint must be "
- "called on a root object."
+ if not isinstance(system, (objects.Root, objects.System)):
+ raise TypeError, "Parameter of type '%s'. Must be type %s or %s." % \
+ (type(system), objects.Root, objects.System)
doDrain(system)
print "Changing memory mode to timing"
system.changeTiming(internal.sim_object.SimObject.Timing)
@@ -238,14 +238,6 @@ def switchCpus(cpuList):
new_cpu._ccObject.resume()
index += 1
-def dumpStats():
- print 'Dumping stats'
- internal.stats.dump()
-
-def resetStats():
- print 'Resetting stats'
- internal.stats.reset()
-
# Since we have so many mutual imports in this package, we should:
# 1. Put all intra-package imports at the *bottom* of the file, unless
# they're absolutely needed before that (for top-level statements