include/linux/tracepoint.h
Source file repositories/reference/linux-study-clean/include/linux/tracepoint.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/tracepoint.h- Extension
.h- Size
- 23546 bytes
- Lines
- 712
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/smp.hlinux/srcu.hlinux/errno.hlinux/types.hlinux/rcupdate.hlinux/rcupdate_trace.hlinux/tracepoint-defs.hlinux/static_call.hlinux/cfi.h
Detected Declarations
struct modulestruct tracepointstruct notifier_blockstruct trace_eval_mapstruct tp_modulefunction tracepoint_probe_register_may_existfunction trace_module_has_bad_taintfunction register_tracepoint_module_notifierfunction unregister_tracepoint_module_notifierfunction for_each_module_tracepointfunction tracepoint_synchronize_unregisterfunction tracepoint_is_faultablefunction call_tracepoint_unregister_atomicfunction call_tracepoint_unregister_syscallfunction tracepoint_synchronize_unregisterfunction call_tracepoint_unregister_atomicfunction TRACEPOINT_CHECK
Annotated Snippet
struct trace_eval_map {
const char *system;
const char *eval_string;
unsigned long eval_value;
};
#define TRACEPOINT_DEFAULT_PRIO 10
extern int
tracepoint_probe_register(struct tracepoint *tp, void *probe, void *data);
extern int
tracepoint_probe_register_prio(struct tracepoint *tp, void *probe, void *data,
int prio);
extern int
tracepoint_probe_register_prio_may_exist(struct tracepoint *tp, void *probe, void *data,
int prio);
extern int
tracepoint_probe_unregister(struct tracepoint *tp, void *probe, void *data);
static inline int
tracepoint_probe_register_may_exist(struct tracepoint *tp, void *probe,
void *data)
{
return tracepoint_probe_register_prio_may_exist(tp, probe, data,
TRACEPOINT_DEFAULT_PRIO);
}
extern void
for_each_kernel_tracepoint(void (*fct)(struct tracepoint *tp, void *priv),
void *priv);
#ifdef CONFIG_MODULES
struct tp_module {
struct list_head list;
struct module *mod;
};
bool trace_module_has_bad_taint(struct module *mod);
extern int register_tracepoint_module_notifier(struct notifier_block *nb);
extern int unregister_tracepoint_module_notifier(struct notifier_block *nb);
void for_each_module_tracepoint(void (*fct)(struct tracepoint *,
struct module *, void *),
void *priv);
void for_each_tracepoint_in_module(struct module *,
void (*fct)(struct tracepoint *,
struct module *, void *),
void *priv);
#else
static inline bool trace_module_has_bad_taint(struct module *mod)
{
return false;
}
static inline
int register_tracepoint_module_notifier(struct notifier_block *nb)
{
return 0;
}
static inline
int unregister_tracepoint_module_notifier(struct notifier_block *nb)
{
return 0;
}
static inline
void for_each_module_tracepoint(void (*fct)(struct tracepoint *,
struct module *, void *),
void *priv)
{
}
static inline
void for_each_tracepoint_in_module(struct module *mod,
void (*fct)(struct tracepoint *,
struct module *, void *),
void *priv)
{
}
#endif /* CONFIG_MODULES */
/*
* tracepoint_synchronize_unregister must be called between the last tracepoint
* probe unregistration and the end of module exit to make sure there is no
* caller executing a probe when it is freed.
*
* An alternative is to use the following for batch reclaim associated
* with a given tracepoint:
*
* - tracepoint_is_faultable() == false: call_srcu()
* - tracepoint_is_faultable() == true: call_rcu_tasks_trace()
*/
#ifdef CONFIG_TRACEPOINTS
extern struct srcu_struct tracepoint_srcu;
static inline void tracepoint_synchronize_unregister(void)
{
Annotation
- Immediate include surface: `linux/smp.h`, `linux/srcu.h`, `linux/errno.h`, `linux/types.h`, `linux/rcupdate.h`, `linux/rcupdate_trace.h`, `linux/tracepoint-defs.h`, `linux/static_call.h`.
- Detected declarations: `struct module`, `struct tracepoint`, `struct notifier_block`, `struct trace_eval_map`, `struct tp_module`, `function tracepoint_probe_register_may_exist`, `function trace_module_has_bad_taint`, `function register_tracepoint_module_notifier`, `function unregister_tracepoint_module_notifier`, `function for_each_module_tracepoint`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: integration implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.