[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20120802084256.GA991@krava.brq.redhat.com>
Date: Thu, 2 Aug 2012 10:42:57 +0200
From: Jiri Olsa <jolsa@...hat.com>
To: Andrew Vagin <avagin@...allels.com>
Cc: "acme@...hat.com" <acme@...hat.com>,
"a.p.zijlstra@...llo.nl" <a.p.zijlstra@...llo.nl>,
"mingo@...e.hu" <mingo@...e.hu>,
"paulus@...ba.org" <paulus@...ba.org>,
"cjashfor@...ux.vnet.ibm.com" <cjashfor@...ux.vnet.ibm.com>,
"fweisbec@...il.com" <fweisbec@...il.com>,
"eranian@...gle.com" <eranian@...gle.com>,
"gorcunov@...nvz.org" <gorcunov@...nvz.org>,
"tzanussi@...il.com" <tzanussi@...il.com>,
"mhiramat@...hat.com" <mhiramat@...hat.com>,
"robert.richter@....com" <robert.richter@....com>,
"fche@...hat.com" <fche@...hat.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"masami.hiramatsu.pt@...achi.com" <masami.hiramatsu.pt@...achi.com>,
"drepper@...il.com" <drepper@...il.com>,
"asharma@...com" <asharma@...com>,
"benjamin.redelings@...cent.org" <benjamin.redelings@...cent.org>,
Andrew Vagin <avagin@...nvz.org>
Subject: Re: [PATCH 07/13] perf: Add attribute to filter out callchains
On Thu, Aug 02, 2012 at 11:38:26AM +0400, Andrew Vagin wrote:
> On Wed, Aug 01, 2012 at 02:10:59PM +0400, Jiri Olsa wrote:
> > From: Frederic Weisbecker <fweisbec@...il.com>
> >
> > Introducing following bits to the the perf_event_attr struct:
> > - exclude_callchain_kernel to filter out kernel callchain
> > from the sample dump
> > - exclude_callchain_user to filter out user callchain
> > from the sample dump
> >
> > We need to be able to disable standard user callchain dump
> > when we use the dwarf cfi callchain mode, because frame
> > pointer based user callchains are useless in this mode.
> >
> > Implementing also exclude_callchain_kernel to have complete
> > set of options.
> >
> > Signed-off-by: Frederic Weisbecker <fweisbec@...il.com>
> > [ Added kernel callchains filtering ]
> > Signed-off-by: Jiri Olsa <jolsa@...hat.com>
> > CC: Andrew Vagin <avagin@...nvz.org>
>
> Acked-by: Andrew Vagin <avagin@...nvz.org>
>
>
> > diff --git a/kernel/events/core.c b/kernel/events/core.c
> > index c4582bb..0902d4a 100644
> > --- a/kernel/events/core.c
> > +++ b/kernel/events/core.c
> > @@ -4130,8 +4130,12 @@ void perf_prepare_sample(struct perf_event_header *header,
> >
> > if (sample_type & PERF_SAMPLE_CALLCHAIN) {
> > int size = 1;
> > + int kernel = !event->attr.exclude_callchain_kernel;
> > + int user = !event->attr.exclude_callchain_user;
> >
> > - data->callchain = perf_callchain(event, regs);
> > + if (kernel || user)
> > + data->callchain = perf_callchain(event, regs,
> > + kernel, user);
> I am not sure, that we need two arguments kernel and user here,
> we can get them from event inside perf_callchain...
right.. I'll send an update with other fixies
thanks
jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists