where's the definition of trace_kfree_skb?

Nicholas Mc Guire der.herr at hofr.at
Tue Mar 28 09:57:03 EDT 2017


On Tue, Mar 28, 2017 at 04:15:57PM +0800, Shiyao Ma wrote:
> Hi,
> I saw this function invocation,
> trace_kfree_skb(skb, __builtin_return_address(0));
> 
> so I grepped the source for "trace_kfree_skb", but I found no where it's defined.
> 
> Where's the definition for it?
>
that is a generated functions so you do not find them in the kernel
sources directly - but you can find the generation points in the
case of trace_kfree_skb thats in
  include/trace/events/skb.h:TRACE_EVENT(kfree_skb,... -> DECLARE_TRACE(...)
and then exported in
  net/core/net-traces.c:EXPORT_TRACEPOINT_SYMBOL_GPL(kfree_skb);
the detailed description of TRACE_EVENT can be found in
  include/linux/tracepoint.h

thx!
hofrat



More information about the Kernelnewbies mailing list