Fix: napi instrumentation for 4.8 kernels
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 30 Aug 2016 21:02:09 +0000 (17:02 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 30 Aug 2016 21:02:09 +0000 (17:02 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
instrumentation/events/lttng-module/napi.h

index 1126dd4c29badb5f94fbae7c4395ecf13fa5a830..7b5ecfc468df2832c49f4456514529df8ad45490 100644 (file)
 
 #define NO_DEV "(no_device)"
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0))
+
+LTTNG_TRACEPOINT_EVENT(napi_poll,
+
+       TP_PROTO(struct napi_struct *napi, int work, int budget),
+
+       TP_ARGS(napi, work, budget),
+
+       TP_FIELDS(
+               ctf_integer_hex(struct napi_struct *, napi, napi)
+               ctf_string(dev_name, napi->dev ? napi->dev->name : NO_DEV)
+               ctf_integer(int, work, work)
+               ctf_integer(int, budget, budget)
+       )
+)
+
+#else
+
 LTTNG_TRACEPOINT_EVENT(napi_poll,
 
        TP_PROTO(struct napi_struct *napi),
@@ -22,6 +40,8 @@ LTTNG_TRACEPOINT_EVENT(napi_poll,
        )
 )
 
+#endif
+
 #undef NO_DEV
 
 #endif /* LTTNG_TRACE_NAPI_H */
This page took 0.026419 seconds and 4 git commands to generate.