test__switch_tracking(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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