perf_evlist_...h_entry_safe(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… perf_evlist__for_each_entry_safe β€” NAME ✨

okay so bestie, welcome to the Kernel API Manual πŸŽ€ β€” this one's a macro called perf_evlist__for_each_entry_safe, and it's literally here to safely iterate thru all the evsels πŸ’– no cap, that's the whole vibe: safe iteration, all the evsels, one macro.


🌸 SYNOPSIS 🌸

perf_evlist__for_each_entry_safe (evlist , tmp , evsel );

that's it. three things in, the whole list comes out the other side πŸ¦‹ (and yes, the spaces before those commas are exactly how the manpage wrote it β€” copy it verbatim, iykyk πŸ’…)


🫢 ARGUMENTS 🫢

  • evlist β€” the evlist instance you're iterating through, bestie. this is the main character πŸ‘‘ the thing you're walking over, one evsel at a time.
  • tmp β€” a struct evsel temp iterator. think of it as the lil scratch pad πŸ“ the macro needs so it can hold onto where it's going while it's busy letting go of where it's been. lowkey the whole reason this one's "safe" fr fr.
  • evsel β€” a struct evsel iterator. this is your actual cursor, the one doing the strolling ✨ your current evsel, your moment, your time to shine.
πŸ’€ quick note: tmp and evsel are both struct evsel things β€” one's the temp, one's the iterator. don't get them twisted, bestie, that's the entire plot.

πŸ¦‹ SEE ALSO πŸ¦‹

the whole friend group πŸ’œ β€” forward, reverse, safe, double-underscore secret-menu versions β€” they all hang out together, go say hi to each one.


🧚 sign-off πŸ’«

and that's the page, bestie! 🌈 this slice of the Kernel API Manual lives in ./tools/lib/perf/include/internal, dated October 2026 β€” and the macro's own header/title was perf_evlist__...h_entry_safe(9) if you were wondering, which you so were πŸ™ˆπŸ’– periodt, go iterate safely ✨🫢

πŸ“¦ where this page comes from