X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=instrumentation%2Fevents%2Flttng-module%2Fnapi.h;h=168163669403cd7840888a79d6c3f95ef5146655;hb=2d0428212cbfa3f8428feee160b095f48c2ac974;hp=e6dc225dc705cc956794c0ec62775bdebcf4f03e;hpb=fa91fcac4c680df04d6860ff365976d8ad08559b;p=lttng-modules.git diff --git a/instrumentation/events/lttng-module/napi.h b/instrumentation/events/lttng-module/napi.h index e6dc225d..16816366 100644 --- a/instrumentation/events/lttng-module/napi.h +++ b/instrumentation/events/lttng-module/napi.h @@ -1,15 +1,34 @@ +/* SPDX-License-Identifier: GPL-2.0 */ #undef TRACE_SYSTEM #define TRACE_SYSTEM napi #if !defined(LTTNG_TRACE_NAPI_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_NAPI_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #include #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,9 +41,11 @@ LTTNG_TRACEPOINT_EVENT(napi_poll, ) ) +#endif + #undef NO_DEV #endif /* LTTNG_TRACE_NAPI_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include