lkml.org 
[lkml]   [2013]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/4] perf record: Remove post_processing_offset variable

* David Ahern <dsahern@gmail.com> wrote:

> Duplicates the data_offset from header in the session.
>
> Signed-off-by: David Ahern <dsahern@gmail.com>
> Cc: Ingo Molnar <mingo@kernel.org>
> Cc: Frederic Weisbecker <fweisbec@gmail.com>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Jiri Olsa <jolsa@redhat.com>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Cc: Mike Galbraith <efault@gmx.de>
> Cc: Stephane Eranian <eranian@google.com>
> ---
> tools/perf/builtin-record.c | 8 +++-----
> 1 file 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 {
> 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)
> @@ -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);
> }
>
> @@ -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) {
> --
> 1.8.3.4 (Apple Git-47)

Acked-by: Ingo Molnar <mingo@kernel.org>

Thanks,

Ingo


\
 
 \ /
  Last update: 2013-11-07 09:21    [W:0.170 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site