stats: Silence unused power stats
authorAndreas Sandberg <andreas.sandberg@arm.com>
Mon, 6 Jun 2016 16:16:43 +0000 (17:16 +0100)
committerAndreas Sandberg <andreas.sandberg@arm.com>
Mon, 6 Jun 2016 16:16:43 +0000 (17:16 +0100)
The power stats are currently very noisy even if no power model has
been loaded. Silence stats that are either zero or nan.

Change-Id: I7d0220c2fcf01131084a219228f140cfaddaf95b
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
src/sim/clocked_object.cc

index 19495b9162d84604849af9f7da7dd979e2e90139..1af41feed90377438187d63018c54c03d6c6220f 100644 (file)
@@ -142,6 +142,7 @@ ClockedObject::regStats()
     numPwrStateTransitions
         .name(params()->name + ".numPwrStateTransitions")
         .desc("Number of power state transitions")
+        .flags(nozero)
         ;
 
     // Each sample is time in ticks
@@ -151,13 +152,14 @@ ClockedObject::regStats()
           (params()->p_state_clk_gate_max / num_bins))
         .name(params()->name + ".pwrStateClkGateDist")
         .desc("Distribution of time spent in the clock gated state")
-        .flags(pdf)
+        .flags(pdf | nozero | nonan)
         ;
 
     pwrStateResidencyTicks
         .init(Enums::PwrState::Num_PwrState)
         .name(params()->name + ".pwrStateResidencyTicks")
         .desc("Cumulative time (in ticks) in various power states")
+        .flags(nozero)
         ;
     for (int i = 0; i < Enums::PwrState::Num_PwrState; i++) {
         pwrStateResidencyTicks.subname(i, Enums::PwrStateStrings[i]);