perf_pmu__m...dcard_uncore(9)
π perf_pmu__match_wildcard_uncore(9) β Kernel API Manual, but make it make sense
okay bestie, strap in π this one lives in the Kernel API Manual, and it's literally just one job: figure out if some little string matches a PMU's name. That's it. That's the whole vibe check. β¨
πΈ NAME πΈ
perf_pmu__match_wildcard_uncore β the function that answers the question does to_match match the PMU's name? π (spoiler: it's giving "yes or no", and it returns a bool, so likeβ¦ no hedging, no maybes, no "it's complicated" π)
β¨ SYNOPSIS β¨
bool perf_pmu__match_wildcard_uncore (const char *pmu_name , const char *to_match );
two const char *s walk in, a bool walks out. iconic behavior honestly π«Ά
π¦ ARGUMENTS π¦
pmu_nameβ this one is thepmu->nameor thepmu->alias, i.e. the thing you're matching against. your reference point. your main character, if you will πto_matchβ this is the jsonstruct pmu_eventname. and here's the tea π: it may lack a suffix, and if it does, that totally matches. OR it can be shaped like"socket,pmuname", which will match"socketX_pmunameY"β so the comma-socket form expands out into the realsocketX_pmunameYshape and goes slay, we match π
ngl the comma form is the sneaky one β read it twice, it's not doing what your first glance thinks it's doing π
π₯ SEE ALSO π₯
the whole friend group π«Ά go check out:
- Kernel file
./tools/perf/util/pmu.c struct perf_pmu_alias(9)is_sysfs_pmu_core(9)perf_pmu__match_wildcard(9)perf_pmu__match_ignoring_suffix_uncore(9)is_pmu_core(9)perf_pmu__name_wildcard_match(9)perf_pmu__name_no_suffix_match(9)
that's the whole page, bestie, no notes π this came out of ./tools/perf/util, dated October 2026 β and yes we're still out here matching wildcards uncore-style, 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