Re: [PATCH 0/8] [GIT PULL] TRACE_EVENT for modules

Mathieu Desnoyers
2009-04-16T02:29:43Z

* Ingo Molnar (mingo@elte.hu) wrote:
>
> * Jeremy Fitzhardinge <jeremy@goop.org> wrote:
>
> > Steven Rostedt wrote:
> >> On Tue, 14 Apr 2009, Jeremy Fitzhardinge wrote:
> >>
> >>
> >>> Theodore Tso wrote:
> >>>
> >>>> Any chance you could support something like this?
> >>>>
> >>>>
> >>> I think that's already there. I'm defining
> >>> arch/x86/include/asm/paravirt-trace.h with:
> >>>
> >>> #ifndef _ASM_X86_PARAVIRT_TRACE_H
> >>> #define _ASM_X86_PARAVIRT_TRACE_H
> >>>
> >>> #include <linux/tracepoint.h>
> >>> #include <asm/paravirt_types.h>
> >>>
> >>> #undef TRACE_SYSTEM
> >>> #define TRACE_SYSTEM pvops
> >>>
> >>> #define TRACE_INCLUDE_FILE paravirt-trace
> >>> #define TRACE_INCLUDE_PATH asm
> >>> [...]
> >>>
> >>>
> >>> Which ends up including <asm/paravirt-trace.h>
> >>>
> >>
> >> Not quite. It ends up looking like
> >>
> >> #include "asm/paravirt-trace.h"
> >>
> >> As long as there is no "asm" directory in the include/trace directory,
> >> I think that is fine.
> >
> > OK.
> >
> > I'm having a bit of trouble with paravirt-trace.h when I actually
> > include it in paravirt.h. asm/paravirt.h is itself included in
> > lots of places, and so its fairly easy to end up with cyclic
> > include dependencies which are fairly painful. In this case I'm
> > seeing asm/paravirt.h -> linux/tracepoint.h -> linux/rcupate.h ->
> > {lots of stuff}, which gives errors like:
>
> tracepoint.h should not include any complex headers like rcupdate.h.
>
> > I'm wondering if there's much downside in making the code
> > __DO_TRACE() out of line so that we can make tracepoint.h have
> > absolutely minimal include dependencies?
>
> yeah.
>
> And besides, the rcu_read_lock_sched_notrace() there should probably
> be a preempt_disable_notrace() / preempt_enable_notrace() variant.
> (it's sligtly faster that way and we better be atomic and
> self-sufficient in tracepoints anyway)
>

Yes, rcu_read_(un)lock_sched_notrace maps directly to
preempt_(en/dis)able_notrace. But for RCU verifiability's sake, I made
sure to create rcu_read_lock versions of these primitives instead of
simply using preempt_disable. Maybe we should simply take those
low-level primitives out of rcupdate.h and put them in a simpler header?

Mathieu

> Ingo
>

--
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68