aboutsummaryrefslogtreecommitdiff
path: root/idlestat.c
diff options
context:
space:
mode:
authorTuukka Tikkanen <tuukka.tikkanen@linaro.org>2015-01-21 00:46:52 +0200
committerTuukka Tikkanen <tuukka.tikkanen@linaro.org>2015-01-21 00:46:52 +0200
commit6751e8c3f3778c971ba777aba2f3719c28211733 (patch)
tree4e8eae700bde75fb3ac68248c32a879b0607aee3 /idlestat.c
parent8a2d14faa7e56b63b129394d26ed40745907e141 (diff)
Energy_model: Don't add phony frequency to template
Idlestat adds phony frequency entries to the end of trace file to ensure all the last running state is accounted for. This phony frequency was unsigned int "-1" (aka 2^32-1 or 2^64-1), which was then listed in any energy model template generated from the trace file. This patch changes the phony frequency to 0 and makes the energy model template generation ignore 0 frequency. Signed-off-by: Tuukka Tikkanen <tuukka.tikkanen@linaro.org>
Diffstat (limited to 'idlestat.c')
-rw-r--r--idlestat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/idlestat.c b/idlestat.c
index 9840a2e..b6f8cbc 100644
--- a/idlestat.c
+++ b/idlestat.c
@@ -392,7 +392,7 @@ static void output_pstates(FILE *f, struct init_pstates *initp, int nrcpus,
ts_usec = (ts - ts_sec) * USEC_PER_SEC;
for (cpu = 0; cpu < nrcpus; cpu++) {
- freq = initp? initp->freqs[cpu] : -1;
+ freq = initp? initp->freqs[cpu] : 0;
fprintf(f, "%16s-%-5d [%03d] .... %5lu.%06lu: cpu_frequency: "
"state=%u cpu_id=%d\n", "idlestat", getpid(), cpu,
ts_sec, ts_usec, freq, cpu);