XE PMU (PERFORMANCE MONITORING UNIT)(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– Xe PMU (Performance Monitoring Unit) πŸ’–

Bestie, welcome to the Kernel API Manual moment for the Xe PMU, section 9 🫢. This page is literally about exposing events/counters like GT-C6 residency, GT frequency, and per-class-engine activity to user land via the perf interface. Events are per device, no cap.

All events are listed in sysfs:

$ ls -ld /sys/bus/event_source/devices/xe_*
$ ls /sys/bus/event_source/devices/xe_0000_00_02.0/events/
$ ls /sys/bus/event_source/devices/xe_0000_00_02.0/format/

The following format parameters are available to read events, but only few are valid with each event β€” so do a little vibe check before you use them πŸ‘€:

  • gt[60:63] β€” selects gt for the event ✨
  • engine_class[20:27] β€” selects engine-class for event πŸŽ€
  • engine_instance[12:19] β€” selects the engine-instance for the event πŸ¦‹
  • function[44:59] β€” selects the function of the event (SRIOV enabled) πŸ’…

For engine specific events (engine-*), the gt, engine_class, and engine_instance parameters must be set as populated by DRM_XE_DEVICE_QUERY_ENGINES, and function if SRIOV is enabled. Periodt.

For gt specific events (gt-*), the gt parameter must be passed. All other parameters will be 0. That's it, that's the rule 🌸.

The standard perf tool can be used to grep for a certain event as well. Example:

$ perf list | grep gt-c6

To sample a specific event for a GT at regular intervals:

$ perf stat -e <event_name,gt=> -I <interval>

🌈 SEE ALSO 🌈

Kernel file ./drivers/gpu/drm/xe/xe_pmu.c, xe_pmu_unregister(9), xe_pmu_register(9) πŸ”₯


Cute sign-off: this page's source is ./drivers/gpu/drm/xe, it's dated October 2026, and the footer version vibe is Xe PMU (Perf...toring Unit)(9) πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from