[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170608115448.GD29151@krava>
Date: Thu, 8 Jun 2017 13:54:48 +0200
From: Jiri Olsa <jolsa@...hat.com>
To: David Carrillo-Cisneros <davidcc@...gle.com>
Cc: linux-kernel@...r.kernel.org,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Andi Kleen <ak@...ux.intel.com>, Simon Que <sque@...omium.org>,
Wang Nan <wangnan0@...wei.com>, Jiri Olsa <jolsa@...nel.org>,
He Kuang <hekuang@...wei.com>,
Masami Hiramatsu <mhiramat@...nel.org>,
Stephane Eranian <eranian@...gle.com>,
Paul Turner <pjt@...gle.com>
Subject: Re: [PATCH v3 15/15] perf header: add event desc to pipe-mode header
On Tue, Jun 06, 2017 at 12:07:22AM -0700, David Carrillo-Cisneros wrote:
SNIP
> diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
> index 6c1963e5bf10..c91acd5b0838 100644
> --- a/tools/perf/util/header.c
> +++ b/tools/perf/util/header.c
> @@ -66,6 +66,7 @@ struct feat_fd {
> void *buf; /* Either buf != NULL or fd >= 0 */
> ssize_t offset;
> size_t size;
> + struct perf_evsel *events;
> };
>
> void perf_header__set_feat(struct perf_header *header, int feat)
> @@ -1353,10 +1354,15 @@ static int __desc_attr__fprintf(FILE *fp, const char *name, const char *val,
>
> static void print_event_desc(struct feat_fd *ff, FILE *fp)
> {
> - struct perf_evsel *evsel, *events = read_event_desc(ff);
> + struct perf_evsel *evsel, *events;
> u32 j;
> u64 *id;
>
> + if (ff->events)
> + events = ff->events;
> + else
> + events = read_event_desc(ff);
can you read from ff at this point in print callback?
jirka
Powered by blists - more mailing lists