X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=instrumentation%2Fevents%2Flttng-module%2Fnapi.h;h=46d7ee2cdfcad6a244c40211ae4720f4b93cdf88;hb=360d3efee55154a55c18be32175bee608dcb21df;hp=1126dd4c29badb5f94fbae7c4395ecf13fa5a830;hpb=6ec43db836429730c1431809049197a4fbe820fa;p=lttng-modules.git diff --git a/instrumentation/events/lttng-module/napi.h b/instrumentation/events/lttng-module/napi.h index 1126dd4c..46d7ee2c 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 (LTTNG_LINUX_VERSION_CODE >= LTTNG_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 */