Skip to content

Commit

Permalink
perf record: Remove post_processing_offset variable
Browse files Browse the repository at this point in the history
Duplicates the data_offset from header in the session.

Signed-off-by: David Ahern <dsahern@gmail.com>
Acked-by: Ingo Molnar <mingo@kernel.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1383763297-27066-4-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
David Ahern authored and Arnaldo Carvalho de Melo committed Nov 7, 2013
1 parent f34b900 commit 7ab75cf
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tools/perf/builtin-record.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ struct perf_record {
bool no_buildid;
bool no_buildid_cache;
long samples;
off_t post_processing_offset;
};

static int write_output(struct perf_record *rec, void *buf, size_t size)
Expand Down Expand Up @@ -247,13 +246,14 @@ static int process_buildids(struct perf_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;

return __perf_session__process_events(session, rec->post_processing_offset,
size - rec->post_processing_offset,
return __perf_session__process_events(session, start,
size - start,
size, &build_id__mark_dso_hit_ops);
}

Expand Down Expand Up @@ -429,8 +429,6 @@ static int __cmd_record(struct perf_record *rec, int argc, const char **argv)
goto out_delete_session;
}

rec->post_processing_offset = lseek(file->fd, 0, SEEK_CUR);

machine = &session->machines.host;

if (file->is_pipe) {
Expand Down

0 comments on commit 7ab75cf

Please sign in to comment.