STRUCT PERF_PMU_FORMAT(9)
π struct perf_pmu_format(9) β kernel API manual, bestie edition β¨
Okay so picture this: it's a kernel API manual page, right, and it's here to explain struct perf_pmu_format β the little icon that holds the values from a format file that got read from <sysfs>/devices/cpu/format/ and is now chilling inside struct perf_pmu. Yeah. She's a keeper. π
β¨ SYNOPSIS β¨
struct perf_pmu_format {
struct list_head list;
unsigned long bits[BITS_TO_LONGS( PERF_PMU_FORMAT_BITS)];
char *name;
u16 value;
bool loaded;
};
ngl that array declaration is giving BITS_TO_LONGS( PERF_PMU_FORMAT_BITS) with the space and everything β copy it exactly as-is, bestie, we do not editorialize in code blocks. π
πΈ Members πΈ
listβ this is her element on the list that lives insidestruct perf_pmu. She's on a list! She's booked and busy! π¦bitsβ the config bits that this format value actually sets. Which ones? These ones. Specifically these. πnameβ the modifier/file name, literally just the name, no notes. β¨valueβ which config value this format relates to. Supported values run fromPERF_PMU_FORMAT_VALUE_CONFIGtoPERF_PMU_FORMAT_VALUE_CONFIG_END. That's the range, don't go outside it. πloadedβ has the contents been loaded/parsed? A whole boolean for that question. Yes or no. That's the vibe check. β
π Description π
So like, a real example, because examples ate:
Say the contents of <sysfs>/devices/cpu/format/event is literally the string "config:0-7". When that gets represented here, you get:
name="event"value=PERF_PMU_FORMAT_VALUE_CONFIG- and bits
0to7will be set
That's it. That's the whole transformation. She read the file, she parsed it, she set the bits, she slayed. π π₯
π SEE ALSO π
- Kernel file
./tools/perf/util/pmu.h struct perf_pmu(9)
π«Ά That's a wrap, bestie! This page came from ./tools/perf/util, dated October 2026, and it's the struct perf_pmu_format(9) page β go forth and read your format files with main character energy. ππ
π¦ 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