[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160224132158.GB27710@krava.redhat.com>
Date: Wed, 24 Feb 2016 14:21:58 +0100
From: Jiri Olsa <jolsa@...hat.com>
To: Wang Nan <wangnan0@...wei.com>
Cc: Alexei Starovoitov <ast@...nel.org>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Brendan Gregg <brendan.d.gregg@...il.com>,
Adrian Hunter <adrian.hunter@...el.com>,
Cody P Schafer <dev@...yps.com>,
"David S. Miller" <davem@...emloft.net>,
He Kuang <hekuang@...wei.com>,
Jérémie Galarneau
<jeremie.galarneau@...icios.com>, Jiri Olsa <jolsa@...nel.org>,
Kirill Smelkov <kirr@...edi.com>,
Li Zefan <lizefan@...wei.com>,
Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
Namhyung Kim <namhyung@...nel.org>,
Peter Zijlstra <peterz@...radead.org>, pi3orama@....com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 16/48] perf core: Add backward attribute to perf event
On Wed, Feb 24, 2016 at 02:08:50PM +0100, Jiri Olsa wrote:
> On Mon, Feb 22, 2016 at 09:10:43AM +0000, Wang Nan wrote:
>
> SNIP
>
> > + if (is_write_backward(output_event) != is_write_backward(event))
> > + goto out;
> > +
> > + /*
> > * If both events generate aux data, they must be on the same PMU
> > */
> > if (has_aux(event) && has_aux(output_event) &&
> > diff --git a/kernel/events/ring_buffer.c b/kernel/events/ring_buffer.c
> > index 37c11c6..80b1fa7 100644
> > --- a/kernel/events/ring_buffer.c
> > +++ b/kernel/events/ring_buffer.c
> > @@ -233,6 +233,8 @@ out:
> > int perf_output_begin(struct perf_output_handle *handle,
> > struct perf_event *event, unsigned int size)
> > {
> > + if (unlikely(is_write_backward(event)))
> > + return __perf_output_begin(handle, event, size, true);
> > return __perf_output_begin(handle, event, size, false);
>
> could this be just:
> return __perf_output_begin(handle, event, size,
> is_write_backward(event))
>
> also not sure if it's worth to have __perf_output_begin
> if the only difference to perf_output_begin is 'backward'
> argument that could be figured out from the event argument
> anyway
nevermind my second comment, just saw it being used also in next patches ;-)
jirka
Powered by blists - more mailing lists