diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-06-27 12:08:42 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-06-27 12:08:42 -0400 |
commit | da3789628f88684d3f0fb4e6a6bc086c395ac3cb (patch) | |
tree | f1573d6b2c8fa4e46f47c5558135a0a56d4397ef /tools/perf/util/trace-event-scripting.c | |
parent | 7a25b2d32b9cb0b813d56ee6109acf90f3c9f1e5 (diff) |
perf tools: Stop using a global trace events description list
The pevent thing is per perf.data file, so I made it stop being static
and become a perf_session member, so tools processing perf.data files
use perf_session and _there_ we read the trace events description into
session->pevent and then change everywhere to stop using that single
global pevent variable and use the per session one.
Note that it _doesn't_ fall backs to trace__event_id, as we're not
interested at all in what is present in the
/sys/kernel/debug/tracing/events in the workstation doing the analysis,
just in what is in the perf.data file.
This patch also introduces perf_session__set_tracepoints_handlers that
is the perf perf.data/session way to associate handlers to tracepoint
events by resolving their IDs using the events descriptions stored in a
perf.data file. Make 'perf sched' use it.
Reported-by: Dmitry Antipov <dmitry.antipov@linaro.org>
Tested-by: Dmitry Antipov <dmitry.antipov@linaro.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: linaro-dev@lists.linaro.org
Cc: patches@linaro.org
Link: http://lkml.kernel.org/r/20120625232016.GA28525@infradead.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
-rw-r--r-- | tools/perf/util/trace-event-scripting.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/perf/util/trace-event-scripting.c b/tools/perf/util/trace-event-scripting.c index 18ae6c1831d3..474aa7a7df43 100644 --- a/tools/perf/util/trace-event-scripting.c +++ b/tools/perf/util/trace-event-scripting.c | |||
@@ -36,6 +36,7 @@ static int stop_script_unsupported(void) | |||
36 | } | 36 | } |
37 | 37 | ||
38 | static void process_event_unsupported(union perf_event *event __unused, | 38 | static void process_event_unsupported(union perf_event *event __unused, |
39 | struct pevent *pevent __unused, | ||
39 | struct perf_sample *sample __unused, | 40 | struct perf_sample *sample __unused, |
40 | struct perf_evsel *evsel __unused, | 41 | struct perf_evsel *evsel __unused, |
41 | struct machine *machine __unused, | 42 | struct machine *machine __unused, |
@@ -61,7 +62,8 @@ static int python_start_script_unsupported(const char *script __unused, | |||
61 | return -1; | 62 | return -1; |
62 | } | 63 | } |
63 | 64 | ||
64 | static int python_generate_script_unsupported(const char *outfile __unused) | 65 | static int python_generate_script_unsupported(struct pevent *pevent __unused, |
66 | const char *outfile __unused) | ||
65 | { | 67 | { |
66 | print_python_unsupported_msg(); | 68 | print_python_unsupported_msg(); |
67 | 69 | ||
@@ -122,7 +124,8 @@ static int perl_start_script_unsupported(const char *script __unused, | |||
122 | return -1; | 124 | return -1; |
123 | } | 125 | } |
124 | 126 | ||
125 | static int perl_generate_script_unsupported(const char *outfile __unused) | 127 | static int perl_generate_script_unsupported(struct pevent *pevent __unused, |
128 | const char *outfile __unused) | ||
126 | { | 129 | { |
127 | print_perl_unsupported_msg(); | 130 | print_perl_unsupported_msg(); |
128 | 131 | ||