aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-record.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/builtin-record.c')
-rw-r--r--tools/perf/builtin-record.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 19c4db6bdd6f..15280b5e5574 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -74,7 +74,6 @@ struct perf_record {
74 bool no_buildid; 74 bool no_buildid;
75 bool no_buildid_cache; 75 bool no_buildid_cache;
76 long samples; 76 long samples;
77 off_t post_processing_offset;
78}; 77};
79 78
80static int write_output(struct perf_record *rec, void *buf, size_t size) 79static int write_output(struct perf_record *rec, void *buf, size_t size)
@@ -247,13 +246,14 @@ static int process_buildids(struct perf_record *rec)
247{ 246{
248 struct perf_data_file *file = &rec->file; 247 struct perf_data_file *file = &rec->file;
249 struct perf_session *session = rec->session; 248 struct perf_session *session = rec->session;
249 u64 start = session->header.data_offset;
250 250
251 u64 size = lseek(file->fd, 0, SEEK_CUR); 251 u64 size = lseek(file->fd, 0, SEEK_CUR);
252 if (size == 0) 252 if (size == 0)
253 return 0; 253 return 0;
254 254
255 return __perf_session__process_events(session, rec->post_processing_offset, 255 return __perf_session__process_events(session, start,
256 size - rec->post_processing_offset, 256 size - start,
257 size, &build_id__mark_dso_hit_ops); 257 size, &build_id__mark_dso_hit_ops);
258} 258}
259 259
@@ -429,8 +429,6 @@ static int __cmd_record(struct perf_record *rec, int argc, const char **argv)
429 goto out_delete_session; 429 goto out_delete_session;
430 } 430 }
431 431
432 rec->post_processing_offset = lseek(file->fd, 0, SEEK_CUR);
433
434 machine = &session->machines.host; 432 machine = &session->machines.host;
435 433
436 if (file->is_pipe) { 434 if (file->is_pipe) {