Skip to content

tools/gputop: add i915 PMU engine monitoring

Sebastian Brzezinka igt-dev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest8 patches 4 repliesIn review
  2. v18 patches 16 repliesSuperseded

Changes in v2 from the cover letter

- pmu_read_multi() stays void for xe: its percentage calculation doesn't need the time value, unlike i915.
- Simplified the commit message.
- gputop_no_crash_unprivileged now uses igt_system_quiet() instead of igt_system_cmd()

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8tools/gputop/xe_gputop: fix struct layout and PMU readtools/gputop/xe_gputop.c tools/gputop/xe_gputop.h+26 -111 reply
2/8tools/gputop/xe_gputop: fix missing igt_aux.h include for clamp()tools/gputop/xe_gputop.c+1 -01 reply
3/8tools/gputop/xe_gputop: fix return logic, cleanup and div by zero bugstools/gputop/xe_gputop.c+9 -30 replies
4/8tools/gputop/i915_gputop: add i915 PMU engine monitoringtools/gputop/i915_gputop.c tools/gputop/i915_gputop.h+530 -01 reply
5/8tools/meson: build gputop PMU backends as part of gputoptools/meson.build+9 -20 replies
6/8tools/gputop/utils: guard ANSI macros against redefinitiontools/gputop/utils.h+4 -00 replies
7/8tools/gputop: integrate i915 and xe PMU engine monitoringtools/gputop.c+164 -581 reply
8/8tests/tools_test: add gputop PMU engine monitoring subteststests/tools_test.c+77 -00 replies

Reviews trailers per patch

All 8 patches have a Reviewed-by or Acked-by.

PatchKrzysztof Karas
1/8R-b
2/8R-b
3/8R-b
4/8R-b
5/8R-b
6/8R-b
7/8R-b
8/8R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH i-g-t v2 0/8] tools/gputop: add i915 PMU engine monitoring

This series fixes the existing (currently disabled/broken) xe PMU backend for gputop, adds an equivalent i915 PMU backend, and wires both into the main gputop display loop so that per-engine busyness is shown for whichever Intel GPU driver is bound. It also adds tools_test subtests covering engine discovery, graceful handling of denied PMU access, and PMU sampling correctness.

v2:
- pmu_read_multi() stays void for xe: its percentage calculation doesn't need the time value, unlike i915.
- Simplified the commit message.
- gputop_no_crash_unprivileged now uses igt_system_quiet() instead of igt_system_cmd()

Sebastian Brzezinka (8):
tools/gputop/xe_gputop: fix struct layout and PMU read tools/gputop/xe_gputop: fix missing igt_aux.h include for clamp() tools/gputop/xe_gputop: fix return logic, cleanup and div by zero bugs tools/gputop/i915_gputop: add i915 PMU engine monitoring tools/meson: build gputop PMU backends as part of gputop tools/gputop/utils: guard ANSI macros against redefinition tools/gputop: integrate i915 and xe PMU engine monitoring tests/tools_test: add gputop PMU engine monitoring subtests

 tests/tools_test.c         |  77 ++++++
 tools/gputop.c             | 222 ++++++++++++-----
 tools/gputop/i915_gputop.c | 474 +++++++++++++++++++++++++++++++++++++
 tools/gputop/i915_gputop.h |  56 +++++
 tools/gputop/utils.h       |   4 +
 tools/gputop/xe_gputop.c   |  48 +++-
 tools/gputop/xe_gputop.h   |   2 +-
 tools/meson.build          |  11 +-
 8 files changed, 820 insertions(+), 74 deletions(-)
 create mode 100644 tools/gputop/i915_gputop.c
 create mode 100644 tools/gputop/i915_gputop.h
Signature · 1 line
2.55.0