test__switch_tracking(9)
π test__switch_tracking β the kernel API manual, but make it cute π
okay so bestie, welcome to test__switch_tracking(9) β yes that's a section 9 page, yes that means kernel API, and yes we're gonna get through it together π
β¨ NAME β¨
test__switch_tracking β it's a test. and what's it testing? using sched_switch and tracking events. that's the whole vibe check π¦
πΈ SYNOPSIS πΈ
int test__switch_tracking (struct test_suite *test , int subtest );
like, look at her. two params, returns an int, absolutely iconic π
π«Ά ARGUMENTS π«Ά
testβ honestly?-- undescribed --. the docs did not come through for us here, no cap πsubtestβ also-- undescribed --. same story, we're on our own with this one π
ngl the manpage really said "figure it out" for both of these and i respect the honesty honestly π
π₯ DESCRIPTION π₯
okay so here's the main character energy β¨
This function implements a test β a real one β that checks that sched_switch events and tracking events can be recorded for a workload. and "workload" here means the current process, just so we're clear π§
How's it doing that? With the evsel->core.system_wide flag and the evsel->tracking flag β those two, respectively, matching up with the two kinds of events in order, iykyk π
and there are other events hanging around in there that are sometimes enabled and sometimes disabled, which is honestly so real of them π
so if you were wondering "can these events actually get recorded for the current process?" β that's the question, and this test is the answer. slay π₯
β SEE ALSO β
Kernel file ./tools/perf/tests/switch-tracking.c β that's where the actual source lives, go look, it's giving main character π
and that's the page bestie π«Ά straight from the ./tools/perf/tests source, dated October 2026 β catch you in the next manpage, 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