diff options
author | Thomas Renninger <trenn@suse.de> | 2011-01-03 17:50:45 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-02-24 14:54:25 -0800 |
commit | b7fad097644503bacafb8727df0cf9c7c6e37625 (patch) | |
tree | f809b85101cc92686f3fb68a87027ef3f10e851c /tools | |
parent | 8e6b41c76c5b8a27b2abd7b9f6ed0877987fd11b (diff) | |
download | linux-stable-b7fad097644503bacafb8727df0cf9c7c6e37625.tar.gz linux-stable-b7fad097644503bacafb8727df0cf9c7c6e37625.tar.bz2 linux-stable-b7fad097644503bacafb8727df0cf9c7c6e37625.zip |
perf timechart: Adjust perf timechart to the new power events
commit 20c457b8587bee4644d998331d9e13be82e05b4c upstream.
[This patch is part of mainline git commit 20c457b8587bee4644d9.
This should fix:
http://www.mail-archive.com/linux-perf-users@vger.kernel.org/msg00057.html
The regression was introduced by git commit:
4c21adf26f8fcf86a755b9b9f55c2e9fd241e1fb]
builtin-timechart must only pass -e power:xy events if they are supported by
the running kernel, otherwise try to fetch the old power:power{start,end}
events.
For this I added the tiny helper function:
int is_valid_tracepoint(const char *event_string)
to parse-events.[hc], which could be more generic as an interface and support
hardware/software/... events, not only tracepoints, but someone else could
extend that if needed...
Signed-off-by: Thomas Renninger <trenn@suse.de>
Acked-by: Arjan van de Ven <arjan@linux.intel.com>
Acked-by: Jean Pihet <j-pihet@ti.com>
LKML-Reference: <1294073445-14812-4-git-send-email-trenn@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/builtin-timechart.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c index 9bcc38f0b706..b3028eb6dbe8 100644 --- a/tools/perf/builtin-timechart.c +++ b/tools/perf/builtin-timechart.c @@ -502,7 +502,7 @@ static int process_sample_event(event_t *event, struct perf_session *session) c_state_start(pe->cpu_id, data.time, pe->value); if (strcmp(event_str, "power:power_end") == 0) - c_state_end(pe->cpu_id, data.time); + c_state_end(data.cpu, data.time); if (strcmp(event_str, "power:power_frequency") == 0) p_state_change(pe->cpu_id, data.time, pe->value); |