From c1dacd91afb9874948d9e469496620a1aa27f0a9 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Tue, 30 Aug 2016 17:02:09 -0400 Subject: [PATCH] Fix: napi instrumentation for 4.8 kernels Signed-off-by: Mathieu Desnoyers --- instrumentation/events/lttng-module/napi.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/instrumentation/events/lttng-module/napi.h b/instrumentation/events/lttng-module/napi.h index 1126dd4c..7b5ecfc4 100644 --- a/instrumentation/events/lttng-module/napi.h +++ b/instrumentation/events/lttng-module/napi.h @@ -10,6 +10,24 @@ #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 */ -- 2.34.1