STRUCT PERF_PMU_ALIAS(9)
π struct perf_pmu_alias(9) π
ok so bestie, welcome to the Kernel API Manual β this is the page for struct perf_pmu_alias, and it's literally the glow-up your perf events deserve β¨
πΈ NAME πΈ
struct perf_pmu_alias β an event either read from sysfs or builtin in pmu-events.c, created by parsing the pmu-events json files. no cap, that's the whole vibe π«Ά
β¨ SYNOPSIS β¨
struct perf_pmu_alias {
char *name;
char *desc;
char *long_desc;
char *topic;
char *terms;
char *legacy_terms;
char *pmu_name;
char unit[UNIT_MAX_LEN+1];
double scale;
double retirement_latency_mean;
double retirement_latency_min;
double retirement_latency_max;
bool per_pkg;
bool snapshot;
bool deprecated;
bool legacy_deprecated_checked;
bool from_sysfs;
bool info_loaded;
};
likeβ¦ look at her. main character struct energy, fr fr π
π Members π
okay now we go member by member, and yes every single one gets her moment π
nameβ the name of the event, like"mem-loads". that's it, that's the label on the tin π·οΈdescβ optional short description of the event. optional, so it can absolutely ghost you πlong_descβ optional long description. the deluxe extended cut version πtopicβ optional topic such as cache or pipeline, particularly for json events. very "so what's the theme bestie" energy π¦termsβ owned copy of the event terms. owned, meaning she holds it down herself, no borrowing πlegacy_termsβ if the event aliases a legacy event, this holds a copy of the legacy event string. vintage era aesthetics π°οΈpmu_nameβ the name copied from the jsonstruct pmu_event. heads up: this can differ from the PMU name because it won't have suffixes. so like, don't assume they match, iykyk πunitβ units for the event, such as bytes or cache lines. units matter, periodt πscaleβ value to scale read counter values by. math slay π₯retirement_latency_meanβ value to be given for unsampled retirement latency mean. very niche, very iconic βretirement_latency_minβ value to be given for unsampled retirement latency min. the low end, respectfully πretirement_latency_maxβ value to be given for unsampled retirement latency max. and the high end, respectfully πper_pkgβ does the file<sysfs>/bus/event_source/devices/<pmu_name>/events/<name>.per-pkg(or the equivalent json value) exist and have the value1? yes/no energy, very binary of her πΈsnapshotβ does the file<sysfs>/bus/event_source/devices/<pmu_name>/events/<name>.snapshotexist and have the value1? same check, different file, we love consistency π«deprecatedβ is the event hidden and so not shown inperf listby default. yes girl, she's in her private era π«£legacy_deprecated_checkedβ legacy events may not be supported by the PMU, and they need to be checked. if they aren't supported they are marked deprecated. so this is basically the "did we do the vibe check yet" flag βfrom_sysfsβ was the alias fromsysfsor a json event? we need the receipts, bestie π§Ύinfo_loadedβ have thescale,unitand other values been read from disk? lazy-loaded queen π
π SEE ALSO π
go read these next, they're all in the Kernel file ./tools/perf/util/pmu.c and they're all lowkey essential π
is_sysfs_pmu_core(9)perf_pmu__match_wildcard(9)perf_pmu__match_ignoring_suffix_uncore(9)perf_pmu__match_wildcard_uncore(9)is_pmu_core(9)perf_pmu__name_wildcard_match(9)perf_pmu__name_no_suffix_match(9)
bestie reminder: this whole page lives under./tools/perf/util, it's dated October 2026, and it's pagestruct perf_pmu_alias(9)of the Kernel API Manual π
ok that's the whole page, you ate that, go forth and read perf events like the icon you are πβ¨π¦
π¦ 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