projects
/
lttng-modules.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: module instrumentation: update to 3.15 kernel
[lttng-modules.git]
/
instrumentation
/
events
/
lttng-module
/
module.h
diff --git
a/instrumentation/events/lttng-module/module.h
b/instrumentation/events/lttng-module/module.h
index 65a8135e26917f670d4655cef8808a40c95ac302..c2d1ad772fb898e6090714eb1a47f692eaedf5ac 100644
(file)
--- a/
instrumentation/events/lttng-module/module.h
+++ b/
instrumentation/events/lttng-module/module.h
@@
-15,6
+15,7
@@
#define _TRACE_MODULE_H
#include <linux/tracepoint.h>
#define _TRACE_MODULE_H
#include <linux/tracepoint.h>
+#include <linux/version.h>
#ifdef CONFIG_MODULES
#ifdef CONFIG_MODULES
@@
-22,10
+23,6
@@
#define _TRACE_MODULE_DEF
struct module;
#define _TRACE_MODULE_DEF
struct module;
-#define show_module_flags(flags) __print_flags(flags, "", \
- { (1UL << TAINT_PROPRIETARY_MODULE), "P" }, \
- { (1UL << TAINT_FORCED_MODULE), "F" }, \
- { (1UL << TAINT_CRAP), "C" })
#endif
TRACE_EVENT(module_load,
#endif
TRACE_EVENT(module_load,
@@
-69,9
+66,15
@@
TRACE_EVENT(module_free,
DECLARE_EVENT_CLASS(module_refcnt,
DECLARE_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),
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_STRUCT__entry(
__field( unsigned long, ip )
TP_STRUCT__entry(
__field( unsigned long, ip )
@@
-81,7
+84,11
@@
DECLARE_EVENT_CLASS(module_refcnt,
TP_fast_assign(
tp_assign(ip, ip)
TP_fast_assign(
tp_assign(ip, ip)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
tp_assign(refcnt, __this_cpu_read(mod->refptr->incs) + __this_cpu_read(mod->refptr->decs))
tp_assign(refcnt, __this_cpu_read(mod->refptr->incs) + __this_cpu_read(mod->refptr->decs))
+#else
+ tp_assign(refcnt, refcnt)
+#endif
tp_strcpy(name, mod->name)
),
tp_strcpy(name, mod->name)
),
@@
-91,16
+98,28
@@
DECLARE_EVENT_CLASS(module_refcnt,
DEFINE_EVENT(module_refcnt, module_get,
DEFINE_EVENT(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)
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
)
DEFINE_EVENT(module_refcnt, module_put,
)
DEFINE_EVENT(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)
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 */
)
#endif /* CONFIG_MODULE_UNLOAD */
This page took
0.025212 seconds
and
4
git commands to generate.