__perf_evsel__calc_is_pos(9)
π NAME π
Bestie, welcome to __perf_evsel__calc_is_pos β the little kernel helper whose whole personality is calculating is_pos. That's it, that's the job. β¨ (And yeah, this page lives in the Kernel API Manual, so you know it's fancy.)
πΈ SYNOPSIS πΈ
int __perf_evsel__calc_is_pos (u64 sample_type );
Like, that's the whole signature. One argument, one int coming back at you. Iconic minimalism. π
π¦ ARGUMENTS π¦
sample_typeβ the sample type. It gets passed in, it does its thing, no notes. π
β¨ DESCRIPTION β¨
Okay so here's the tea, bestie: this function returns the position β and not just any position, we're counting backwards here β of the event id (PERF_SAMPLE_ID or PERF_SAMPLE_IDENTIFIER) inside a non-sample event. π«Ά
Why does that matter, you ask? Because when sample_id_all is used, there's literally an id sample appended to non-sample events. So the id is hanging out at the end, and this function knows exactly where to find it. Main character energy fr fr. π₯
Ngl, the "counting backwards" bit is the whole vibe check of this function β don't forget it. π§
π SEE ALSO π
- Kernel file
./tools/perf/util/evsel.cβ__perf_evsel__calc_id_pos(9) evsel__is_function_event(9)evsel__clone(9)evsel__is_hybrid(9)
All the linked besties, no gatekeeping. π
slay, you made it to the end π This page came from ./tools/perf/util, dated October 2026, and it's filed under __perf_evsel__calc_is_pos(9) β periodt. π
π¦ 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