From: Mathieu Desnoyers Date: Sun, 28 Dec 2014 13:53:34 +0000 (-0500) Subject: Fix: update module instrumentation for 3.19+ kernels X-Git-Tag: v2.7.0-rc1~91 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=b4feff86e340cc7d5c6cad5709614acf8d7e9a50;p=lttng-modules.git Fix: update module instrumentation for 3.19+ kernels Signed-off-by: Mathieu Desnoyers --- diff --git a/instrumentation/events/lttng-module/module.h b/instrumentation/events/lttng-module/module.h index 83d191f4..bc9493ad 100644 --- a/instrumentation/events/lttng-module/module.h +++ b/instrumentation/events/lttng-module/module.h @@ -84,7 +84,9 @@ LTTNG_TRACEPOINT_EVENT_CLASS(module_refcnt, TP_fast_assign( tp_assign(ip, ip) -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)) + tp_assign(refcnt, atomic_read(&mod->refcnt)) +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) tp_assign(refcnt, __this_cpu_read(mod->refptr->incs) + __this_cpu_read(mod->refptr->decs)) #else tp_assign(refcnt, refcnt)