Re: [PATCH 1/9] perf: Remove redundant parent context check from context_equiv

From: Peter Zijlstra
Date: Mon Sep 08 2014 - 09:34:58 EST


On Mon, Sep 08, 2014 at 02:01:41PM +0200, Jiri Olsa wrote:
> On Mon, Sep 08, 2014 at 12:01:22PM +0200, Peter Zijlstra wrote:
> > On Mon, Sep 08, 2014 at 11:48:55AM +0200, Peter Zijlstra wrote:
> >
> > > > The thing is; I don't understand those reasons. That commit log doesn't
> > > > explain.
> > >
> > > Ah wait, I finally see. I think we want to fix that exit path, not
> > > disallow the cloning.
> > >
> > > The thing is, by not allowing this optimization simple things like eg.
> > > pipe-test say very expensive.
> >
> > So its 179033b3e064 ("perf: Add PERF_EVENT_STATE_EXIT state for events
> > with exited task") that introduces the problem. Before that things would
> > work correctly afaict.
>
> hum, I dont think so.. because the perf_remove_from_context set event
> to PERF_EVENT_STATE_OFF state anyway.. thus making any new cloned events
> disabled

Urgh, see I knew I was missing something.

Can't we fix that? Lemme check to see what relies on this.

Attachment: pgpgy2MzOcJlk.pgp
Description: PGP signature