STRUCT PERF_OPEN_PROPERTIES(9)
π struct perf_open_properties(9) β the Kernel API Manual, bestie edition β¨
okay so we're in the kernel API manual, section 9, and today's main character is struct perf_open_properties π β literally the struct where all your validated properties hang out before you open a stream. iykyk.
πΈ NAME πΈ
struct perf_open_properties β for validated properties given to open a stream. that's it, that's the vibe. no cap. π
β¨ SYNOPSIS β¨
here's the whole squad, member by member, no skips:
struct perf_open_properties {
u32 sample_flags;
u64 single_context:1;
u64 hold_preemption:1;
u64 ctx_handle;
int metrics_set;
int oa_format;
bool oa_periodic;
int oa_period_exponent;
struct intel_engine_cs *engine;
bool has_sseu;
struct intel_sseu sseu;
u64 poll_oa_period;
};
(yeah there's a little extra space before that closing brace, she's just standing like that, leave her alone π)
π¦ Members π¦
okay bestie, meet the members one by one:
sample_flagsβ theDRM_I915_PERF_PROP_SAMPLE_*properties get tracked as flags in here. flags! like a little checklist of sample props π₯single_contextβ whether we're monitoring a single gpu context or all of them. choose your fighter β¨hold_preemptionβ whether preemption is disabled for the filtered context. heads up, that's a real behaviour switch, not just a cute name πctx_handleβ a gem ctx handle, for use withsingle_context. they're a package deal π«Άmetrics_setβ an ID for an OA unit metric set, advertised via sysfs. she's official πoa_formatβ an OA unit HW report format. it's giving "formatting era" πoa_periodicβ whether to enable periodic OA unit sampling. tick tock βoa_period_exponentβ the OA unit sampling period is derived from this. math queen π§engineβ the engine being monitored by the OA unit, typicallyrcs0. main character engine energy πhas_sseuβ whether sseu was specified by userspace. yes/no, that's the whole job πsseuβ the internal SSEU configuration, computed either from the userspace-specified configuration in the opening parameters or from a default value (seeget_default_sseu_config). two paths, one struct πΈpoll_oa_periodβ the period in nanoseconds at which the CPU will check for OA data availability. nanoseconds!! she's precise π¦
π Description π
so basically β while read_properties_unlocked is out here enumerating and validating all the properties you handed over to open a stream of metrics, the configuration gets built up in this struct. and plot twist: it starts out zero initialized. clean slate, fresh start, new me π
β¨
π₯ SEE ALSO π₯
the whole friend group, in the order the manual says (and yes, every single one, we don't do skipping here):
- Kernel file
./drivers/gpu/drm/i915/i915_perf.c i915 Perf Overview(9)i915 Perf History and Comparison with Core Perf(9)OA Tail Pointer Race(9)oa_buffer_check_unlocked(9)append_oa_status(9)append_oa_sample(9)gen8_append_oa_reports(9)gen8_oa_read(9)gen7_append_oa_reports(9)gen7_oa_read(9)i915_oa_wait_unlocked(9)i915_oa_poll_wait(9)i915_oa_read(9)oa_get_render_ctx_id(9)oa_put_render_ctx_id(9)i915_oa_stream_enable(9)i915_oa_stream_disable(9)i915_oa_stream_init(9)i915_perf_read(9)i915_perf_poll_locked(9)i915_perf_poll(9)i915_perf_enable_locked(9)i915_perf_disable_locked(9)i915_perf_ioctl_locked(9)i915_perf_ioctl(9)i915_perf_destroy_locked(9)i915_perf_release(9)i915_perf_open_ioctl_locked(9)read_properties_unlocked(9)i915_perf_open_ioctl(9)i915_perf_register(9)i915_perf_unregister(9)i915_perf_add_config_ioctl(9)i915_perf_remove_config_ioctl(9)i915_perf_init(9)i915_perf_fini(9)i915_perf_ioctl_version(9)
bestie reminder: the source path for this whole page is ./drivers/gpu/drm/i915, and it's dated October 2026 β so yeah, this manual page is from the future, we love a time traveler ππ«
and that's the page!! struct understood, vibes immaculate, struct perf_open_properties(9) ate and left no crumbs ππ
π¦ 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