Skip to contentSkip to conversation

perf annotate: process tracing data in pipe mode

PATCH In review David Carrillo-Cisneros 1 participant 2 messages May 18, 2017 – May 25, 2017 perf events

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf annotate: process tracing data in pipe mode

perf annotate was missing the handler for tracing data records.

Prior to this patch we obtained "unhandled" records when piping trace events to perf annotate (using -D option to show the dump_printf messages in process_event_synth_tracing_data_stub):

  $ perf record -o - -e block:bio_free sleep 2 | perf annotate -D --stdio
  ...
  0x78 [0xc]: PERF_RECORD_TRACING_DATA: unhandled!
  ...
---
 tools/perf/builtin-annotate.c | 1 +
 1 file changed, 1 insertion(+)
tools/perf/builtin-annotate.c +1 -0
index 7a5dc7e5c577..ce44edc30c71 100644
@@ -397,6 +397,7 @@ int cmd_annotate(int argc, const char **argv)
 			.namespaces = perf_event__process_namespaces,
 			.attr	= perf_event__process_attr,
 			.build_id = perf_event__process_build_id,
+			.tracing_data   = perf_event__process_tracing_data,
 			.ordered_events = true,
 			.ordering_requires_timestamps = true,
 		},
Signature · 1 line
2.13.0.303.g4ebf302169-goog
#1 lore raw

+Jiri

Quoted 31 lines · David Carrillo-Cisneros

perf annotate was missing the handler for tracing data records.

Prior to this patch we obtained "unhandled" records when piping trace events to perf annotate (using -D option to show the dump_printf messages in process_event_synth_tracing_data_stub):

  $ perf record -o - -e block:bio_free sleep 2 | perf annotate -D --stdio
  ...
  0x78 [0xc]: PERF_RECORD_TRACING_DATA: unhandled!
  ...
---
 tools/perf/builtin-annotate.c | 1 +
 1 file changed, 1 insertion(+)
tools/perf/builtin-annotate.c +1 -1
index 7a5dc7e5c577..ce44edc30c71 100644
@@ -397,6 +397,7 @@ int cmd_annotate(int argc, const char **argv)
                        .namespaces = perf_event__process_namespaces,
                        .attr   = perf_event__process_attr,
                        .build_id = perf_event__process_build_id,
+                       .tracing_data   = perf_event__process_tracing_data,
                        .ordered_events = true,
                        .ordering_requires_timestamps = true,
                },
--

2.13.0.303.g4ebf302169-goog