evlist__for_...ntry_reverse(9)
π evlist__for_...ntry_reverse(9) β bestie's guide to the reverse iterator β¨
okay so this one is a real one: evlist__for_each_entry_reverse from the Kernel API Manual, section 9, and it's literally the reverse-order version of the evsel loop. the way that this macro just goes backwards through your list? iconic. π¦
β¨ NAME β¨
evlist__for_each_entry_reverse β iterate thru all the evsels in reverse order π
like, every single evsel in the evlist, but you're walking it backwards. it's giving main character energy but in reverse. no cap. π₯
πΈ SYNOPSIS πΈ
evlist__for_each_entry_reverse (evlist , evsel );
yep that's the whole vibe. evlist and evsel, that's it, that's the group chat. π
π«Ά ARGUMENTS π«Ά
evlistβ the evlist instance you wanna iterate. this is the thing you're looping over, bestie. your list. your whole situation. πevselβ astruct evseliterator. this is the lil' variable that holds each entry as you go, one at a time, in reverse. it's the main character of every loop pass. π
ngl if you forget what evsel is you're gonna have a bad time, so keep it lined up with the macro, fr fr. π
π SEE ALSO π
the kernel file lives at ./tools/perf/util/evlist.h (yes, that's the one, go look, iykyk π) and it's got the whole family of these macros. bestie, there are so many siblings, and honestly they all slay in their own way:
__evlist__for_each_entry(9)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_safe(9)evlist__for_each_entry_safe(9)evlist__for_each_cpu(9)
go read them all, seriously, they ate. π
lowkey remember: they're all manpage section 9 (kernel API), so don't go looking in section 1 unless you want to be confused and crying in the terminal. π
and that's the page!! π this one's from the Kernel API Manual, sourced out of ./tools/perf/util, and it's dated October 2026 β so like, future vibes, but the manual is right now. mwah. ππ§β
π¦ 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