Re: [PATCH 2/9] perf: Deny optimized switch for events read by PERF_SAMPLE_READ

2014-09-08 Thread Jiri Olsa
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. > > > > > >

Re: [PATCH 2/9] perf: Deny optimized switch for events read by PERF_SAMPLE_READ

2014-09-08 Thread Peter Zijlstra
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

Re: [PATCH 2/9] perf: Deny optimized switch for events read by PERF_SAMPLE_READ

2014-09-08 Thread Jiri Olsa
On Tue, Sep 02, 2014 at 12:52:44PM +0200, Peter Zijlstra wrote: > On Mon, Aug 25, 2014 at 04:45:36PM +0200, Jiri Olsa wrote: > > The optimized task context switch for cloned perf events just > > swaps whole perf event contexts (of current and next process) > > if it finds them suitable. Events

Re: [PATCH 2/9] perf: Deny optimized switch for events read by PERF_SAMPLE_READ

2014-09-08 Thread Jiri Olsa
On Tue, Sep 02, 2014 at 12:52:44PM +0200, Peter Zijlstra wrote: On Mon, Aug 25, 2014 at 04:45:36PM +0200, Jiri Olsa wrote: The optimized task context switch for cloned perf events just swaps whole perf event contexts (of current and next process) if it finds them suitable. Events from the

Re: [PATCH 2/9] perf: Deny optimized switch for events read by PERF_SAMPLE_READ

2014-09-08 Thread Peter Zijlstra
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

Re: [PATCH 2/9] perf: Deny optimized switch for events read by PERF_SAMPLE_READ

2014-09-08 Thread Jiri Olsa
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

Re: [PATCH 2/9] perf: Deny optimized switch for events read by PERF_SAMPLE_READ

2014-09-02 Thread Peter Zijlstra
On Mon, Aug 25, 2014 at 04:45:36PM +0200, Jiri Olsa wrote: > The optimized task context switch for cloned perf events just > swaps whole perf event contexts (of current and next process) > if it finds them suitable. Events from the 'current' context > will now measure data of the 'next' context

Re: [PATCH 2/9] perf: Deny optimized switch for events read by PERF_SAMPLE_READ

2014-09-02 Thread Peter Zijlstra
On Mon, Aug 25, 2014 at 04:45:36PM +0200, Jiri Olsa wrote: The optimized task context switch for cloned perf events just swaps whole perf event contexts (of current and next process) if it finds them suitable. Events from the 'current' context will now measure data of the 'next' context and

[PATCH 2/9] perf: Deny optimized switch for events read by PERF_SAMPLE_READ

2014-08-25 Thread Jiri Olsa
The optimized task context switch for cloned perf events just swaps whole perf event contexts (of current and next process) if it finds them suitable. Events from the 'current' context will now measure data of the 'next' context and vice versa. This is ok for cases where we are not directly

[PATCH 2/9] perf: Deny optimized switch for events read by PERF_SAMPLE_READ

2014-08-25 Thread Jiri Olsa
The optimized task context switch for cloned perf events just swaps whole perf event contexts (of current and next process) if it finds them suitable. Events from the 'current' context will now measure data of the 'next' context and vice versa. This is ok for cases where we are not directly