STRUCT AUXTRACE_MMAP_PARAMS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 β€” 0 if len is 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!) otherwise 0.
  • mmap_needed β€” set to false for 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 still struct auxtrace_mmap_params(9) β€” bestie we've been over this πŸ’€πŸ«Ά periodt.
πŸ“¦ where this page comes from