clocked_object.cc (11524:3101ce98c55c) | clocked_object.cc (11525:00ed0c11f4a3) |
---|---|
1/* 2 * Copyright (c) 2015-2016 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 128 unchanged lines hidden (view full) --- 137{ 138 SimObject::regStats(); 139 140 using namespace Stats; 141 142 numPwrStateTransitions 143 .name(params()->name + ".numPwrStateTransitions") 144 .desc("Number of power state transitions") | 1/* 2 * Copyright (c) 2015-2016 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 128 unchanged lines hidden (view full) --- 137{ 138 SimObject::regStats(); 139 140 using namespace Stats; 141 142 numPwrStateTransitions 143 .name(params()->name + ".numPwrStateTransitions") 144 .desc("Number of power state transitions") |
145 .flags(nozero) |
|
145 ; 146 147 // Each sample is time in ticks 148 unsigned num_bins = std::max(params()->p_state_clk_gate_bins, 10U); 149 pwrStateClkGateDist 150 .init(params()->p_state_clk_gate_min, params()->p_state_clk_gate_max, 151 (params()->p_state_clk_gate_max / num_bins)) 152 .name(params()->name + ".pwrStateClkGateDist") 153 .desc("Distribution of time spent in the clock gated state") | 146 ; 147 148 // Each sample is time in ticks 149 unsigned num_bins = std::max(params()->p_state_clk_gate_bins, 10U); 150 pwrStateClkGateDist 151 .init(params()->p_state_clk_gate_min, params()->p_state_clk_gate_max, 152 (params()->p_state_clk_gate_max / num_bins)) 153 .name(params()->name + ".pwrStateClkGateDist") 154 .desc("Distribution of time spent in the clock gated state") |
154 .flags(pdf) | 155 .flags(pdf | nozero | nonan) |
155 ; 156 157 pwrStateResidencyTicks 158 .init(Enums::PwrState::Num_PwrState) 159 .name(params()->name + ".pwrStateResidencyTicks") 160 .desc("Cumulative time (in ticks) in various power states") | 156 ; 157 158 pwrStateResidencyTicks 159 .init(Enums::PwrState::Num_PwrState) 160 .name(params()->name + ".pwrStateResidencyTicks") 161 .desc("Cumulative time (in ticks) in various power states") |
162 .flags(nozero) |
|
161 ; 162 for (int i = 0; i < Enums::PwrState::Num_PwrState; i++) { 163 pwrStateResidencyTicks.subname(i, Enums::PwrStateStrings[i]); 164 } 165 166 numPwrStateTransitions = 0; 167 168 /** 169 * For every stats dump, the power state residency and other distribution 170 * stats should be computed just before the dump to ensure correct stats 171 * value being reported for current dump window. It avoids things like 172 * having any unreported time spent in a power state to be forwarded to the 173 * next dump window which might have rather unpleasant effects (like 174 * perturbing the distribution stats). 175 */ 176 registerDumpCallback(new ClockedObjectDumpCallback(this)); 177} | 163 ; 164 for (int i = 0; i < Enums::PwrState::Num_PwrState; i++) { 165 pwrStateResidencyTicks.subname(i, Enums::PwrStateStrings[i]); 166 } 167 168 numPwrStateTransitions = 0; 169 170 /** 171 * For every stats dump, the power state residency and other distribution 172 * stats should be computed just before the dump to ensure correct stats 173 * value being reported for current dump window. It avoids things like 174 * having any unreported time spent in a power state to be forwarded to the 175 * next dump window which might have rather unpleasant effects (like 176 * perturbing the distribution stats). 177 */ 178 registerDumpCallback(new ClockedObjectDumpCallback(this)); 179} |