[PATCH 3/8] perf header: Set the tracepoint names on PERF_RECORD_HEADER_TRACING_DATA

From: Arnaldo Carvalho de Melo
Date: Tue Aug 07 2012 - 23:22:08 EST


From: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>

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 <dsahern@xxxxxxxxx>
Cc: Frederic Weisbecker <fweisbec@xxxxxxxxx>
Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: Mike Galbraith <efault@xxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxx>
Cc: Paul Mackerras <paulus@xxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Stephane Eranian <eranian@xxxxxxxxxx>
Link: http://lkml.kernel.org/n/tip-tzb7srmsl7a6o3icw592iv2o@xxxxxxxxxxxxxx
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/perf/util/header.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index 74ea3c2..e2b4864 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -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;
}

--
1.7.9.2.358.g22243

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/