On Wed, Sep 10, 2014 at 3:49 PM, Stephane Eranian <eran...@google.com> wrote:
>
> Peter,
>
>
>
> On Mon, Sep 8, 2014 at 5:22 PM, Peter Zijlstra <pet...@infradead.org> wrote:
> > On Mon, Sep 08, 2014 at 04:31:07PM +0200, Jiri Olsa wrote:
> >> Revert PERF_EVENT_STATE_EXIT check on read syscall path.
> >> It breaks standard way to read counter, which is to open
> >> the counter, wait for the monitored process to die and
> >> read the counter.
> >>
> >> Reported-by: Stephane Eranian <eran...@google.com>
> >> Acked-by: Stephane Eranian <eran...@google.com>
> >> Cc: Arnaldo Carvalho de Melo <a...@redhat.com>
> >> Cc: Frederic Weisbecker <fweis...@gmail.com>
> >> Cc: Ingo Molnar <mi...@kernel.org>
> >> Cc: Paul Mackerras <pau...@samba.org>
> >> Cc: Peter Zijlstra <a.p.zijls...@chello.nl>
> >> Cc: Stephane Eranian <eran...@google.com>
> >> Signed-off-by: Jiri Olsa <jo...@kernel.org>
> >
> > Thanks!
> Still don't see this fix in tip.git.
>
Still not there. This is a problem.

>
> >> ---
> >>  kernel/events/core.c | 3 +--
> >>  1 file changed, 1 insertion(+), 2 deletions(-)
> >>
> >> diff --git a/kernel/events/core.c b/kernel/events/core.c
> >> index d8cb4d21a346..6d1c9ce1643e 100644
> >> --- a/kernel/events/core.c
> >> +++ b/kernel/events/core.c
> >> @@ -3600,8 +3600,7 @@ perf_read_hw(struct perf_event *event, char __user 
> >> *buf, size_t count)
> >>        * error state (i.e. because it was pinned but it couldn't be
> >>        * scheduled on to the CPU at some point).
> >>        */
> >> -     if ((event->state == PERF_EVENT_STATE_ERROR) ||
> >> -         (event->state == PERF_EVENT_STATE_EXIT))
> >> +     if (event->state == PERF_EVENT_STATE_ERROR)
> >>               return 0;
> >>
> >>       if (count < event->read_size)
> >> --
> >> 1.8.3.1
> >>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to