diff options
author | Colin Ian King <colin.king@canonical.com> | 2014-06-22 18:34:04 +0100 |
---|---|---|
committer | Amit Kucheria <amit.kucheria@verdurent.com> | 2014-06-23 10:06:15 +0530 |
commit | ee0e2a0231b88d873bf1447f5663684e620cb694 (patch) | |
tree | 9fe7827bbc4c7a4a540b797a6eafa7b551691870 | |
parent | d6504a9700bebac07439dccc7394c685684564b1 (diff) |
Allow idlestat to parse older versions of trace output
Re-work TRACE_FORMAT to allow idlestat to parse older kernels
trace output. This has been tested successfully on Debian 7.5
with a 3.2.x kernel and also on 3.15 kernel.
And example of the the newer format is:
<idle>-0 [002] .N.. 1420.031852: cpu_idle: state=4294967295 cpu_id=2
where as the older format is:
<idle>-0 [000] 91.365043: cpu_idle: state=1 cpu_id=0
The modified TRACE_FORMAT will handle both inputs by consuming characters
upto the floating point time field.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
-rw-r--r-- | idlestat.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -715,7 +715,7 @@ static int store_irq(int cpu, int irqid, char *irqname, #define TRACE_IPIIRQ_FORMAT "%*[^[][%d] %*[^=]=%d%*[^=]=%16s" #define TRACE_CMD_FORMAT "%*[^]]] %lf:%*[^=]=%u%*[^=]=%d" -#define TRACE_FORMAT "%*[^]]] %*s %lf:%*[^=]=%u%*[^=]=%u" +#define TRACE_FORMAT "%*[^]]]%*[^0-9] %lf:%*[^=]=%u%*[^=]=%u" static int get_wakeup_irq(struct cpuidle_datas *datas, char *buffer, int count) { |