STRUCT PERF_EVENT_CONTEXT(9)
πΈ struct perf_event_context(9) πΈ
okay bestie, so this is a page out of the Kernel API Manual β the manual name, yeah β and today's main character is struct perf_event_context, aka the event context structure. pull up a chair, we're doing kernel structs π
β¨ NAME β¨
struct perf_event_context β literally the event context structure. that's the whole name, no cap π
π¦ SYNOPSIS π¦
here she is, in all her glory, bestie β copy it exactly, don't you dare touch a character:
struct perf_event_context {
raw_spinlock_t lock;
struct mutex mutex;
struct list_head pmu_ctx_list;
struct perf_event_groups pinned_groups;
struct perf_event_groups flexible_groups;
struct list_head event_list;
int nr_events;
int nr_user;
int is_active;
int nr_stat;
int nr_freq;
int rotate_disable;
refcount_t refcount;
struct task_struct *task;
struct perf_time_ctx time;
struct perf_time_ctx timeguest;
struct perf_event_context *parent_ctx;
u64 parent_gen;
u64 generation;
int pin_count;
#ifdef CONFIG_CGROUP_PERF;
int nr_cgroups;
#endif;
struct rcu_head rcu_head;
local_t nr_no_switch_fast;
};
likeβ¦ look at her. the alignment. the way she's formatted. she ate and left absolutely no crumbs π (and yes, the #ifdef CONFIG_CGROUP_PERF; really does have those semicolons hanging out β we do not fix it, we respect it, periodt)
π Members π
this section is literally just sitting there with its heading on and no content underneath, so we're not gonna invent a member breakdown out of thin air β that would be lying and lying is not the vibe π if you want the details, that's what the header file is for, iykyk.
π Description π
so what is she? the page says it plain and simple: struct perf_event_context is used as a container for task events and CPU events as well. that's it, that's the whole description β container energy, holding her little events, minding her business π
π SEE ALSO π
go read these, bestie, they're all right there in the kernel file ./include/linux/perf_event.h:
struct hw_perf_event(9)struct pmu(9)struct perf_addr_filter(9)struct perf_addr_filters_head(9)struct perf_event(9)struct perf_ctx_data(9)
collect them all like little trading cards, fr fr π«Ά
heads up bestie: everything above is straight from the page β i'm not adding extra lore, no guessing, no made-up behaviour. facts stay facts, only the vibe is new π
okay that's the whole page, you're officially educated β¨ this little gem lives over in ./include/linux, dated October 2026, and she's page struct perf_event_context(9) of the Kernel API Manual β mwah, slay, go read a header file for me π§π
π¦ 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