Fix: update module instrumentation for 3.19+ kernels
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sun, 28 Dec 2014 13:53:34 +0000 (08:53 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sun, 28 Dec 2014 13:59:13 +0000 (08:59 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
instrumentation/events/lttng-module/module.h

index 83d191f497f83748f575ecae68e36f245b107d0a..bc9493adba556b2ded8f58212858507d76a6f03b 100644 (file)
@@ -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)
This page took 0.025979 seconds and 4 git commands to generate.