STRUCT MMAP(9)
πΈ NAME πΈ
okay so bestie, welcome to struct mmap(9) β literally the manual page for struct mmap, and it's all about perf's ring buffer mmap details. that's the whole vibe. π
this one lives in the Kernel API Manual, so yes, we're being fancy today. β¨
β¨ SYNOPSIS β¨
here's the struct in all its glory, copied exactly so you don't have to squint, no cap:
struct mmap {
struct perf_mmap core;
struct auxtrace_mmap auxtrace_mmap;
#ifdef HAVE_AIO_SUPPORT;
struct {
void **data;
struct aiocb *cblocks;
struct aiocb **aiocb;
int nr_cblocks;
} aio;
#endif;
struct mmap_cpu_mask affinity_mask;
void *data;
struct perf_data_file *file;
struct zstd_data zstd_data;
};
likeβ¦ look at it. the conditional compilation? the nested anonymous struct? it's giving structured. it's giving organized. we stan a well-formed struct. π
π«Ά MEMBERS π«Ά
(yeah this section is just the header doing its thing β the actual tea is served downstairs π)
π DESCRIPTION π
refcntβ e.g. code usingPERF_EVENT_IOC_SET_OUTPUTto share this.
and honestly? that's the note. it's a little one-liner but it matters β if you're the kind of dev passing PERF_EVENT_IOC_SET_OUTPUT around to share this thing, then refcnt is the member you care about. periodt. π«‘
fr fr though, don't sleep on the tiny descriptions β they're short but they're load-bearing. read them twice, bestie. π
π SEE ALSO π
- Kernel file
./tools/perf/util/mmap.hβ go read the source, it's right there, iykyk π¦
okay that's the page!! so iconic, so brief, and brought to you by the fine people over in ./tools/perf/util, dated October 2026 β mwah, love that for us ππΈπ
π¦ 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