STRUCT AUXTRACE_MMAP_PARAMS(9)
π struct auxtrace_mmap_params(9) β Kernel API Manual, but make it make sense
okay so bestie, welcome to the <pink>struct auxtrace_mmap_params</pink> glow-up page π this is from the Kernel API Manual and honestly it's giving "the setup crew for struct auxtrace_mmap" β because that's literally what it is. iykyk π§
β¨ NAME β¨
struct auxtrace_mmap_params β the parameters you need to set up struct auxtrace_mmap. that's it, that's the vibe π
π¦ SYNOPSIS π¦
struct auxtrace_mmap_params {
size_t mask;
off_t offset;
size_t len;
int prot;
int idx;
pid_t tid;
bool mmap_needed;
struct perf_cpu cpu;
};
like, look at her. main character struct energy π copy it exactly, don't be weird about it.
πΈ Members πΈ
maskβ0iflenis not a power of two, otherwise(len - 1). that's the whole deal, no cap β¨offsetβ the file offset of the mapped area πlenβ size of the mapped area. she's thicc, she's measured πprotβ the mmap memory protection π‘οΈidxβ the index of this mmap π’ (one of many, bestie)tidβ the tid for a per-thread mmap π§΅ (it's also set if there's only 1 tid on a per-cpu mmap!) otherwise0.mmap_neededβ set tofalsefor non-auxtrace events π« this one's a whole thing, so listen up: it's needed because auxtrace mmapping happens in the same code path as non-auxtrace mmapping, but not every evsel that needs non-auxtrace mmapping also needs auxtrace mmapping. literally the reason this field exists, fr fr πcpuβ the cpu number for a per-cpu mmap, otherwise-1π₯οΈ
π₯ SEE ALSO π₯
Kernel file ./tools/perf/util/auxtrace.h β go read it, it's iconic:
struct itrace_synth_opts(9)struct auxtrace_index_entry(9)struct auxtrace_index(9)struct auxtrace(9)struct auxtrace_buffer(9)struct auxtrace_queue(9)struct auxtrace_queues(9)struct auxtrace_heap_item(9)struct auxtrace_heap(9)struct auxtrace_mmap(9)struct auxtrace_record(9)struct addr_filter(9)struct addr_filters(9)
the whole friend group, slay π
ok and finally the cute little sign-off: this page lives at<purple>./tools/perf/util</purple>and it's dated<mint>October 2026</mint>, and yeah it's stillstruct auxtrace_mmap_params(9)β bestie we've been over this ππ«Ά periodt.
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms