evlist__mmap_ex(9)
β¨ evlist__mmap_ex(9) β¨
okay so bestie, we're in the Kernel API Manual today and this one is literally the mmap machine π
it lives in evlist__mmap_ex(9) and it's all about creating mmaps so you can receive events. no cap. π
πΈ NAME πΈ
evlist__mmap_ex β Create mmaps to receive events. and yes that's the whole name, she's concise, she's iconic π
π¦ SYNOPSIS π¦
int evlist__mmap_ex (struct evlist *evlist , unsigned int pages ,
unsigned int auxtrace_pages , bool auxtrace_overwrite , int nr_cblocks ,
int affinity , int flush , int comp_level );
like, look at her go. eight whole parameters. main character energy fr fr π
π ARGUMENTS π
evlistβ the list of events. that's the vibe. that's the guest list for the party πpagesβ the map length, measured in pages. yes pages. not bytes. do not come for me π«Άauxtrace_pagesβ honestly?-- undescribed --. the docs said nothing. i'm not gonna make something up, that would be lying to you and we don't do that πauxtrace_overwriteβ also-- undescribed --π so mysterious. so unbothered. so undocumented β¨nr_cblocksβ-- undescribed --π the manpage truly said "no thoughts head empty" on this oneaffinityβ-- undescribed --π¦ (sensing a pattern? yeah. same.)flushβ-- undescribed --πcomp_levelβ-- undescribed --π
ngl bestie, seven of the eight arguments are literally marked -- undescribed -- in the original. that's not me being lazy, that's just the canon. i refuse to invent behavior, that's not the move π§
π§ DESCRIPTION π§
so here's the actual tea β
If overwrite is false, the user needs to signal event consumption using perf_mmap__write_tail. good news though β using evlist__mmap_read does this automatically, so you don't have to hand-write the tail yourself π slay.
Similarly (and yes, "similarly", they said it first), if auxtrace_overwrite is false, the user needs to signal data consumption using auxtrace_mmap__write_tail. same energy, different mmap π
β οΈ lowkey important: thosefalsecases mean you have to do the signaling. nobody's coming to save you. the automatic path is only theevlist__mmap_readone. ok that's the whole warning, carry on π«Ά
π₯ RETURN π₯
0on success π (the dream)- a negative error code otherwise π (the villain arc)
periodt.
π SEE ALSO π
go read these next, they're the friend group π
- Kernel file
./tools/perf/util/evlist.cβ the source, the origin story, the mothership evlist__set_id_pos(9)struct event_enable_time(9)struct event_enable_timer(9)evlist__warn_user_requested_cpus(9)
π cute sign-off π
this page came to you straight from ./tools/perf/util, dated October 2026 β that's the source/version and the date, all folded up into one little goodbye π
okay bye bestie, go mmap something responsibly πβ¨π¦
π¦ 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