__evlist__for_each_entry(9)
β¨ __evlist__for_each_entry(9) β¨
okay so bestie, welcome to the Kernel API Manual π β this little baby lives in section 9 and her whole entire job is looping over evsels, no cap.
πΈ NAME πΈ
__evlist__for_each_entry β iterate thru all the evsels π¦
like literally, that's the vibe. she iterates. thru all the evsels. every single one. periodt.
π SYNOPSIS π
__evlist__for_each_entry (list , evsel );
yeah that's it. that's the whole thing. lowkey iconic how short it is π (and yes, the spacing is exactly like that, don't @ me, I don't make the rules)
π ARGUMENTS π
listβ alist_headinstance to iterate π§ this is the thing you're walkin' through, bestie. your starting point. your main character list.evselβstruct evseliterator π this is the one that goes around the loop, picking up each evsel as it goes. she's the traveler. she's the iterator. iykyk.
π₯ SEE ALSO π₯
the whole friend group fr fr β go say hi to all of them π
- Kernel file
./tools/perf/util/evlist.hπ evlist__for_each_entry(9)__evlist__for_each_entry_continue(9)evlist__for_each_entry_continue(9)__evlist__for_each_entry_from(9)evlist__for_each_entry_from(9)__evlist__for_each_entry_reverse(9)evlist__for_each_entry_reverse(9)__evlist__for_each_entry_safe(9)evlist__for_each_entry_safe(9)evlist__for_each_cpu(9)
ngl if you're reaching for the _safe one, that's the "i'm deleting stuff mid-loop" energy π be careful out there bestie, that's all I'm saying.
aaaand that's the page!! π«Ά shoutout to ./tools/perf/util for being the source/version β she's giving October 2026, she's giving kernel file realness, she ate and left no crumbs πβ¨ bye bestie, go iterate something beautiful π
π¦ 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