summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/parse-events.h
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung.kim@lge.com>2013-06-26 09:14:05 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-07-12 18:46:02 +0200
commite7c93f09b83be25281cf129674e0035664715033 (patch)
tree5258fd6bdda221a5224e37ef2d7bf78ab194e709 /tools/perf/util/parse-events.h
parentperf util: Move debugfs/tracing helper functions to util.c (diff)
downloadlinux-e7c93f09b83be25281cf129674e0035664715033.tar.xz
linux-e7c93f09b83be25281cf129674e0035664715033.zip
perf util: Use evsel->name to get tracepoint_paths
Most tracepoint events already have their system and event name in ->name field so that searching whole event tracing directory for each evsel to match given id is suboptimal. Factor out this routine into tracepoint_name_to_path(). In case of en invalid name, it'll try to find path using id again. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Stephane Eranian <eranian@google.com> Cc: Steven Rostedt <rostedt@goodmis.org> Link: http://lkml.kernel.org/r/1372230862-15861-3-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/parse-events.h')
-rw-r--r--tools/perf/util/parse-events.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/util/parse-events.h b/tools/perf/util/parse-events.h
index 8a4859315fd9..080f7cf25d99 100644
--- a/tools/perf/util/parse-events.h
+++ b/tools/perf/util/parse-events.h
@@ -23,6 +23,7 @@ struct tracepoint_path {
};
extern struct tracepoint_path *tracepoint_id_to_path(u64 config);
+extern struct tracepoint_path *tracepoint_name_to_path(const char *name);
extern bool have_tracepoints(struct list_head *evlist);
const char *event_type(int type);