STRUCT HW_PERF_EVENT(9)
π struct hw_perf_event(9) π
Welcome to the struct hw_perf_event(9) page from the Kernel API Manual, bestie. This is where the performance event hardware details live, and it's a whole struct situation. π
πΈ NAME πΈ
struct hw_perf_event β performance event hardware details. That's the name, no cap. It's the struct that holds the hardware-side details for a performance event.
β¨ SYNOPSIS β¨
Okay so the synopsis is literally this struct definition. Every brace, every semicolon, and every preprocessor line is staying exactly as-is, bestie β yes, even the #endif ; with the space. Periodt. π
struct hw_perf_event {
#ifdef CONFIG_PERF_EVENTS;
union {
struct {
u64 config;
u64 config1;
u64 last_tag;
u64 dyn_constraint;
unsigned long config_base;
unsigned long event_base;
int event_base_rdpmc;
int idx;
int last_cpu;
int flags;
struct hw_perf_event_extra extra_reg;
struct hw_perf_event_extra branch_reg;
};
struct {
u64 aux_config;
unsigned int aux_paused;
};
struct {
struct hrtimer hrtimer;
};
struct {
struct list_head tp_list;
};
struct {
u64 pwr_acc;
u64 ptsc;
};
#ifdef CONFIG_HAVE_HW_BREAKPOINT;
struct {
struct arch_hw_breakpoint info;
struct rhlist_head bp_list;
};
#endif;
struct {
u8 iommu_bank;
u8 iommu_cntr;
u16 padding;
u64 conf;
u64 conf1;
};
};
struct task_struct *target;
void *addr_filters;
unsigned long addr_filters_gen;
#define PERF_HES_STOPPED 0x01;
#define PERF_HES_UPTODATE 0x02;
#define PERF_HES_ARCH 0x04;
int state;
local64_t prev_count;
u64 sample_period;
union {
struct {
u64 last_period;
local64_t period_left;
};
struct {
u64 saved_metric;
u64 saved_slots;
};
};
u64 interrupts_seq;
u64 interrupts;
u64 freq_time_stamp;
u64 freq_count_stamp;
#endif ;
};
π― MEMBERS π―
The manual's Members list is giving anonymous-union-and-struct realness: every entry is literally anonymous, bestie. Here's the full roster in order so nobody gets left on read:
{unnamed_union}β anonymous{unnamed_struct}β anonymous{unnamed_struct}β anonymous{unnamed_struct}β anonymous{unnamed_struct}β anonymous{unnamed_struct}β anonymous{unnamed_struct}β anonymous{unnamed_struct}β anonymous{unnamed_union}β anonymous{unnamed_struct}β anonymous{unnamed_struct}β anonymous
π SEE ALSO π
First up, the kernel file: ./include/linux/perf_event.h β that's home base. Then the cross-reference besties:
struct pmu(9)struct perf_addr_filter(9)struct perf_addr_filters_head(9)struct perf_event(9)struct perf_event_context(9)struct perf_ctx_data(9)
Cute sign-off szn: source/version ./include/linux, dated October 2026. Byeee, go read kernel headers responsibly ππ«Άβ¨
π¦ 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