#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/types.h>
#include <linux/jhash.h>
#include <linux/list.h>
#include <linux/rcupdate.h>
#include <linux/tracepoint.h>
#include <linux/err.h>
#include <linux/slab.h>
#include <linux/sched/signal.h>
#include <linux/sched/task.h>
#include <linux/static_key.h>
enum tp_func_state { … };
extern tracepoint_ptr_t __start___tracepoints_ptrs[];
extern tracepoint_ptr_t __stop___tracepoints_ptrs[];
DEFINE_SRCU(…);
EXPORT_SYMBOL_GPL(…);
enum tp_transition_sync { … };
struct tp_transition_snapshot { … };
static struct tp_transition_snapshot tp_transition_snapshot[_NR_TP_TRANSITION_SYNC];
static void tp_rcu_get_state(enum tp_transition_sync sync)
{ … }
static void tp_rcu_cond_sync(enum tp_transition_sync sync)
{ … }
static const int tracepoint_debug;
#ifdef CONFIG_MODULES
static DEFINE_MUTEX(tracepoint_module_list_mutex);
static LIST_HEAD(tracepoint_module_list);
#endif
static DEFINE_MUTEX(tracepoints_mutex);
static struct rcu_head *early_probes;
static bool ok_to_free_tracepoints;
struct tp_probes { … };
static void tp_stub_func(void)
{ … }
static inline void *allocate_probes(int count)
{ … }
static void srcu_free_old_probes(struct rcu_head *head)
{ … }
static void rcu_free_old_probes(struct rcu_head *head)
{ … }
static __init int release_early_probes(void)
{ … }
postcore_initcall(release_early_probes);
static inline void release_probes(struct tracepoint_func *old)
{ … }
static void debug_print_probes(struct tracepoint_func *funcs)
{ … }
static struct tracepoint_func *
func_add(struct tracepoint_func **funcs, struct tracepoint_func *tp_func,
int prio)
{ … }
static void *func_remove(struct tracepoint_func **funcs,
struct tracepoint_func *tp_func)
{ … }
static enum tp_func_state nr_func_state(const struct tracepoint_func *tp_funcs)
{ … }
static void tracepoint_update_call(struct tracepoint *tp, struct tracepoint_func *tp_funcs)
{ … }
static int tracepoint_add_func(struct tracepoint *tp,
struct tracepoint_func *func, int prio,
bool warn)
{ … }
static int tracepoint_remove_func(struct tracepoint *tp,
struct tracepoint_func *func)
{ … }
int tracepoint_probe_register_prio_may_exist(struct tracepoint *tp, void *probe,
void *data, int prio)
{ … }
EXPORT_SYMBOL_GPL(…);
int tracepoint_probe_register_prio(struct tracepoint *tp, void *probe,
void *data, int prio)
{ … }
EXPORT_SYMBOL_GPL(…);
int tracepoint_probe_register(struct tracepoint *tp, void *probe, void *data)
{ … }
EXPORT_SYMBOL_GPL(…);
int tracepoint_probe_unregister(struct tracepoint *tp, void *probe, void *data)
{ … }
EXPORT_SYMBOL_GPL(…);
static void for_each_tracepoint_range(
tracepoint_ptr_t *begin, tracepoint_ptr_t *end,
void (*fct)(struct tracepoint *tp, void *priv),
void *priv)
{ … }
#ifdef CONFIG_MODULES
bool trace_module_has_bad_taint(struct module *mod)
{ … }
static BLOCKING_NOTIFIER_HEAD(tracepoint_notify_list);
int register_tracepoint_module_notifier(struct notifier_block *nb)
{ … }
EXPORT_SYMBOL_GPL(…);
int unregister_tracepoint_module_notifier(struct notifier_block *nb)
{ … }
EXPORT_SYMBOL_GPL(…);
static void tp_module_going_check_quiescent(struct tracepoint *tp, void *priv)
{ … }
static int tracepoint_module_coming(struct module *mod)
{ … }
static void tracepoint_module_going(struct module *mod)
{ … }
static int tracepoint_module_notify(struct notifier_block *self,
unsigned long val, void *data)
{ … }
static struct notifier_block tracepoint_module_nb = …;
static __init int init_tracepoints(void)
{ … }
__initcall(init_tracepoints);
#endif
void for_each_kernel_tracepoint(void (*fct)(struct tracepoint *tp, void *priv),
void *priv)
{ … }
EXPORT_SYMBOL_GPL(…);
#ifdef CONFIG_HAVE_SYSCALL_TRACEPOINTS
static int sys_tracepoint_refcount;
int syscall_regfunc(void)
{ … }
void syscall_unregfunc(void)
{ … }
#endif