Messages in this thread | | | Date | Fri, 17 Apr 2009 11:55:19 -0400 (EDT) | From | Steven Rostedt <> | Subject | Re: [PATCH 2/4] x86/pvops: target CREATE_TRACE_POINTS to particular subsystems |
| |
On Thu, 16 Apr 2009, Jeremy Fitzhardinge wrote: > > diff --git a/include/trace/events/irq.h b/include/trace/events/irq.h > index 75e3468..ddc62f5 100644 > --- a/include/trace/events/irq.h > +++ b/include/trace/events/irq.h > @@ -54,4 +54,9 @@ TRACE_FORMAT(softirq_exit, > #endif /* _TRACE_IRQ_H */ > > /* This part must be outside protection */ > +#ifdef CREATE_IRQ_TRACE_POINTS > +#undef CREATE_IRQ_TRACE_POINTS /* avoid infinite recursion */ > +#include <trace/instantiate_trace.h> > +#else > #include <trace/define_trace.h> > +#endif
> --- /dev/null > +++ b/include/trace/instantiate_trace.h > @@ -0,0 +1,7 @@ > +/* > + * trace/events/foo.h include this when their subsystem-specific > + * CREATE_FOO_TRACE_POINTS is defined. > + */ > +#define CREATE_TRACE_POINTS > +#include <trace/define_trace.h> > +#undef CREATE_TRACE_POINTS
Instead of doing it this way, what about not having this new header, and just do:
#ifdef CREATE_IRQ_TRACE_POINTS #define CREATE_TRACE_POINTS #endif #include <trace/define_trace.h>
Heck, define_trace.h is only defined when CREATE_TRACE_POINTS is defined, why not just remove that and have:
#ifdef CREATE_IRQ_TRACE_POINTS #define <trace/define_trace.h> #endif
The whole trickery with the CREATE_TRACE_POINTS was to avoid the #if in the trace headers anyway. If we can't avoid it. We don't need to add more confusion to the mix.
-- Steve
| |