Skip to contentSkip to conversation

perf header: Set the tracepoint names on PERF_RECORD_HEADER_TRACING_DATA

tip:perf/core tip-bot for Arnaldo Carvalho de Melo 1 participant 1 message Aug 21, 2012 perf events

lore
Share & tools
lore
#0 lore raw
Commit-ID:  8b6ee4c5d48d93527dcf6e36c51cbb7703d7fffb
Gitweb:     http://git.kernel.org/tip/8b6ee4c5d48d93527dcf6e36c51cbb7703d7fffb
Author:     Arnaldo Carvalho de Melo <[email protected]>
AuthorDate: Tue, 7 Aug 2012 23:36:16 -0300
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Tue, 7 Aug 2012 23:36:16 -0300

perf header: Set the tracepoint names on PERF_RECORD_HEADER_TRACING_DATA

We only have access to pevent after processing that event, so set the tracepoint names there.

Right now this isn't a problem as we're deferring resolving the tracepoint names to when we process samples, but in the next patches we will be doing it in advance, to avoid relookups, so do it earlier, as soon as we process the tracing data event.

Cc David Ahern <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Mike Galbraith <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Stephane Eranian <[email protected]>
---
 tools/perf/util/header.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
tools/perf/util/header.c +2 -0
index 74ea3c2..e2b4864 100644
@@ -2452,6 +2452,8 @@ int perf_event__process_tracing_data(union perf_event *event,
 	if (size_read + padding != size)
 		die("tracing data size mismatch");
 
+	perf_evlist__set_tracepoint_names(session->evlist, session->pevent);
+
 	return size_read + padding;
 }