STRUCT PERF_PMU_ALIAS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 json struct 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 value 1? yes/no energy, very binary of her 🌸
  • snapshot β€” does the file <sysfs>/bus/event_source/devices/<pmu_name>/events/<name>.snapshot exist and have the value 1? same check, different file, we love consistency πŸ’«
  • deprecated β€” is the event hidden and so not shown in perf list by 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 from sysfs or a json event? we need the receipts, bestie 🧾
  • info_loaded β€” have the scale, unit and 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 πŸ‘‘


bestie reminder: this whole page lives under ./tools/perf/util, it's dated October 2026, and it's page struct 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