samples/bpf/trace_output.bpf.c
Source file repositories/reference/linux-study-clean/samples/bpf/trace_output.bpf.c
File Facts
- System
- Linux kernel
- Corpus path
samples/bpf/trace_output.bpf.c- Extension
.c- Size
- 589 bytes
- Lines
- 30
- Domain
- Support Tooling And Documentation
- Bucket
- samples
- Inferred role
- Support Tooling And Documentation: implementation source
- Status
- source 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
vmlinux.hlinux/version.hbpf/bpf_helpers.h
Detected Declarations
struct Sfunction bpf_prog1
Annotated Snippet
struct S {
u64 pid;
u64 cookie;
} data;
data.pid = bpf_get_current_pid_tgid();
data.cookie = 0x12345678;
bpf_perf_event_output(ctx, &my_map, 0, &data, sizeof(data));
return 0;
}
char _license[] SEC("license") = "GPL";
u32 _version SEC("version") = LINUX_VERSION_CODE;
Annotation
- Immediate include surface: `vmlinux.h`, `linux/version.h`, `bpf/bpf_helpers.h`.
- Detected declarations: `struct S`, `function bpf_prog1`.
- Atlas domain: Support Tooling And Documentation / samples.
- Implementation status: source 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.