diff options
Diffstat (limited to 'tools/perf/util/session.c')
-rw-r--r-- | tools/perf/util/session.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 1516c40d47ac..0fdf3ebef1e9 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c | |||
@@ -206,6 +206,8 @@ static void perf_event_ops__fill_defaults(struct perf_event_ops *handler) | |||
206 | handler->event_type = process_event_stub; | 206 | handler->event_type = process_event_stub; |
207 | if (handler->tracing_data == NULL) | 207 | if (handler->tracing_data == NULL) |
208 | handler->tracing_data = process_event_stub; | 208 | handler->tracing_data = process_event_stub; |
209 | if (handler->build_id == NULL) | ||
210 | handler->build_id = process_event_stub; | ||
209 | } | 211 | } |
210 | 212 | ||
211 | static const char *event__name[] = { | 213 | static const char *event__name[] = { |
@@ -222,6 +224,7 @@ static const char *event__name[] = { | |||
222 | [PERF_RECORD_HEADER_ATTR] = "ATTR", | 224 | [PERF_RECORD_HEADER_ATTR] = "ATTR", |
223 | [PERF_RECORD_HEADER_EVENT_TYPE] = "EVENT_TYPE", | 225 | [PERF_RECORD_HEADER_EVENT_TYPE] = "EVENT_TYPE", |
224 | [PERF_RECORD_HEADER_TRACING_DATA] = "TRACING_DATA", | 226 | [PERF_RECORD_HEADER_TRACING_DATA] = "TRACING_DATA", |
227 | [PERF_RECORD_HEADER_BUILD_ID] = "BUILD_ID", | ||
225 | }; | 228 | }; |
226 | 229 | ||
227 | unsigned long event__total[PERF_RECORD_HEADER_MAX]; | 230 | unsigned long event__total[PERF_RECORD_HEADER_MAX]; |
@@ -332,6 +335,7 @@ static event__swap_op event__swap_ops[] = { | |||
332 | [PERF_RECORD_HEADER_ATTR] = event__attr_swap, | 335 | [PERF_RECORD_HEADER_ATTR] = event__attr_swap, |
333 | [PERF_RECORD_HEADER_EVENT_TYPE] = event__event_type_swap, | 336 | [PERF_RECORD_HEADER_EVENT_TYPE] = event__event_type_swap, |
334 | [PERF_RECORD_HEADER_TRACING_DATA] = event__tracing_data_swap, | 337 | [PERF_RECORD_HEADER_TRACING_DATA] = event__tracing_data_swap, |
338 | [PERF_RECORD_HEADER_BUILD_ID] = NULL, | ||
335 | [PERF_RECORD_HEADER_MAX] = NULL, | 339 | [PERF_RECORD_HEADER_MAX] = NULL, |
336 | }; | 340 | }; |
337 | 341 | ||
@@ -380,6 +384,8 @@ static int perf_session__process_event(struct perf_session *self, | |||
380 | /* setup for reading amidst mmap */ | 384 | /* setup for reading amidst mmap */ |
381 | lseek(self->fd, offset + head, SEEK_SET); | 385 | lseek(self->fd, offset + head, SEEK_SET); |
382 | return ops->tracing_data(event, self); | 386 | return ops->tracing_data(event, self); |
387 | case PERF_RECORD_HEADER_BUILD_ID: | ||
388 | return ops->build_id(event, self); | ||
383 | default: | 389 | default: |
384 | self->unknown_events++; | 390 | self->unknown_events++; |
385 | return -1; | 391 | return -1; |