[lttng-dev] [RFC PATCH lttng-modules v2 22/30] Drop support for kernels < 3.0 from module instrumentation

Michael Jeanson mjeanson at efficios.com
Thu Nov 8 16:45:27 EST 2018


Signed-off-by: Michael Jeanson <mjeanson at efficios.com>
---
 instrumentation/events/lttng-module/module.h | 22 +-------------------
 1 file changed, 1 insertion(+), 21 deletions(-)

diff --git a/instrumentation/events/lttng-module/module.h b/instrumentation/events/lttng-module/module.h
index febe8d2..89b1e79 100644
--- a/instrumentation/events/lttng-module/module.h
+++ b/instrumentation/events/lttng-module/module.h
@@ -54,24 +54,16 @@ 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(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)
+		ctf_integer(int, refcnt, __this_cpu_read(mod->refptr->incs) + __this_cpu_read(mod->refptr->decs))
 #endif
 		ctf_string(name, mod->name)
 	)
@@ -79,28 +71,16 @@ LTTNG_TRACEPOINT_EVENT_CLASS(module_refcnt,
 
 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 */
 
-- 
2.17.1



More information about the lttng-dev mailing list