[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1274284201.5605.11212.camel@twins>
Date: Wed, 19 May 2010 17:50:01 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: rostedt@...dmis.org
Cc: Frederic Weisbecker <fweisbec@...il.com>,
Ingo Molnar <mingo@...e.hu>, Paul Mackerras <paulus@...ba.org>,
Arnaldo Carvalho de Melo <acme@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 5/5] perf: Implement perf_output_addr()
On Wed, 2010-05-19 at 11:38 -0400, Steven Rostedt wrote:
> > No, but suppose the tracepoint has a racy expression in it. Having to
> > evaluate { assign; } multiple times could yield different results, which
> > in turn means you have to run the filter multiple times too, etc..
>
> I'm still a bit confused by what you mean here. Could you show an
> example?
Well, suppose { assign; } contains:
entry->foo = atomic_read(&bar);
Now suppose you have multiple active consumers of the tracepoint, either
you do the evaluation once and copy that around, or you do it multiple
times and end up with different results.
> > Although I suppose you could delay the commit of the first even and copy
> > from there into the next events, but that might give rather messy code.
> >
> > > Note, the shrinking of the TRACE_EVENT() code that I pushed (and I'm
> > > hoping makes it to 35 since it lays the ground work for lots of features
> > > on top of TRACE_EVENT()), allows you to pass private data to each probe
> > > registered to the tracepoint. Letting the same function handle two
> > > different activities, or different tracepoints.
> >
> > tracepoint_probe_register() is useless, it requires scheduling. I
> > currently register a probe on pref_event creation and then maintain a
> > per-cpu hlist of active events.
>
> When is perf_event creation? When the user runs the code or at boot up?
sys_perf_counter_open()
And an event could be per task, so it needs to be scheduled along with
the task context, try doing that with probes ;-)
> Hmm, could be, don't know for sure. I just want to keep the macro magic
> to a minimum ;-)
Right, but filters evaluated at the point where you basically already
done all the hard work simply don't make much sense in my book.
--
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