samples/ftrace/ftrace-ops.c
Source file repositories/reference/linux-study-clean/samples/ftrace/ftrace-ops.c
File Facts
- System
- Linux kernel
- Corpus path
samples/ftrace/ftrace-ops.c- Extension
.c- Size
- 7073 bytes
- Lines
- 253
- Domain
- Support Tooling And Documentation
- Bucket
- samples
- Inferred role
- Support Tooling And Documentation: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- 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/ftrace.hlinux/ktime.hlinux/module.hasm/barrier.h
Detected Declarations
struct sample_opsfunction barrierfunction barrierfunction ops_func_nopfunction ops_destroyfunction ops_checkfunction ftrace_ops_sample_initfunction ftrace_ops_sample_exitmodule init ftrace_ops_sample_init
Annotated Snippet
module_init(ftrace_ops_sample_init);
static void __exit ftrace_ops_sample_exit(void)
{
ops_destroy(ops_relevant, nr_ops_relevant);
ops_destroy(ops_irrelevant, nr_ops_irrelevant);
}
module_exit(ftrace_ops_sample_exit);
MODULE_AUTHOR("Mark Rutland");
MODULE_DESCRIPTION("Example of using custom ftrace_ops");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/ftrace.h`, `linux/ktime.h`, `linux/module.h`, `asm/barrier.h`.
- Detected declarations: `struct sample_ops`, `function barrier`, `function barrier`, `function ops_func_nop`, `function ops_destroy`, `function ops_check`, `function ftrace_ops_sample_init`, `function ftrace_ops_sample_exit`, `module init ftrace_ops_sample_init`.
- Atlas domain: Support Tooling And Documentation / samples.
- 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.