XE GT STATISTICS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– Xe GT Statistics(9) πŸ’–

okay so bestie, welcome to the Xe GT Statistics(9) page from the Kernel API Manual β€” this is the group chat where the Xe driver spills its per-GT stats, and honestly? iconic πŸ’…

✨ Overview ✨

The Xe driver exposes per-GT statistics through the debugfs filesystem at:

/sys/kernel/debug/dri/<device>/gt<id>/stats

This interface requires the kernel to be built with CONFIG_DEBUG_FS=y.

πŸ“– Reading statistics πŸ“–

The way that this file just prints all available statistics, one per line, in name: value format? obsessed 🫢

$ cat /sys/kernel/debug/dri/0/gt0/stats
svm_pagefault_count: 0
tlb_inval_count: 1234
...

All values are 64-bit unsigned integers aggregated across all CPUs. Counters accumulate since the driver was loaded or since the last explicit reset. Timing counters use microseconds as their unit; data volume counters use KiB ✨

πŸ”„ Resetting statistics πŸ”„

Writing a boolean true value to the file resets all counters to zero:

echo 1 > /sys/kernel/debug/dri/0/gt0/stats

Any value accepted by kstrtobool (e.g. 1, y, yes, on) triggers the reset.

⚠️ lowkey important: resetting while the GPU is active may yield unpredictable intermediate values; it is recommended to reset only when the GPU is idle.

πŸ‘€ SEE ALSO πŸ‘€


mwah πŸ’‹ that's the whole page, bestie. source/version: ./drivers/gpu/drm/xe; date: October 2026; and the page itself is Xe GT Statistics(9). go forth and slay your stats 🫢✨

πŸ“¦ where this page comes from