Re: [PATCH resend] tracing/events: convert NAPI's tracepoint viaTRACE_EVENT

From: Neil Horman
Date: Tue Sep 01 2009 - 07:04:59 EST


On Tue, Sep 01, 2009 at 09:06:44AM +0800, Xiao Guangrong wrote:
>
>
> Steven Rostedt wrote:
> > On Mon, 31 Aug 2009, Xiao Guangrong wrote:
> >
> >> - Convert NAPI's tracepoint via TRACE_EVENT macro, the output information
> >> like below:
> >>
> >> sshd-2503 [000] 71.920846: napi_poll: ifname=eth0 state=0 weigth=16 poll=pcnet32_poll
> >> sshd-2503 [000] 72.020291: napi_poll: ifname=eth0 state=0 weigth=16 poll=pcnet32_poll
> >> sshd-2503 [000] 72.020418: napi_poll: ifname=eth0 state=NAPI_STATE_SCHED weigth=16 poll=pcnet32_poll
> >>
> >> - Remove the "DECLARE_TRACE" definiens in include/trace/define_trace.h,
> >> because TRACE_EVENT not use it
> >
> > The above really needs to be in a separate patch, since it is a tracing
> > infrastructure change.
> >
>
> Hi Steven,
>
> We can't break this patch into two patches, because it's has redefined 'DECLARE_TRACE'
> in include/trace/define_trace.h, like below:
>
> 1: if we remove 'DECLARE_TRACE' first, then NAPI's tracepoint can't define tracepoint
> (it's a NAPI tracepoint's bug,
> see my previous patch: http://marc.info/?l=linux-kernel&m=125118032931716&w=2)
>
> 2: if we convert NAPI's tracepoint first, it can't include more TRACE_EVENT .h files in
> one .c file, the compiler will complain with variables redefined:
>
> include/trace/events/napi.h:15: error: redefinition of â__tpstrtab_napi_pollâ
> include/trace/events/napi.h:15: error: previous definition of â__tpstrtab_napi_pollâ was here
> include/trace/events/napi.h:15: error: redefinition of â__tracepoint_napi_pollâ
> include/trace/events/napi.h:15: error: previous definition of â__tracepoint_napi_pollâ was here
> In file included from include/trace/ftrace.h:644,
>
> So, I think we do better fix this bug early, then other people can go on his work on ftrace.
>
> Hi Neil,
>
> How do you think about this patch, can you give me some comments?
>
For the things that I use the napi_poll traepoint for, this is all fine by me,
so ack as far as that goes, but I'm probably not qualified to comment on the
tracepoint infrastructure changes you've made (the recent skb ftracer argument
is like a good indicator of that :) )

Neil

>
> Thanks,
> Xiao
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/