diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 8648c6d3003ddb3d64c54142ece0f56b1e30e813..1134de22979e7f18fa9b74d3bd658a9363acdaeb 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -194,12 +194,13 @@ static int process_buildids(struct record *rec) { struct perf_data_file *file = &rec->file; struct perf_session *session = rec->session; - u64 start = session->header.data_offset; u64 size = lseek(file->fd, 0, SEEK_CUR); if (size == 0) return 0; + file->size = size; + /* * During this process, it'll load kernel map and replace the * dso->long_name to a real pathname it found. In this case @@ -211,9 +212,7 @@ static int process_buildids(struct record *rec) */ symbol_conf.ignore_vmlinux_buildid = true; - return __perf_session__process_events(session, start, - size - start, - size, &build_id__mark_dso_hit_ops); + return perf_session__process_events(session, &build_id__mark_dso_hit_ops); } static void perf_event__synthesize_guest_os(struct machine *machine, void *data) diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index b0ce3d6e623130ccc6d938848f83a8dd4475f1cc..0baf75f12b7c4a663544cb6f65b6c001c3ae890e 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c @@ -1251,9 +1251,9 @@ fetch_mmaped_event(struct perf_session *session, #define NUM_MMAPS 128 #endif -int __perf_session__process_events(struct perf_session *session, - u64 data_offset, u64 data_size, - u64 file_size, struct perf_tool *tool) +static int __perf_session__process_events(struct perf_session *session, + u64 data_offset, u64 data_size, + u64 file_size, struct perf_tool *tool) { int fd = perf_data_file__fd(session->file); u64 head, page_offset, file_offset, file_pos, size; diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h index dc26ebf60fe421050b58eafa9c8fb29d49fa3f0a..6d663dc76404395ad6231fcf93bd881b9978fab8 100644 --- a/tools/perf/util/session.h +++ b/tools/perf/util/session.h @@ -49,9 +49,6 @@ int perf_session__peek_event(struct perf_session *session, off_t file_offset, union perf_event **event_ptr, struct perf_sample *sample); -int __perf_session__process_events(struct perf_session *session, - u64 data_offset, u64 data_size, u64 size, - struct perf_tool *tool); int perf_session__process_events(struct perf_session *session, struct perf_tool *tool);