simulate.py (6654:4c84e771cca7) simulate.py (6977:039202aafc0d)
1# Copyright (c) 2005 The Regents of The University of Michigan
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

--- 134 unchanged lines hidden (view full) ---

143 print "Writing checkpoint"
144 internal.core.serializeAll(dir)
145 resume(root)
146
147def restoreCheckpoint(root, dir):
148 print "Restoring from checkpoint"
149 internal.core.unserializeAll(dir)
150 need_resume.append(root)
1# Copyright (c) 2005 The Regents of The University of Michigan
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

--- 134 unchanged lines hidden (view full) ---

143 print "Writing checkpoint"
144 internal.core.serializeAll(dir)
145 resume(root)
146
147def restoreCheckpoint(root, dir):
148 print "Restoring from checkpoint"
149 internal.core.unserializeAll(dir)
150 need_resume.append(root)
151 stats.reset()
151
152def changeToAtomic(system):
153 if not isinstance(system, (objects.Root, objects.System)):
154 raise TypeError, "Parameter of type '%s'. Must be type %s or %s." % \
155 (type(system), objects.Root, objects.System)
156 if system.getMemoryMode() != objects.params.atomic:
157 doDrain(system)
158 print "Changing memory mode to atomic"

--- 34 unchanged lines hidden ---
152
153def changeToAtomic(system):
154 if not isinstance(system, (objects.Root, objects.System)):
155 raise TypeError, "Parameter of type '%s'. Must be type %s or %s." % \
156 (type(system), objects.Root, objects.System)
157 if system.getMemoryMode() != objects.params.atomic:
158 doDrain(system)
159 print "Changing memory mode to atomic"

--- 34 unchanged lines hidden ---