Review Board 2.0.15


sim: make Python Root object a singleton

Review Request #26 - Created June 27, 2010 and submitted

Information
Steve Reinhardt
gem5
Reviewers
Default
sim: make Python Root object a singleton
Enforce that the Python Root SimObject is instantiated only
once.  The C++ Root object already panics if more than one is
created.  This change avoids the need to track what the root
object is, since it's available from Root.getInstance() (if it
exists).  It's now redundant to have the user pass the root
object to functions like instantiate(), checkpoint(), and
restoreCheckpoint(), so that arg is gone.  Users who use
configs/common/Simulate.py should not notice.

   
Review request changed
Updated (July 29, 2010, 2:32 p.m.)

Description:

   

sim: make Python Root object a singleton

~   Enforce that the Python Root SimObject is instantiated only once.
~   The C++ Root object already panics if more than one is created.
~   This change avoids the need to track what the root object
~   is, since it's available from Root._getInstance() (if it exists).
~   It's now redundant to have the user pass the root object
~   to functions like instantiate() (though for backwards compatibility
~   we continue to support this for now with a warning).

  ~ Enforce that the Python Root SimObject is instantiated only
  ~ once. The C++ Root object already panics if more than one is
  ~ created. This change avoids the need to track what the root
  ~ object is, since it's available from Root.getInstance() (if it
  ~ exists). It's now redundant to have the user pass the root
  ~ object to functions like instantiate(), checkpoint(), and
  ~ restoreCheckpoint(), so that arg is gone. Users who use
  + configs/common/Simulate.py should not notice.

Ship it!
Posted (July 29, 2010, 2:55 p.m.)