summaryrefslogtreecommitdiff
path: root/sim/sim_object.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sim/sim_object.cc')
-rw-r--r--sim/sim_object.cc19
1 files changed, 17 insertions, 2 deletions
diff --git a/sim/sim_object.cc b/sim/sim_object.cc
index 818648b98..559415102 100644
--- a/sim/sim_object.cc
+++ b/sim/sim_object.cc
@@ -61,14 +61,29 @@ namespace Stats {
//
// SimObject constructor: used to maintain static simObjectList
//
+SimObject::SimObject(Params *p)
+ : _params(p)
+{
+#ifdef DEBUG
+ doDebugBreak = false;
+#endif
+
+ doRecordEvent = !Stats::event_ignore.match(name());
+ simObjectList.push_back(this);
+}
+
+//
+// SimObject constructor: used to maintain static simObjectList
+//
SimObject::SimObject(const string &_name)
- : objName(_name)
+ : _params(new Params)
{
+ _params->name = _name;
#ifdef DEBUG
doDebugBreak = false;
#endif
- doRecordEvent = !Stats::event_ignore.match(_name);
+ doRecordEvent = !Stats::event_ignore.match(name());
simObjectList.push_back(this);
}