X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=instrumentation%2Fevents%2Flttng-module%2Fmodule.h;h=bc9493adba556b2ded8f58212858507d76a6f03b;hb=7cb18afaf252ce42658beb6d38b9a1fed2395a28;hp=83d191f497f83748f575ecae68e36f245b107d0a;hpb=3bc29f0a41b3c803245b845db2e1909042e72e9c;p=lttng-modules.git 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)