X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=instrumentation%2Fevents%2Flttng-module%2Fskb.h;h=c8a616067e63136cb2ba40a7ff927832733fd6c3;hb=162774b4f9c238e47e94f2df69d43232e6bfd360;hp=9a794499c667936a7b67377fbebda94e75da122a;hpb=b283666ff19841a28b0448c6a867beb2f809f11a;p=lttng-modules.git diff --git a/instrumentation/events/lttng-module/skb.h b/instrumentation/events/lttng-module/skb.h index 9a794499..c8a61606 100644 --- a/instrumentation/events/lttng-module/skb.h +++ b/instrumentation/events/lttng-module/skb.h @@ -7,6 +7,7 @@ #include #include #include +#include /* * Tracepoint for free an sk_buff: @@ -24,15 +25,16 @@ TRACE_EVENT(kfree_skb, ), TP_fast_assign( - tp_assign(skbaddr, skb); - tp_assign(location, location); - tp_assign(protocol, ntohs(skb->protocol)); + tp_assign(skbaddr, skb) + tp_assign(location, location) + tp_assign(protocol, ntohs(skb->protocol)) ), TP_printk("skbaddr=%p protocol=%u location=%p", __entry->skbaddr, __entry->protocol, __entry->location) ) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) TRACE_EVENT(consume_skb, TP_PROTO(struct sk_buff *skb), @@ -44,12 +46,14 @@ TRACE_EVENT(consume_skb, ), TP_fast_assign( - tp_assign(skbaddr, skb); + tp_assign(skbaddr, skb) ), TP_printk("skbaddr=%p", __entry->skbaddr) ) +#endif +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)) TRACE_EVENT(skb_copy_datagram_iovec, TP_PROTO(const struct sk_buff *skb, int len), @@ -62,12 +66,13 @@ TRACE_EVENT(skb_copy_datagram_iovec, ), TP_fast_assign( - tp_assign(skbaddr, skb); - tp_assign(len, len); + tp_assign(skbaddr, skb) + tp_assign(len, len) ), TP_printk("skbaddr=%p len=%d", __entry->skbaddr, __entry->len) ) +#endif #endif /* _TRACE_SKB_H */