[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110411173536.GA29895@ghostprotocols.net>
Date: Mon, 11 Apr 2011 14:35:36 -0300
From: Arnaldo Carvalho de Melo <acme@...hat.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: mingo@...hat.com, hpa@...or.com, paulus@...ba.org,
eranian@...gle.com, linux-kernel@...r.kernel.org,
tzanussi@...il.com, efault@....de, fweisbec@...il.com,
dsahern@...il.com, tglx@...utronix.de, mingo@...e.hu,
linux-tip-commits@...r.kernel.org
Subject: Re: [tip:perf/core] perf evsel: Fix inverted test for fixing up
attr.inherit flag
Em Sat, Apr 09, 2011 at 04:05:42PM +0200, Peter Zijlstra escreveu:
> On Tue, 2011-02-22 at 09:10 +0000, tip-bot for Arnaldo Carvalho de Melo
> wrote:
> > Commit-ID: e603dc15072c7fec0ae263597e6dabc3bb4c5c5b
> > Gitweb: http://git.kernel.org/tip/e603dc15072c7fec0ae263597e6dabc3bb4c5c5b
> > Author: Arnaldo Carvalho de Melo <acme@...hat.com>
> > AuthorDate: Mon, 21 Feb 2011 16:05:50 -0300
> > Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
> > CommitDate: Mon, 21 Feb 2011 22:27:59 -0300
> >
> > perf evsel: Fix inverted test for fixing up attr.inherit flag
> >
> > The kernel refuses mmapping an event with the inherit flag set for
> > something that is systemwide (cpu == -1), and the evsel layer got this
> > reversed at some point, fix it.
> >
> > + * Proper fix is not to pass 'inherit' to perf_evsel__open*,
> > + * but a 'flags' parameter, with 'group' folded there as well,
> > + * then introduce a PERF_O_{MMAP,GROUP,INHERIT} enum, and if
> > + * O_MMAP is set, emit a warning if cpu < 0 and O_INHERIT is
> > + * set. Lets go for the minimal fix first tho.
> > + */
> > + evsel->attr.inherit = (cpus->map[cpu] >= 0) && inherit;
> This wrecked perf-stat, perf-stat doesn't mmap and its perfectly fine
> for it to use task-bound counters with inheritance.
Can you check if the patch below fixes this? An acked-by or tested-by
tag would be mucho appreciated.
- Arnaldo
View attachment "0001-perf-evsel-Fix-use-of-inherit-in-non-mmap-case.patch" of type "text/plain" (4195 bytes)
Powered by blists - more mailing lists