Prev: vmscan: remove wait_on_page_writeback() from pageout()
Next: [PATCH net-next] drivers/net/bfin_mac.c: Use pr_fmt, netdev_<level>
From: Jack Daniel on 28 Jul 2010 06:00 Greetings, With reference to the function update_stats_wait_end(), there seems to be a call to trace_sched_stat_wait(). But strangely I can find no definition of this function even though the kernel compiles without any errors. There is no reference to this function trace_sched_stat_wait() in the System.map file either, which means this is not getting compiled? Could someone please make sense of this absurdity. Thanks, Jack -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Li Zefan on 28 Jul 2010 06:20 Jack Daniel wrote: > Greetings, > > With reference to the function update_stats_wait_end(), there seems to > be a call to trace_sched_stat_wait(). But strangely I can find no > definition of this function even though the kernel compiles without > any errors. There is no reference to this function > trace_sched_stat_wait() in the System.map file either, which means > this is not getting compiled? Could someone please make sense of this > absurdity. > It's generated in include/trace/events/sched.h: DEFINE_EVENT(sched_stat_template, sched_stat_wait, TP_PROTO(struct task_struct *tsk, u64 delay), TP_ARGS(tsk, delay)); And the trace_xxx() function is defined by macros in include/linux/tracepoint.h: #define __DECLARE_TRACE(name, proto, args, data_proto, data_args) \ extern struct tracepoint __tracepoint_##name; \ static inline void trace_##name(proto) \ { \ if (unlikely(__tracepoint_##name.state)) \ __DO_TRACE(&__tracepoint_##name, \ TP_PROTO(data_proto), \ TP_ARGS(data_args)); \ } ... -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Jack Daniel on 28 Jul 2010 06:30
On Wed, Jul 28, 2010 at 3:47 PM, Li Zefan <lizf(a)cn.fujitsu.com> wrote: > Jack Daniel wrote: >> Greetings, >> >> With reference to the function update_stats_wait_end(), there seems to >> be a call to trace_sched_stat_wait(). But strangely I can find no >> definition of this function even though the kernel compiles without >> any errors. There is no reference to this function >> trace_sched_stat_wait() in the System.map file either, which means >> this is not getting compiled? Could someone please make sense of this >> absurdity. >> > > It's generated in include/trace/events/sched.h: > > DEFINE_EVENT(sched_stat_template, sched_stat_wait, > � � � � � � TP_PROTO(struct task_struct *tsk, u64 delay), > � � � � � � TP_ARGS(tsk, delay)); > > > And the trace_xxx() function is defined by macros in include/linux/tracepoint.h: > > #define __DECLARE_TRACE(name, proto, args, data_proto, data_args) � � � \ > � � � �extern struct tracepoint __tracepoint_##name; � � � � � � � � � \ > � � � �static inline void trace_##name(proto) � � � � � � � � � � � � �\ > � � � �{ � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � \ > � � � � � � � �if (unlikely(__tracepoint_##name.state)) � � � � � � � �\ > � � � � � � � � � � � �__DO_TRACE(&__tracepoint_##name, � � � � � � � �\ > � � � � � � � � � � � � � � � �TP_PROTO(data_proto), � � � � � � � � � \ > � � � � � � � � � � � � � � � �TP_ARGS(data_args)); � � � � � � � � � �\ > � � � �} > � � � �... > AH! thanks a lot for pointing this out. Regards, Jack -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |