STRUCT PERF_MMAP(9)
okay bestie, welcome to the struct perf_mmap(9) glow-up π
this one lives in the Kernel API Manual, and it's basically the little receipt for perf's ring buffer mmap details. it's short, it's sweet, it's giving "entry-level struct with main character energy" π let's get into it.
πΈ NAME πΈ
struct perf_mmap β the whole vibe of perf's ring buffer mmap details β¨
π¦ SYNOPSIS π¦
okay so here's the actual struct, and yes you're gonna read every line of it because we don't skip π
struct perf_mmap {
void *base;
int mask;
int fd;
struct perf_cpu cpu;
refcount_t refcnt;
u64 prev;
u64 start;
u64 end;
bool overwrite;
u64 flush;
libperf_unmap_cb_t unmap_cb;
void *event_copy;
size_t event_copy_sz;
struct perf_mmap *next;
};
look at all those fields just sitting there, living their truth π base, mask, fd, cpu, refcnt, prev, start, end, overwrite, flush, unmap_cb, event_copy, event_copy_sz, next β iconic lineup, no notes π
π§ Members π§
yep, this section is literally just titled Members. short king behavior π
π Description π
here's the one (1) description this page actually gives us, and we're gonna treat it with the respect it deserves:
refcntβ e.g. code usingPERF_EVENT_IOC_SET_OUTPUTto share this
that's it, that's the note π«Ά like, that's the entire description section. ngl she's mysterious. we love a withholding icon π
bestie, real talk: this page only documents refcnt. don't go making up lore for the other fields β if it's not written here, it's not written here π
β SEE ALSO β
go look at the kernel file, that's where the rest of the story lives:
- Kernel file
./tools/lib/perf/include/internal/mmap.hπ₯
and that's the whole page, bestie! π this adorable little drop came from ./tools/lib/perf/include/internal, dated October 2026 β screenshot it, cite it, send it to the group chat, 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