__perf_evlis...h_entry_safe(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… __perf_evlis...h_entry_safe(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual ✨ this one's a macro name so long it got its own abbreviated little nickname up top (__perf_evlis...h_entry_safe(9) β€” yes the header really did give up halfway thru, iconic honestly πŸŽ€). let's get into it.


🌸 NAME 🌸

__perf_evlist__for_each_entry_safe β€” safely iterate thru all the evsels πŸ¦‹

like, it walks the whole list, and it does it safely, which is the whole point (more on that vibe below, no cap).


✨ SYNOPSIS ✨

__perf_evlist__for_each_entry_safe (list , tmp , evsel );

three things go in, that's the whole gig πŸ’–


🫢 ARGUMENTS 🫢

  • list β€” a list_head instance to iterate. this is the thing you're walking thru, the main character of the operation πŸ‘‘
  • tmp β€” a struct evsel temp iterator. it's your little sidekick holding onto the next one so nothing gets dropped mid-loop 🧚
  • evsel β€” a struct evsel iterator. this is the one you actually do stuff with on each pass, the one you're looking at rn πŸ’…
ngl the whole "safe" thing is the entire personality here β€” tmp exists so you can keep going even while you're messing with the list as you go. that's the vibe check this macro is passing πŸ”₯

πŸ’œ SEE ALSO πŸ’œ

like the whole friend group fr fr β€” go read the non-underscore ones too, they're all sitting in the same header being cute together πŸ“


🌈 friendly reminder: this page is from ./tools/lib/perf/include/internal and it's dated October 2026 β€” so yeah, sourced from there, dated that, and filed under __perf_evlis...h_entry_safe(9) one more time for the people in the back πŸ“£

stay safe out there (literally, it's in the name) β€” mwah πŸ’‹πŸ’–

πŸ“¦ where this page comes from