diff options
author | Tuukka Tikkanen <tuukka.tikkanen@linaro.org> | 2014-12-03 09:01:06 +0200 |
---|---|---|
committer | Tuukka Tikkanen <tuukka.tikkanen@linaro.org> | 2014-12-05 09:52:39 +0200 |
commit | 2a6179893b85991a440773ecfc46e1e4bc71da07 (patch) | |
tree | c4063869ab49a78a5dcbdb0d861c4e60943d78c4 | |
parent | d612500d580b134a7602b248277c8b408ced8093 (diff) |
idlestat: Suppress invalid warnings for generated P-state changes
An earlier patch introduced generating P-state changes into
beginning and end of the trace file. This was done to account
P-state residencies that extended outside of the trace period
correctly. These P-state changes reliably trigger warning
messages about changing a P-state for an idle CPU. (These could
also be triggered by P-state changes that occur naturally.)
This patch suppresses warnings about P-state changes for "an idle
CPU" when the actual idle state of the CPU is not known.
Signed-off-by: Tuukka Tikkanen <tuukka.tikkanen@linaro.org>
Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org>
-rw-r--r-- | idlestat.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -676,8 +676,8 @@ static void open_current_pstate(struct cpufreq_pstates *ps, double time) static void open_next_pstate(struct cpufreq_pstates *ps, int s, double time) { ps->current = s; - if (ps->idle) { - fprintf(stderr, "warning: opening P-state on idle CPU\n"); + if (ps->idle > 0) { + fprintf(stderr, "Warning: opening P-state on an idle CPU\n"); return; } open_current_pstate(ps, time); @@ -689,8 +689,8 @@ static void close_current_pstate(struct cpufreq_pstates *ps, double time) struct cpufreq_pstate *p = &(ps->pstate[c]); double elapsed; - if (ps->idle) { - fprintf(stderr, "warning: closing P-state on idle CPU\n"); + if (ps->idle > 0) { + fprintf(stderr, "Warning: closing P-state on an idle CPU\n"); return; } elapsed = (time - ps->time_enter) * USEC_PER_SEC; |