diff options
Diffstat (limited to 'tools/perf/util/header.c')
-rw-r--r-- | tools/perf/util/header.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index 16a16021eaa6..ecb5a8444f42 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c | |||
@@ -461,7 +461,7 @@ static int perf_header__adds_write(struct perf_header *self, int fd) | |||
461 | 461 | ||
462 | /* Write trace info */ | 462 | /* Write trace info */ |
463 | trace_sec->offset = lseek(fd, 0, SEEK_CUR); | 463 | trace_sec->offset = lseek(fd, 0, SEEK_CUR); |
464 | read_tracing_data(fd, attrs, nr_counters); | 464 | read_tracing_data(fd, &evsel_list); |
465 | trace_sec->size = lseek(fd, 0, SEEK_CUR) - trace_sec->offset; | 465 | trace_sec->size = lseek(fd, 0, SEEK_CUR) - trace_sec->offset; |
466 | } | 466 | } |
467 | 467 | ||
@@ -1131,8 +1131,7 @@ int event__process_event_type(event_t *self, | |||
1131 | return 0; | 1131 | return 0; |
1132 | } | 1132 | } |
1133 | 1133 | ||
1134 | int event__synthesize_tracing_data(int fd, struct perf_event_attr *pattrs, | 1134 | int event__synthesize_tracing_data(int fd, struct list_head *pattrs, |
1135 | int nb_events, | ||
1136 | event__handler_t process, | 1135 | event__handler_t process, |
1137 | struct perf_session *session __unused) | 1136 | struct perf_session *session __unused) |
1138 | { | 1137 | { |
@@ -1143,7 +1142,7 @@ int event__synthesize_tracing_data(int fd, struct perf_event_attr *pattrs, | |||
1143 | memset(&ev, 0, sizeof(ev)); | 1142 | memset(&ev, 0, sizeof(ev)); |
1144 | 1143 | ||
1145 | ev.tracing_data.header.type = PERF_RECORD_HEADER_TRACING_DATA; | 1144 | ev.tracing_data.header.type = PERF_RECORD_HEADER_TRACING_DATA; |
1146 | size = read_tracing_data_size(fd, pattrs, nb_events); | 1145 | size = read_tracing_data_size(fd, pattrs); |
1147 | if (size <= 0) | 1146 | if (size <= 0) |
1148 | return size; | 1147 | return size; |
1149 | aligned_size = ALIGN(size, sizeof(u64)); | 1148 | aligned_size = ALIGN(size, sizeof(u64)); |
@@ -1153,7 +1152,7 @@ int event__synthesize_tracing_data(int fd, struct perf_event_attr *pattrs, | |||
1153 | 1152 | ||
1154 | process(&ev, NULL, session); | 1153 | process(&ev, NULL, session); |
1155 | 1154 | ||
1156 | err = read_tracing_data(fd, pattrs, nb_events); | 1155 | err = read_tracing_data(fd, pattrs); |
1157 | write_padded(fd, NULL, 0, padding); | 1156 | write_padded(fd, NULL, 0, padding); |
1158 | 1157 | ||
1159 | return aligned_size; | 1158 | return aligned_size; |