Re: perf group read for inherited events

2017-05-31 Thread Vince Weaver
On Tue, 30 May 2017, Peter Zijlstra wrote: > On Tue, May 30, 2017 at 01:55:33PM -0400, Vince Weaver wrote: > > So the issue is currently if you were sampling, and you were sampling on > > an event group, and you had set PERF_SAMPLE_READ to get all counts for a > > group, and the event was also in

Re: perf group read for inherited events

2017-05-30 Thread Vince Weaver
On Tue, 30 May 2017, Peter Zijlstra wrote: > On Tue, May 30, 2017 at 06:57:14AM -0700, Andi Kleen wrote: > > On Tue, May 30, 2017 at 11:45:12AM +0200, Peter Zijlstra wrote: > > > > Or is the simple patch below good enough? > > > > > > The below seems to be the correct thing. It is rather unfortun

Re: perf group read for inherited events

2017-05-30 Thread Peter Zijlstra
On Tue, May 30, 2017 at 01:55:33PM -0400, Vince Weaver wrote: > So the issue is currently if you were sampling, and you were sampling on > an event group, and you had set PERF_SAMPLE_READ to get all counts for a > group, and the event was also inherited No, anything PERF_SAMPLE_READ (group or

Re: perf group read for inherited events

2017-05-30 Thread Peter Zijlstra
On Tue, May 30, 2017 at 06:57:14AM -0700, Andi Kleen wrote: > On Tue, May 30, 2017 at 11:45:12AM +0200, Peter Zijlstra wrote: > > > Or is the simple patch below good enough? > > > > The below seems to be the correct thing. It is rather unfortunate that > > this would break/significantly change exi

Re: perf group read for inherited events

2017-05-30 Thread Andi Kleen
On Tue, May 30, 2017 at 11:45:12AM +0200, Peter Zijlstra wrote: > > Or is the simple patch below good enough? > > The below seems to be the correct thing. It is rather unfortunate that > this would break/significantly change existing semantics :/ The "existing semantics" as in ignoring the PERF_S

Re: perf group read for inherited events

2017-05-30 Thread Peter Zijlstra
On Fri, May 26, 2017 at 01:56:01PM -0700, Andi Kleen wrote: > I have a need for read group reads for inherited events. > > It looks like the perf group read code already has all the code > to handle inheritance, __perf_read_group_add walks > the children list and adds them all up. > >4409