evlist__mmap_ex(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 one
  • affinity β€” -- 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: those false cases mean you have to do the signaling. nobody's coming to save you. the automatic path is only the evlist__mmap_read one. ok that's the whole warning, carry on 🫢

πŸ”₯ RETURN πŸ”₯

  • 0 on success πŸŽ‰ (the dream)
  • a negative error code otherwise 😭 (the villain arc)

periodt.


🌈 SEE ALSO 🌈

go read these next, they're the friend group πŸ‘‘


πŸ’œ 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