From 20c457b8587bee4644d998331d9e13be82e05b4c Mon Sep 17 00:00:00 2001 From: Thomas Renninger Date: Mon, 3 Jan 2011 17:50:45 +0100 Subject: perf timechart: Adjust perf timechart to the new power events 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 Acked-by: Arjan van de Ven Acked-by: Jean Pihet LKML-Reference: <1294073445-14812-4-git-send-email-trenn@suse.de> Signed-off-by: Ingo Molnar --- tools/perf/util/parse-events.h | 1 + 1 file changed, 1 insertion(+) (limited to 'tools/perf/util/parse-events.h') diff --git a/tools/perf/util/parse-events.h b/tools/perf/util/parse-events.h index 0a0abc1d10eb..1c9043ccd173 100644 --- a/tools/perf/util/parse-events.h +++ b/tools/perf/util/parse-events.h @@ -36,6 +36,7 @@ extern int parse_filter(const struct option *opt, const char *str, int unset); #define EVENTS_HELP_MAX (128*1024) extern void print_events(void); +extern int is_valid_tracepoint(const char *event_string); extern char debugfs_path[]; extern int valid_debugfs_mount(const char *debugfs); -- cgit v1.2.3