projects
/
lttng-modules.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: compaction instrumentation update for 3.14.x stable kernels
[lttng-modules.git]
/
instrumentation
/
events
/
lttng-module
/
net.h
diff --git
a/instrumentation/events/lttng-module/net.h
b/instrumentation/events/lttng-module/net.h
index c25b0d92f6b416084592d44a058ebb6775e8efd4..e552cf7ba8a66487a49df424cb47af56e892b42c 100644
(file)
--- a/
instrumentation/events/lttng-module/net.h
+++ b/
instrumentation/events/lttng-module/net.h
@@
-8,29
+8,50
@@
#include <linux/netdevice.h>
#include <linux/ip.h>
#include <linux/tracepoint.h>
#include <linux/netdevice.h>
#include <linux/ip.h>
#include <linux/tracepoint.h>
+#include <linux/version.h>
TRACE_EVENT(net_dev_xmit,
TRACE_EVENT(net_dev_xmit,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,40))
TP_PROTO(struct sk_buff *skb,
int rc,
struct net_device *dev,
unsigned int skb_len),
TP_ARGS(skb, rc, dev, skb_len),
TP_PROTO(struct sk_buff *skb,
int rc,
struct net_device *dev,
unsigned int skb_len),
TP_ARGS(skb, rc, dev, skb_len),
+#else
+ TP_PROTO(struct sk_buff *skb,
+ int rc),
+
+ TP_ARGS(skb, rc),
+#endif
TP_STRUCT__entry(
__field( void *, skbaddr )
__field( unsigned int, len )
__field( int, rc )
TP_STRUCT__entry(
__field( void *, skbaddr )
__field( unsigned int, len )
__field( int, rc )
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,40))
__string( name, dev->name )
__string( name, dev->name )
+#else
+ __string( name, skb->dev->name )
+#endif
),
),
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,40))
+ TP_fast_assign(
+ tp_assign(skbaddr, skb)
+ tp_assign(len, skb_len)
+ tp_assign(rc, rc)
+ tp_strcpy(name, dev->name)
+ ),
+#else
TP_fast_assign(
TP_fast_assign(
- tp_assign(skbaddr, skb)
;
- tp_assign(len, skb
_len);
- tp_assign(rc, rc)
;
- tp_strcpy(name,
dev->name);
+ tp_assign(skbaddr, skb)
+ tp_assign(len, skb
->len)
+ tp_assign(rc, rc)
+ tp_strcpy(name,
skb->dev->name)
),
),
+#endif
TP_printk("dev=%s skbaddr=%p len=%u rc=%d",
__get_str(name), __entry->skbaddr, __entry->len, __entry->rc)
TP_printk("dev=%s skbaddr=%p len=%u rc=%d",
__get_str(name), __entry->skbaddr, __entry->len, __entry->rc)
@@
-49,9
+70,9
@@
DECLARE_EVENT_CLASS(net_dev_template,
),
TP_fast_assign(
),
TP_fast_assign(
- tp_assign(skbaddr, skb)
;
- tp_assign(len, skb->len)
;
- tp_strcpy(name, skb->dev->name)
;
+ tp_assign(skbaddr, skb)
+ tp_assign(len, skb->len)
+ tp_strcpy(name, skb->dev->name)
),
TP_printk("dev=%s skbaddr=%p len=%u",
),
TP_printk("dev=%s skbaddr=%p len=%u",
This page took
0.025034 seconds
and
4
git commands to generate.