X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=instrumentation%2Fevents%2Flttng-module%2Fmodule.h;h=5299e17f54e55f87e99e1181cefd6dea057c1707;hb=3cb4322863d147ebbddfda8e36dc3cd5968a5a49;hp=f7b6056f1eec680dfa1ab968ce4eede09ee4e142;hpb=6ec43db836429730c1431809049197a4fbe820fa;p=lttng-modules.git diff --git a/instrumentation/events/lttng-module/module.h b/instrumentation/events/lttng-module/module.h index f7b6056f..5299e17f 100644 --- a/instrumentation/events/lttng-module/module.h +++ b/instrumentation/events/lttng-module/module.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * Because linux/module.h has tracepoints in the header, and ftrace.h * eventually includes this file, define_trace.h includes linux/module.h @@ -15,7 +16,6 @@ #define LTTNG_TRACE_MODULE_H #include -#include #ifdef CONFIG_MODULES @@ -53,53 +53,29 @@ LTTNG_TRACEPOINT_EVENT(module_free, LTTNG_TRACEPOINT_EVENT_CLASS(module_refcnt, -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) TP_PROTO(struct module *mod, unsigned long ip), TP_ARGS(mod, ip), -#else - TP_PROTO(struct module *mod, unsigned long ip, int refcnt), - - TP_ARGS(mod, ip, refcnt), -#endif TP_FIELDS( - ctf_integer(unsigned long, ip, ip) -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)) + ctf_integer_hex(unsigned long, ip, ip) ctf_integer(int, refcnt, atomic_read(&mod->refcnt)) -#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) - ctf_integer(int, refcnt, __this_cpu_read(mod->refptr->incs) + __this_cpu_read(mod->refptr->decs)) -#else - ctf_integer(int, refcnt, refcnt) -#endif ctf_string(name, mod->name) ) ) LTTNG_TRACEPOINT_EVENT_INSTANCE(module_refcnt, module_get, -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) TP_PROTO(struct module *mod, unsigned long ip), TP_ARGS(mod, ip) -#else - TP_PROTO(struct module *mod, unsigned long ip, int refcnt), - - TP_ARGS(mod, ip, refcnt) -#endif ) LTTNG_TRACEPOINT_EVENT_INSTANCE(module_refcnt, module_put, -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) TP_PROTO(struct module *mod, unsigned long ip), TP_ARGS(mod, ip) -#else - TP_PROTO(struct module *mod, unsigned long ip, int refcnt), - - TP_ARGS(mod, ip, refcnt) -#endif ) #endif /* CONFIG_MODULE_UNLOAD */ @@ -110,7 +86,7 @@ LTTNG_TRACEPOINT_EVENT(module_request, TP_ARGS(name, wait, ip), TP_FIELDS( - ctf_integer(unsigned long, ip, ip) + ctf_integer_hex(unsigned long, ip, ip) ctf_integer(bool, wait, wait) ctf_string(name, name) )