lkml.org 
[lkml]   [2010]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: disabling group leader perf_event
From
Date
Hi,

On Mon, 2010-09-06 at 09:16 -0400, Steven Rostedt wrote:
> Sorry for top post, sending via my android phone. Today's a US holiday.
>
>
> We can filter before the work, if we expose the parameters. Currently we filter what goes into the buffer and there are several cases where we don't know the result before the work.
>
> If we also expose the parameters of a TRACE_EVENT, then we can filter on them before the work.

I'm not sure exactly what you mean by exposing the parameters, but yeah,
in general it should be possible to filter on any field you can get the
address of, before you ever allocate space for the event or assign the
field to it.

In the cases where you don't know the result until you do the work, such
as for example this from kvm_age_page tracepoint:

TP_fast_assign(
__entry->hva = hva;
__entry->gfn =
slot->base_gfn + ((hva - slot->userspace_addr) >>
PAGE_SHIFT);
__entry->referenced = ref;
),

I guess you'd want the macro to assign the result to a temporary in
order to be able to participate in the filtering, or did you have
something else in mind?

Tom

> -- Steve
>
> "Ingo Molnar" <mingo@elte.hu> wrote:
>
> >
> >* Peter Zijlstra <peterz@infradead.org> wrote:
> >
> >> On Mon, 2010-09-06 at 14:58 +0300, Avi Kivity wrote:
> >> > On 09/06/2010 02:54 PM, Peter Zijlstra wrote:
> >> > >
> >> > >> Basically, to read() all events in one go. I have many of them.
> >> > >>
> >> > >> My current problem is that I have an event (kvm_exit) which I want to
> >> > >> drill down by looking at a field (exit_reason). So I create lots of
> >> > >> separate perf_events with a filter for each reason:
> >> > >> kvm_exit(exit_reason==0), kvm_exit(exit_reason==1), etc. But filters
> >> > >> are fairly slow (can have ~60 such events on AMD), so I want to make
> >> > >> this drill-down optional.
> >> > > Yeah, filters suck.
> >> >
> >> > Any idea why? I saw nothing obvious in the code, except that there
> >> > is lots of it.
> >>
> >> It filters after it does all the hard work of creating the trace
> >> event, instead of before.
> >
> >Btw., that's an implementational property of filters that would be nice
> >to fix.
> >
> >If it's not doable within CPP then outside of it.
> >
> > Ingo
>




\
 
 \ /
  Last update: 2010-09-06 18:45    [W:0.110 / U:0.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site