Andreas Sandberg has submitted this change and it was merged. ( https://gem5-review.googlesource.com/3964 )

Change subject: sim: Fix clashing stat names in TickedObject and Ticked
......................................................................

sim: Fix clashing stat names in TickedObject and Ticked

Change tickCycles numCycles stat name to totalTickCycles os as not to
clash with the name of the tickCycles stat of the same class.
Declared the params passed to the TickedObject constructer as const.
Call ClockedObject::regStats() from the TickedObject::regStats to
ensure the correct initialization of the base class (ClockedObject)
stats

Change-Id: I6cf5bbe10fa27f2ad0e31d9f70ec3be47fe41455
Signed-off-by: Andreas Sandberg <andreas.sandb...@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/3964
Reviewed-by: Jason Lowe-Power <ja...@lowepower.com>
Maintainer: Jason Lowe-Power <ja...@lowepower.com>
---
M src/sim/ticked_object.cc
M src/sim/ticked_object.hh
2 files changed, 6 insertions(+), 5 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
  Andreas Sandberg: Looks good to me, approved



diff --git a/src/sim/ticked_object.cc b/src/sim/ticked_object.cc
index 4cd0dc1..a9f3ace 100644
--- a/src/sim/ticked_object.cc
+++ b/src/sim/ticked_object.cc
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2014 ARM Limited
+ * Copyright (c) 2013-2014, 2017 ARM Limited
  * All rights reserved
  *
  * The license below extends only to copyright in the software and shall
@@ -60,7 +60,7 @@
 {
     if (numCyclesLocal) {
         numCycles
-            .name(object.name() + ".tickCycles")
+            .name(object.name() + ".totalTickCycles")
.desc("Number of cycles that the object ticked or was stopped");
     }

@@ -98,7 +98,7 @@
     lastStopped = Cycles(lastStoppedUint);
 }

-TickedObject::TickedObject(TickedObjectParams *params,
+TickedObject::TickedObject(const TickedObjectParams *params,
     Event::Priority priority) :
     ClockedObject(params),
     /* Make numCycles in Ticked */
@@ -109,6 +109,7 @@
 TickedObject::regStats()
 {
     Ticked::regStats();
+    ClockedObject::regStats();
 }

 void
diff --git a/src/sim/ticked_object.hh b/src/sim/ticked_object.hh
index d8b69a3..3ba0045 100644
--- a/src/sim/ticked_object.hh
+++ b/src/sim/ticked_object.hh
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2014 ARM Limited
+ * Copyright (c) 2013-2014, 2017 ARM Limited
  * All rights reserved
  *
  * The license below extends only to copyright in the software and shall
@@ -190,7 +190,7 @@
 class TickedObject : public ClockedObject, public Ticked
 {
   public:
-    TickedObject(TickedObjectParams *params,
+    TickedObject(const TickedObjectParams *params,
         Event::Priority priority = Event::CPU_Tick_Pri);

     /** Disambiguate to make these functions overload correctly */

--
To view, visit https://gem5-review.googlesource.com/3964
To unsubscribe, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I6cf5bbe10fa27f2ad0e31d9f70ec3be47fe41455
Gerrit-Change-Number: 3964
Gerrit-PatchSet: 2
Gerrit-Owner: Andreas Sandberg <andreas.sandb...@arm.com>
Gerrit-Reviewer: Andreas Sandberg <andreas.sandb...@arm.com>
Gerrit-Reviewer: Jason Lowe-Power <ja...@lowepower.com>
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to