#include <linux/vmalloc.h>
#include <wrapper/random.h>
-#include <wrapper/tracepoint.h>
#include <wrapper/list.h>
#include <wrapper/types.h>
#include <lttng-kernel-version.h>
#include <lttng-abi-old.h>
#include <lttng-endian.h>
#include <lttng-string-utils.h>
+#include <lttng-tracepoint.h>
#include <wrapper/ringbuffer/backend.h>
#include <wrapper/ringbuffer/frontend.h>
desc = event->desc;
switch (event->instrumentation) {
case LTTNG_KERNEL_TRACEPOINT:
- ret = lttng_wrapper_tracepoint_probe_register(desc->kname,
- desc->probe_callback,
- event);
+ ret = lttng_tracepoint_probe_register(desc->kname,
+ desc->probe_callback,
+ event);
break;
case LTTNG_KERNEL_SYSCALL:
ret = lttng_syscall_filter_enable(event->chan,
desc = event->desc;
switch (event->instrumentation) {
case LTTNG_KERNEL_TRACEPOINT:
- ret = lttng_wrapper_tracepoint_probe_unregister(event->desc->kname,
+ ret = lttng_tracepoint_probe_unregister(event->desc->kname,
event->desc->probe_callback,
event);
break;
{
int ret;
- ret = wrapper_lttng_fixup_sig(THIS_MODULE);
- if (ret)
- return ret;
ret = wrapper_get_pfnblock_flags_mask_init();
if (ret)
return ret;
#include <lttng-tracer.h>
#include <wrapper/namespace.h>
#include <wrapper/irq.h>
-#include <wrapper/tracepoint.h>
#include <wrapper/genhd.h>
#include <wrapper/file.h>
static
int __init lttng_statedump_init(void)
{
- /*
- * Allow module to load even if the fixup cannot be done. This
- * will allow seemless transition when the underlying issue fix
- * is merged into the Linux kernel, and when tracepoint.c
- * "tracepoint_module_notify" is turned into a static function.
- */
- (void) wrapper_lttng_fixup_sig(THIS_MODULE);
return 0;
}
#include <asm/syscall.h>
#include <lib/bitfield.h>
-#include <wrapper/tracepoint.h>
#include <wrapper/file.h>
#include <wrapper/rcu.h>
#include <wrapper/syscall.h>
#include <lttng-events.h>
+#include "lttng-tracepoint.h"
#ifndef CONFIG_COMPAT
# ifndef is_compat_task
return ret;
#endif
if (!chan->sys_enter_registered) {
- ret = lttng_wrapper_tracepoint_probe_register("sys_enter",
+ ret = lttng_tracepoint_probe_register("sys_enter",
(void *) syscall_entry_probe, chan);
if (ret)
return ret;
* conflict with sys_exit syscall entry.
*/
if (!chan->sys_exit_registered) {
- ret = lttng_wrapper_tracepoint_probe_register("sys_exit",
+ ret = lttng_tracepoint_probe_register("sys_exit",
(void *) syscall_exit_probe, chan);
if (ret) {
- WARN_ON_ONCE(lttng_wrapper_tracepoint_probe_unregister("sys_enter",
+ WARN_ON_ONCE(lttng_tracepoint_probe_unregister("sys_enter",
(void *) syscall_entry_probe, chan));
return ret;
}
if (!chan->sc_table)
return 0;
if (chan->sys_enter_registered) {
- ret = lttng_wrapper_tracepoint_probe_unregister("sys_enter",
+ ret = lttng_tracepoint_probe_unregister("sys_enter",
(void *) syscall_entry_probe, chan);
if (ret)
return ret;
chan->sys_enter_registered = 0;
}
if (chan->sys_exit_registered) {
- ret = lttng_wrapper_tracepoint_probe_unregister("sys_exit",
+ ret = lttng_tracepoint_probe_unregister("sys_exit",
(void *) syscall_exit_probe, chan);
if (ret)
return ret;
#include <lttng-tracepoint.h>
#include <wrapper/list.h>
-#include <wrapper/tracepoint.h>
/*
* Protect the tracepoint table. lttng_tracepoint_mutex nests within
struct tracepoint_entry *e;
struct lttng_tp_probe *p;
- tp = lttng_tracepoint_ptr_deref(&tp_mod->mod->tracepoints_ptrs[i]);
+ tp = tracepoint_ptr_deref(&tp_mod->mod->tracepoints_ptrs[i]);
e = get_tracepoint(tp->name);
if (!e) {
e = add_tracepoint(tp->name);
struct tracepoint_entry *e;
struct lttng_tp_probe *p;
- tp = lttng_tracepoint_ptr_deref(&tp_mod->mod->tracepoints_ptrs[i]);
+ tp = tracepoint_ptr_deref(&tp_mod->mod->tracepoints_ptrs[i]);
e = get_tracepoint(tp->name);
if (!e || !e->tp)
continue;
#include <linux/hash.h>
#include <linux/rcupdate.h>
-#include <wrapper/tracepoint.h>
#include <wrapper/rcu.h>
#include <wrapper/list.h>
#include <lttng-events.h>
*/
#include <trace/events/block.h>
-#include <wrapper/tracepoint.h>
+#include "lttng-tracepoint.h"
/*
* Create LTTng tracepoint probes.
#include <trace/events/ext4.h>
#include <lttng-kernel-version.h>
-#include <wrapper/tracepoint.h>
+#include "lttng-tracepoint.h"
/*
* Create LTTng tracepoint probes.
*/
#include <trace/events/irq.h>
-#include <wrapper/tracepoint.h>
+#include "lttng-tracepoint.h"
/*
* Create LTTng tracepoint probes.
*/
#include <trace/events/jbd2.h>
-#include <wrapper/tracepoint.h>
+#include "lttng-tracepoint.h"
/*
* Create LTTng tracepoint probes.
*/
#include <trace/events/kmem.h>
-#include <wrapper/tracepoint.h>
+#include "lttng-tracepoint.h"
/*
* Create LTTng tracepoint probes.
* Create the tracepoint static inlines from the kernel to validate that our
* trace event macros match the kernel we run on.
*/
-#include <wrapper/tracepoint.h>
+#include "lttng-tracepoint.h"
#include <../../arch/x86/kvm/mmutrace.h>
*/
#include <trace/events/kvm.h>
-#include <wrapper/tracepoint.h>
+#include "lttng-tracepoint.h"
/*
* Create LTTng tracepoint probes.
*/
#include <trace/events/kvm.h>
-#include <wrapper/tracepoint.h>
+#include "lttng-tracepoint.h"
/*
* Create LTTng tracepoint probes.
* trace event macros match the kernel we run on.
*/
#include <trace/events/lock.h>
-#include <wrapper/tracepoint.h>
+#include "lttng-tracepoint.h"
/*
* Create LTTng tracepoint probes.
*/
#include <trace/events/module.h>
-#include <wrapper/tracepoint.h>
+#include "lttng-tracepoint.h"
/*
* Create LTTng tracepoint probes.
*/
#include <trace/events/napi.h>
-#include <wrapper/tracepoint.h>
+#include "lttng-tracepoint.h"
/*
* Create LTTng tracepoint probes.
*/
#include <trace/events/power.h>
-#include <wrapper/tracepoint.h>
+#include "lttng-tracepoint.h"
/*
* Create LTTng tracepoint probes.
*/
#include <trace/events/sched.h>
-#include <wrapper/tracepoint.h>
+#include "lttng-tracepoint.h"
/*
* Create LTTng tracepoint probes.
*/
#include <trace/events/skb.h>
-#include <wrapper/tracepoint.h>
+#include "lttng-tracepoint.h"
/*
* Create LTTng tracepoint probes.
#include <linux/sched.h>
#include <trace/events/timer.h>
-#include <wrapper/tracepoint.h>
+#include "lttng-tracepoint.h"
/*
* Create LTTng tracepoint probes.
*/
#include <trace/events/workqueue.h>
-#include <wrapper/tracepoint.h>
+#include "lttng-tracepoint.h"
/*
* Create LTTng tracepoint probes.
*/
#include <asm/trace/exceptions.h>
-#include <wrapper/tracepoint.h>
+#include "lttng-tracepoint.h"
#undef TRACE_INCLUDE_PATH
#undef TRACE_INCLUDE_FILE
*/
#include <asm/trace/irq_vectors.h>
-#include <wrapper/tracepoint.h>
+#include "lttng-tracepoint.h"
#undef TRACE_INCLUDE_PATH
#undef TRACE_INCLUDE_FILE
#include <lttng-events.h>
#include <lttng-tracer.h>
-#include <wrapper/tracepoint.h>
#define TP_MODULE_NOAUTOLOAD
#define LTTNG_PACKAGE_BUILD
{
int ret = 0;
- (void) wrapper_lttng_fixup_sig(THIS_MODULE);
lttng_test_filter_event_dentry =
proc_create_data(LTTNG_TEST_FILTER_EVENT_FILE,
S_IRUGO | S_IWUGO, NULL,
+++ /dev/null
-/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
- *
- * wrapper/tracepoint.h
- *
- * wrapper around DECLARE_EVENT_CLASS.
- *
- * Copyright (C) 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- */
-
-#ifndef _LTTNG_WRAPPER_TRACEPOINT_H
-#define _LTTNG_WRAPPER_TRACEPOINT_H
-
-#include <linux/version.h>
-#include <linux/tracepoint.h>
-#include <linux/module.h>
-
-#ifndef HAVE_KABI_2635_TRACEPOINT
-
-#define kabi_2635_tracepoint_probe_register tracepoint_probe_register
-#define kabi_2635_tracepoint_probe_unregister tracepoint_probe_unregister
-
-#endif /* HAVE_KABI_2635_TRACEPOINT */
-
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0))
-
-#include <lttng-tracepoint.h>
-
-#define lttng_wrapper_tracepoint_probe_register lttng_tracepoint_probe_register
-#define lttng_wrapper_tracepoint_probe_unregister lttng_tracepoint_probe_unregister
-
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)) */
-
-#define lttng_wrapper_tracepoint_probe_register kabi_2635_tracepoint_probe_register
-#define lttng_wrapper_tracepoint_probe_unregister kabi_2635_tracepoint_probe_unregister
-
-static inline
-int lttng_tracepoint_init(void)
-{
- return 0;
-}
-
-static inline
-void lttng_tracepoint_exit(void)
-{
-}
-
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)) */
-
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0) && defined(CONFIG_MODULE_SIG))
-
-#include <linux/kallsyms.h>
-#include <wrapper/kallsyms.h>
-
-static inline
-int wrapper_tracepoint_module_notify(struct notifier_block *nb,
- unsigned long val, struct module *mod)
-{
- int (*tracepoint_module_notify_sym)(struct notifier_block *nb,
- unsigned long val, struct module *mod);
-
- tracepoint_module_notify_sym =
- (void *) kallsyms_lookup_funcptr("tracepoint_module_notify");
- if (tracepoint_module_notify_sym) {
- return tracepoint_module_notify_sym(nb, val, mod);
- } else {
- printk_once(KERN_WARNING "LTTng: tracepoint_module_notify symbol lookup failed. It probably means you kernel don't need this work-around. Please consider upgrading LTTng modules to make this warning go away.\n");
- return -ENOSYS;
- }
-}
-
-#endif /* #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0) && defined(CONFIG_MODULE_SIG)) */
-
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0) && defined(CONFIG_MODULE_SIG) && defined(MODULE))
-
-static inline
-int wrapper_lttng_fixup_sig(struct module *mod)
-{
- int ret = 0;
-
- /*
- * This is for module.c confusing force loaded modules with
- * unsigned modules.
- */
- if (!THIS_MODULE->sig_ok &&
- THIS_MODULE->taints & (1U << TAINT_FORCED_MODULE)) {
- THIS_MODULE->taints &= ~(1U << TAINT_FORCED_MODULE);
- ret = wrapper_tracepoint_module_notify(NULL,
- MODULE_STATE_COMING, mod);
- THIS_MODULE->taints |= (1U << TAINT_FORCED_MODULE);
- }
- return ret;
-}
-
-#else /* #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0) && defined(CONFIG_MODULE_SIG) && defined(MODULE)) */
-
-static inline
-int wrapper_lttng_fixup_sig(struct module *mod)
-{
- return 0;
-}
-
-#endif /* #else #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0) && defined(CONFIG_MODULE_SIG) && defined(MODULE)) */
-
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0))
-static inline struct tracepoint *lttng_tracepoint_ptr_deref(tracepoint_ptr_t *p)
-{
- return tracepoint_ptr_deref(p);
-}
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0)) */
-static inline struct tracepoint *lttng_tracepoint_ptr_deref(struct tracepoint * const *p)
-{
- return *p;
-}
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0)) */
-
-#endif /* _LTTNG_WRAPPER_TRACEPOINT_H */