[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140908163933.GI17728@krava.brq.redhat.com>
Date: Mon, 8 Sep 2014 18:39:33 +0200
From: Jiri Olsa <jolsa@...hat.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Jiri Olsa <jolsa@...nel.org>, linux-kernel@...r.kernel.org,
Andi Kleen <andi@...stfloor.org>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Corey Ashford <cjashfor@...ux.vnet.ibm.com>,
David Ahern <dsahern@...il.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Ingo Molnar <mingo@...nel.org>,
"Jen-Cheng(Tommy) Huang" <tommy24@...ech.edu>,
Namhyung Kim <namhyung@...nel.org>,
Paul Mackerras <paulus@...ba.org>,
Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH 2/9] perf: Deny optimized switch for events read by
PERF_SAMPLE_READ
On Mon, Sep 08, 2014 at 12:11:19PM +0200, Peter Zijlstra wrote:
> On Mon, Sep 08, 2014 at 12:00:19PM +0200, Jiri Olsa wrote:
>
> > > no.. so the value of the counter is the sum of all the inherited events.
> > > It doesn't matter if you flip it or not the sum is not affected.
> > >
> > > PERF_SAMPLE_READ should return the value.
> >
> > so I want to be able to do the leader sampling over child processes
> > that means:
> > - have event group with sampling leader, and the rest
> > of the group events' periods being read on leader's sample
> > via PERF_SAMPLE_READ sample_type
> > - for each child process created I want it to do the
> > same thing as the parent - sample on leader, read
> > values of other events in group via PERF_SAMPLE_READ
>
> The thing is, PERF_SAMPLE_READ should return the exact same thing as an
> actual read(), and for read() the value reported is the sum of all
> events.
maybe we could make this configurable? like via new per_event_attr::option bit,
keeping by default the behaviour you said
>
> I _think_ I know what you want, and I think I see why you'd want that,
> but I'm not sure how to best do that.. Hmm.. maybe look at
> 'perf_event_attr::inherit_stat' that appears to be similar.
>
> At which point read() vs inherit_stat might be 'broken'. Hard to know if
> anybody uses that :-(
I'll check, thanks
jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists