Documentation
¶
Overview ¶
Package bpfstack parses the raw layout produced by BPF_MAP_TYPE_STACK_TRACE: a fixed 127-slot buffer of little-endian u64 instruction pointers, terminated by a zero slot. Shared between profile/ (CPU sampling) and offcpu/ (sched_switch tracking).
Index ¶
Constants ¶
View Source
const MaxFrames = 127
MaxFrames is the depth of a BPF stackmap entry. Matches the BPF PERF_MAX_STACK_DEPTH macro in bpf/perf.bpf.c and bpf/offcpu.bpf.c.
Variables ¶
This section is empty.
Functions ¶
func ExtractIPs ¶
ExtractIPs decodes a BPF stackmap entry into a slice of instruction pointers, stopping at the first zero slot. Buffers shorter than MaxFrames*8 bytes are processed up to their length; buffers longer are truncated at MaxFrames.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.