aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-11-17load_and_build_cstate_info: Plug a memory leak in error pathTuukka Tikkanen
This patch plugs a leak that occurs when cstate data is not what we expect. Signed-off-by: Tuukka Tikkanen <tuukka.tikkanen@linaro.org>
2014-11-14idlestat: Add code to store and load c-state infoKoan-Sin Tan
Add output_cstate_info() to store c-state information into idlestat trace file. Add load_and_build_cstate_info() to read/import trace with c-state information. For idlestat log, c-state information are stored after topology information. For ftrace and 'trace-cmd report' formats, since there is no topology and c-state information stored, read them from sysfs on the current running machine for now (which means you still have to process them on the same machine). Signed-off-by: Koan-Sin Tan <freedom.tan@linaro.org> Reviewed-by: Tuukka Tikkanen <tuukka.tikkanen@linaro.org>
2014-11-13idlestat: Emit initial and final P-state changes in the trace filepi-cheng.chen
Write fake initail and final P-state change record in the trace file to complete P-state statistics. Signed-off-by: Pi-Cheng Chen <pi-cheng.chen@linaro.org>
2014-11-13idlestat: Allocate struct cpufreq_pstate dynamicallypi-cheng.chen
Allocate struct cpufreq_pstate dynamically when parsing trace file to fix intel_pstate issue. Signed-off-by: Pi-Cheng Chen <pi-cheng.chen@linaro.org> Reviewed-by: Tuukka Tikkanen <tuukka.tikkanen@linaro.org>
2014-10-30idlestat: Do not return negative value from mainTuukka Tikkanen
Program exit codes are always positive integers, so changed all return -1;'s to return 1;'s. Signed-off-by: Tuukka Tikkanen <tuukka.tikkanen@linaro.org> Reviewed-by: Larry Bassel <larry.bassel@linaro.org>
2014-10-30Energy_model: Do not fail when no energy model is usedTuukka Tikkanen
Previous patchset unconditionally tries to load energy model, even if the energy model file is not specified (i.e. energy model processing is not desired). This patch modifies the code to skip parsing energy model in case it is not specified. The call to parsing energy model is moved from getoptions() to main(). Signed-off-by: Tuukka Tikkanen <tuukka.tikkanen@linaro.org> Reviewed-by: Larry Bassel <larry.bassel@linaro.org>
2014-10-24idlestat: port Patrick's energy model improvementsLarry Bassel
This is a port of Patrick Bellasi's energy model improvements to the current idlestat tip. These are taken from his idlestat tree which is located at git@github.com:scheduler-tools/idlestat.git The commits used are listed below. They were squashed, ported and some cleanup was performed. Some very TC2-specific code (hwmon) was removed -- it may be possible in the future to generalize this to make it useful to all platforms. commit 08b13eecbc1bf9d8514d92bded54f3e9407b39b2 Author: Patrick Bellasi <patrick.bellasi@arm.com> Date: Fri Jul 25 14:16:34 2014 +0100 energy_model: fix scaling of wakeup energy components This should fix the scaling of wakeup energy components to match the energy model parameters. Basically, since the scheduler model is normalized to a wake-up rate of 1000 wake-ups per second, the correct conversion is: idlestate_wakeup_energy = sched_wakeup_energy * 47742 / (1000 * 1024) Where: - 47742: Removes wake-up tracking pre-scaling - 1024: Removes << 10 - 1000: Single wake-up instead of 1000/s Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com> commit ff949c959ff3cee3df371451b686a11ebafcfe4e Author: Patrick Bellasi <patrick.bellasi@arm.com> Date: Thu Jul 24 14:26:06 2014 +0100 energy_model: report per-cluster power breakdown At the end of an experiment, dump energy estimation per each cluster as well as the overall energy. Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com> commit 9245da1ab0fe23c5a22f30d18350ca2778a13729 Author: Patrick Bellasi <patrick.bellasi@arm.com> Date: Wed Jul 23 16:20:16 2014 +0100 energy_model: setup the ground for per-cluster energy measurements This is a dummy renaming patch which prepares the ground to have a per-cluster energy report. Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com> commit 2f970549d27c2235826cfa0e8e1e305fb56850e0 Author: Patrick Bellasi <patrick.bellasi@arm.com> Date: Wed Jul 23 15:31:04 2014 +0100 energy_model: disable by default warning on missing model params This is expected to provide a better readable output table with just the meaningful metrics. Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com> commit 6e354aa31ba4c65f6ec6970a45faf5f2e7555681 Author: Patrick Bellasi <patrick.bellasi@arm.com> Date: Wed Jul 23 15:28:38 2014 +0100 energy_model: switch to tabular output Use by default a tabular output for the computed energy components. This is expected to improve readability and debugging of the energy model computations. Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com> commit ea32eebf192052938ad9d641350fcaf242640fe2 Author: Patrick Bellasi <patrick.bellasi@arm.com> Date: Wed Jul 23 15:23:22 2014 +0100 energy_model: fix energy model computation This adds the required fixes in the energy model computation to properly match the events parsed by a filtered trace. Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com> Signed-off-by: Larry Bassel <larry.bassel@linaro.org> Reviewed-by: Tuukka Tikkanen <tuukka.tikkanen@linaro.org>
2014-10-24idlestat: add print_vrbLarry Bassel
Add the print_vrb macro based on the commit a8ad0bbe0171a34c9448af1af046e3cea075987a in Patrick Bellasi's idlestat tree located at git@github.com:scheduler-tools/idlestat.git A level parameter has been added for supporting different levels of verbosity. Macro code has been encapsulated within a do-while flow control construct to prevent unexpected behavior issues. Signed-off-by: Larry Bassel <larry.bassel@linaro.org> Signed-off-by: Tuukka Tikkanen <tuukka.tikkanen@linaro.org>
2014-10-24idlestat: make energy model template fileLarry Bassel
If the energy model file doesn't exist, instead make an energy model template file (taking the topology and C and P-state names/values into account). This file is similar to an energy model file, except that all of the energy costs are to be filled in (and are shown as "?"). Signed-off-by: Larry Bassel <larry.bassel@linaro.org> Reviewed-by: Tuukka Tikkanen <tuukka.tikkanen@linaro.org>
2014-10-24idlestat: calculate energy consumption using energy modelLarry Bassel
Calculate estimated energy consumption using the specified energy model file. Signed-off-by: Larry Bassel <larry.bassel@linaro.org> Reviewed-by: Tuukka Tikkanen <tuukka.tikkanen@linaro.org>
2014-10-24idlestat: parse energy model fileLarry Bassel
A sample energy model file is included. Signed-off-by: Larry Bassel <larry.bassel@linaro.org> Reviewed-by: Tuukka Tikkanen <tuukka.tikkanen@linaro.org>
2014-10-15Clear few memory leaksSanjay Singh Rawat
Add calls to free() for cstate data arrays and wakeup information arrays. Remove checks for NULL pointer as free() will check and ignore NULL pointers anyway. Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org> Signed-off-by: Tuukka Tikkanen <tuukka.tikkanen@linaro.org>
2014-10-15idlestat: add a note about missing IPI tracing on X86Nicolas Pitre
Signed-off-by: Nicolas Pitre <nico@linaro.org>
2014-10-08idlestat: many IRQs may share the same numberNicolas Pitre
This is especially true for IPIs. Without this fix, all IPIs are recorded under the first one to be seen per CPU. Signed-off-by: Nicolas Pitre <nico@linaro.org> Reviewed-by: Tuukka Tikkanen <tuukka.tikkanen@linaro.org>
2014-10-08idlestat: simplify IRQ type handlingNicolas Pitre
Interrupt type is implicit with the IRQ number where -1 means an IPI. Signed-off-by: Nicolas Pitre <nico@linaro.org> Reviewed-by: Tuukka Tikkanen <tuukka.tikkanen@linaro.org>
2014-10-08idlestat: enhance wake-up source display with early/late trigger countsNicolas Pitre
To save on screen real estate, the first column is gone and IPIs are identified with "IPI" in place of an IRQ number. Signed-off-by: Nicolas Pitre <nico@linaro.org> Reviewed-by: Tuukka Tikkanen <tuukka.tikkanen@linaro.org>
2014-10-08idlestat: keep track of both early and late interrupt triggersNicolas Pitre
Signed-off-by: nicolas Pitre <nico@linaro.org> Reviewed-by: Tuukka Tikkanen <tuukka.tikkanen@linaro.org>
2014-10-08idlestat: clarify meaning of some structure membersNicolas Pitre
The following counters were renamed to make their meaning more obvious: premature_wakeup -> early_wakings could_sleep_more -> late_wakings Signed-off-by: Nicolas Pitre <nico@linaro.org> Reviewed-by: Tuukka Tikkanen <tuukka.tikkanen@linaro.org>
2014-10-08idlestat: left-justify IRQ name outputNicolas Pitre
Signed-off-by: Nicolas Pitre <nico@linaro.org> Reviewed-by: Tuukka Tikkanen <tuukka.tikkanen@linaro.org>
2014-10-08idlestat: cpuidle_cstates.last_state is actually cpuidle_cstates.current_stateNicolas Pitre
Signed-off-by: Nicolas Pitre <nico@linaro.org> Reviewed-by: Tuukka Tikkanen <tuukka.tikkanen@linaro.org>
2014-10-08idlestat.c: remove needless indirections in store_irq()Nicolas Pitre
Signed-off-by: Nicolas Pitre <nico@linaro.org> Reviewed-by: Tuukka Tikkanen <tuukka.tikkanen@linaro.org>
2014-10-08deconstruct store_data()Nicolas Pitre
Split C-State begin and end period handling into separate functions to improve code clarity. Additional code simplifications. Signed-off-by: Nicolas Pitre <nico@linaro.org> Reviewed-by: Tuukka Tikkanen <tuukka.tikkanen@linaro.org>
2014-10-08Fix segfault when no C-state names are availableNicolas Pitre
Signed-off-by: Nicolas Pitre <nico@linaro.org> Reviewed-by: Tuukka Tikkanen <tuukka.tikkanen@linaro.org>
2014-09-16Fix list.h copyrightAmit Kucheria
Commit 2543c80b3bf16b2d3f646e3c99d4252a10f2dece and 253e3c90d0f2adcd967c569d35d5d97035c6501e added incorrect copyright while adding mass-adding copyright to all files. list.h was copied from the kernel. Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
2014-09-04Fix segfault when no output name is specifiedDaniel Lezcano
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2014-08-29idlestat: Add -o option to save output report to a filepi-cheng.chen
Currently the serial terminal connected to the boards running idlestat are restricted to be at least 80 characters wide to output the report. Otherwise idlestat quits with message "The terminal must be at least 80 columns wide". Changes v1 to v2: * Duplicate opened report file to stdout instead of replacing all printf() Fix it by adding a "-o" option to save report output to a file. Signed-off-by: Pi-Cheng Chen <pi-cheng.chen@linaro.org> [amit.kucheria@linaro.org: Removed extra examples and check for bad filenames] Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
2014-08-29Add filename-checking to ignore bad charactersAmit Kucheria
Checking filename so that "--" doesn't become a filename as in the example below: sudo ./idlestat --trace -t 10 -f -- rt-app /tmp/browser.json Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
2014-08-08Don't stop parsing the topology if the directory is missingDaniel Lezcano
If some cpus are offline, the 'topology' directory is deleted in the sysfs. With the current code, the topology is partially built, thus giving partial results. Fix this by continuing the parsing. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2014-08-08Reduce the number of tracesDaniel Lezcano
All the traces are not necessary but we enable the entire class event but just a subset is needed. Fix by enabling only the needed traces. Results for the same test case: -rw-r--r-- 1 root root 54M Aug 8 14:36 mydat -rw-r--r-- 1 root root 15M Aug 8 14:43 mydat2 Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: Amit Kucheria <amit.kucheria@linaro.or>
2014-08-08Fix IPI trace format to parse tracesDaniel Lezcano
The trace format changed a bit. Fix the parsing format to show the IPI wakes up. Also fix the IPI number by showing '---' as it does not make sense to display the IPI number and we have the IPI name associated with this IPI number. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: Amit Kucheria <amit.kucheria@linaro.or>
2014-08-08Update README to reflect new usage modesAmit Kucheria
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
2014-08-07Change cluster, core and cpu indentationDaniel Lezcano
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2014-08-05Check the terminal window size is greater or equal to 80 columnsDaniel Lezcano
All the output assumes the terminal width is 80 cols min, check the terminal size in order to detect a smaller terminal and prevent to have a nested output. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: Amit Kucheria <amit.kucheria@linaro.org>
2014-08-05Report even if the application returned an error codeDaniel Lezcano
In case the application is killed by the timeout and it handles the SIGTERM, it may return an error, thus idlestat won't display the result. Ignore the return code of the application. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: Larry Bassel <larry.bassel@linaro.org> Tested-by: Larry Bassel <larry.bassel@linaro.org>
2014-08-05Split the display to show the wakeup separetelyDaniel Lezcano
The display functions are tied together in the code. Split this, so we can choose each subsystem to display separately. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: Larry Bassel <larry.bassel@linaro.org> Tested-by: Larry Bassel <larry.bassel@linaro.org>
2014-08-05Add option to choose the data to be displayedDaniel Lezcano
Add the options to select c-states, p-states and wakeup output. --idle, -c : show c-states --frequency, -p : show p-states --wakeup, -w : show wakeup sources Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: Larry Bassel <larry.bassel@linaro.org> Tested-by: Larry Bassel <larry.bassel@linaro.org>
2014-08-05Improve the outputDaniel Lezcano
The output is now in the form of: ---------------------------------------------------------------- | P-state | min | max | avg | total | hits | ---------------------------------------------------------------- | cpu0 | ---------------------------------------------------------------- | 2.90GHz | 0us | 37.93ms | 383us | 163.89ms | 428 | | 2.20GHz | 11us | 1.69ms | 160us | 3.83ms | 24 | | 1.80GHz | 8us | 2.72ms | 106us | 6.37ms | 60 | | 1.30GHz | 1us | 4.51ms | 1.13ms | 5.65ms | 5 | | 1.20GHz | 0us | 17.75ms | 292us | 3.55s | 12148 | ---------------------------------------------------------------- | cpu1 | ---------------------------------------------------------------- | 2.90GHz | 0us | 5.59ms | 447us | 118.06ms | 264 | | 1.20GHz | 0us | 13.83ms | 656us | 3.05s | 4649 | ---------------------------------------------------------------- | cpu2 | ---------------------------------------------------------------- | 2.90GHz | 1us | 118.77ms | 1.45ms | 326.93ms | 225 | | 2.80GHz | 24us | 1.34ms | 263us | 5.26ms | 20 | | 2.50GHz | 11us | 2.49ms | 327us | 9.49ms | 29 | | 1.20GHz | 1us | 21.24ms | 404us | 3.99s | 9891 | ---------------------------------------------------------------- | cpu3 | ---------------------------------------------------------------- | 2.90GHz | 3us | 21.07ms | 720us | 127.51ms | 177 | | 1.60GHz | 3us | 5.14ms | 120us | 12.03ms | 100 | | 1.20GHz | 1us | 18.07ms | 660us | 2.76s | 4190 | ---------------------------------------------------------------- -------------------------------------------------------------------------------- | C-state | min | max | avg | total | hits | over | under | -------------------------------------------------------------------------------- | clusterA | -------------------------------------------------------------------------------- | C1-IVB | 0us | 1.24ms | 1.24ms | 1.24ms | 1 | 0 | 0 | | C7-IVB | 0us | 10.07ms | 1.78ms | 19.10s | 10739 | 0 | 0 | -------------------------------------------------------------------------------- | core0 | -------------------------------------------------------------------------------- | C1-IVB | 0us | 2.02ms | 262us | 3.14ms | 12 | 0 | 0 | | C7-IVB | 0us | 15.92ms | 2.09ms | 23.30s | 11163 | 0 | 0 | -------------------------------------------------------------------------------- | cpu0 | -------------------------------------------------------------------------------- | POLL | 3us | 3us | 3us | 3us | 1 | 0 | 0 | | C1-IVB | 0us | 2.95ms | 179us | 162.03ms | 905 | 0 | 0 | | C3-IVB | 1us | 9.07ms | 555us | 192.47ms | 347 | 0 | 0 | | C6-IVB | 6us | 3.84ms | 1.18ms | 40.13ms | 34 | 0 | 0 | | C7-IVB | 1us | 16.35ms | 2.27ms | 25.83s | 11396 | 0 | 0 | -------------------------------------------------------------------------------- | cpu1 | -------------------------------------------------------------------------------- | C1-IVB | 1us | 11.12ms | 173us | 54.09ms | 313 | 0 | 0 | | C3-IVB | 2us | 1.39ms | 399us | 55.81ms | 140 | 0 | 0 | | C6-IVB | 20us | 1.04ms | 517us | 2.07ms | 4 | 0 | 0 | | C7-IVB | 1us | 41.48ms | 5.93ms | 26.67s | 4495 | 0 | 0 | -------------------------------------------------------------------------------- | core1 | -------------------------------------------------------------------------------- | C1-IVB | 0us | 1.25ms | 116us | 4.04ms | 35 | 0 | 0 | | C7-IVB | 0us | 22.25ms | 2.17ms | 22.97s | 10605 | 0 | 0 | -------------------------------------------------------------------------------- | cpu2 | -------------------------------------------------------------------------------- | POLL | 3us | 3us | 3us | 3us | 1 | 0 | 0 | | C1-IVB | 1us | 9.65ms | 265us | 133.88ms | 505 | 0 | 0 | | C3-IVB | 1us | 3.74ms | 440us | 127.48ms | 290 | 0 | 0 | | C6-IVB | 24us | 2.34ms | 1.01ms | 32.32ms | 32 | 0 | 0 | | C7-IVB | 1us | 31.43ms | 2.70ms | 25.33s | 9369 | 0 | 0 | -------------------------------------------------------------------------------- | cpu3 | -------------------------------------------------------------------------------- | POLL | 11us | 11us | 11us | 11us | 1 | 0 | 0 | | C1-IVB | 1us | 4.80ms | 94us | 42.66ms | 455 | 0 | 0 | | C3-IVB | 1us | 2.00ms | 420us | 28.59ms | 68 | 0 | 0 | | C6-IVB | 31us | 1.42ms | 800us | 8.00ms | 10 | 0 | 0 | | C7-IVB | 0us | 98.04ms | 6.92ms | 26.99s | 3899 | 0 | 0 | -------------------------------------------------------------------------------- Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: Larry Bassel <larry.bassel@linaro.org> Tested-by: Larry Bassel <larry.bassel@linaro.org>
2014-08-05Don't double check with the estimate functionDaniel Lezcano
We want the output to be always the same even if the prediction accuracy is not possible because we are working on an old kernel. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: Larry Bassel <larry.bassel@linaro.org> Tested-by: Larry Bassel <larry.bassel@linaro.org>
2014-08-05Split display functionDaniel Lezcano
Make some code separations to prepare the code for cleanup. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: Larry Bassel <larry.bassel@linaro.org> Tested-by: Larry Bassel <larry.bassel@linaro.org>
2014-08-05Remove dump and iterations optionsDaniel Lezcano
These options are pointless and not interesting. Removing them. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: Larry Bassel <larry.bassel@linaro.org> Tested-by: Larry Bassel <larry.bassel@linaro.org>
2014-08-05Add incremental verbose optionDaniel Lezcano
This patch adds the '-v' option in the command line. The level of verbosity is choosen by the number of time the -v occurs. no -v option : verbosity 0 -v : verbosity 1 -vv : verbosity 2 -vvv : verbosity 3 etc ... Note this option is not yet used in the code. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: Larry Bassel <larry.bassel@linaro.org> Tested-by: Larry Bassel <larry.bassel@linaro.org>
2014-08-05Add 'patches' directory to the ignored list of files in .gitignoreDaniel Lezcano
The quilt tool is still widely used in conjunction with git, it needs a specific directory, by convention 'patches' to store the patches for the serie. Add this directory in the .gitignore file, so we are no longer annoyed by this directory when we check the status of git reporting it as an untracked file. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: Larry Bassel <larry.bassel@linaro.org> Tested-by: Larry Bassel <larry.bassel@linaro.org>
2014-08-05Remove the debug optionDaniel Lezcano
This function is pointless. It was added initially for debugging purpose, remove it. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: Larry Bassel <larry.bassel@linaro.org> Tested-by: Larry Bassel <larry.bassel@linaro.org>
2014-08-05Fix some lines to comply with 80 chars lengthDaniel Lezcano
Fix lines exceeding 80 chars, so fulfill the conventional coding style of the opensource projects. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: Larry Bassel <larry.bassel@linaro.org> Tested-by: Larry Bassel <larry.bassel@linaro.org>
2014-08-05Fix CPU affinity maskPatrick Bellasi
To properly identify the initial PState of each CPU, the idlestat_wake_all function is used to force an idle state exit on all CPUs by pinning idlestat on each CPUs. However, this routine forgets to recover the original mask at the end of the pinning process. This patch solve this issue, by properly recovering the original CPU affinity mask. Moreover, it avoids to wake up CPUs that will not be used to run the workload. Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: Larry Bassel <larry.bassel@linaro.org> Tested-by: Larry Bassel <larry.bassel@linaro.org>
2014-07-15Support trace-cmd report postprocessingLina Iyer
Distinguish the idlestat and trace-cmd report and uses respective format for postporcessing. FIXME: This can be cleaned up a bit but we'll push it on account of vacations Signed-off-by: Sandeep Tripathy <sandeep.tripathy@linaro.org> Signed-off-by: Lina Iyer <lina.iyer@linaro.org> Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
2014-07-15Report cpuidle prediction accuracyLina Iyer
The patch reports the number of times a wrong c-state was choosen under: sleep duration > target_residency of next c-state over: sleep duration < target_residency of the current c-state In the case of premature wakeup, the source of wakeup eg. irq is flagged as unpredicted. FIXME: This can be cleaned up a bit but we'll push it on account of vacations Signed-off-by: Sandeep Tripathy <sandeep.tripathy@linaro.org> Signed-off-by: Lina Iyer <lina.iyer@linaro.org> Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
2014-07-01Add GPLv2 LICENSE file to allow distros to package this easierAmit Kucheria
Signed-off-by: Amit Kucheria <amit.kucheria@verdurent.com>
2014-06-23Start preparing for a new versionAmit Kucheria
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
2014-06-23Allow idlestat to parse older versions of trace outputColin Ian King
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>