Linux Perf Users
 help / color / mirror / Atom feed
* [PATCH v3 0/4] Add support for a DRM tool like PMU
@ 2025-04-03 20:24 Ian Rogers
  2025-04-03 20:24 ` [PATCH v3 1/4] perf parse-events: Avoid scanning PMUs that can't contain events Ian Rogers
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Ian Rogers @ 2025-04-03 20:24 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
	Ian Rogers, Adrian Hunter, Kan Liang, Masami Hiramatsu (Google),
	James Clark, Weilin Wang, Dominique Martinet, Thomas Richter,
	Junhao He, Jean-Philippe Romain, linux-kernel, linux-perf-users
  Cc: dri-devel

DRM clients expose information through usage stats as documented in
Documentation/gpu/drm-usage-stats.rst (available online at
https://docs.kernel.org/gpu/drm-usage-stats.html). Add a tool like
PMU, similar to the hwmon PMU, that exposes DRM information.

v3: Minor tweak to the test so the skip (exit 2) doesn't trigger the
    trap cleanup.

v2: Add support to only scan hwmon and drm PMUs if the event or PMU
wildcard can match. Add a test as requested by Namhyung. Add file
comments.

v1:
https://lore.kernel.org/lkml/20250211071727.364389-1-irogers@google.com/

Ian Rogers (4):
  perf parse-events: Avoid scanning PMUs that can't contain events
  perf parse-events: Avoid scanning PMUs that can't match a wildcard
  perf drm_pmu: Add a tool like PMU to expose DRM information
  perf tests: Add a DRM PMU test

 tools/perf/tests/shell/drm_pmu.sh |  78 ++++
 tools/perf/util/Build             |   1 +
 tools/perf/util/drm_pmu.c         | 689 ++++++++++++++++++++++++++++++
 tools/perf/util/drm_pmu.h         |  39 ++
 tools/perf/util/evsel.c           |   9 +
 tools/perf/util/parse-events.c    |  30 +-
 tools/perf/util/pmu.c             |  15 +
 tools/perf/util/pmu.h             |   4 +-
 tools/perf/util/pmus.c            | 101 ++++-
 tools/perf/util/pmus.h            |   2 +
 10 files changed, 952 insertions(+), 16 deletions(-)
 create mode 100755 tools/perf/tests/shell/drm_pmu.sh
 create mode 100644 tools/perf/util/drm_pmu.c
 create mode 100644 tools/perf/util/drm_pmu.h

-- 
2.49.0.504.g3bcea36a83-goog


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-06-23 23:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-03 20:24 [PATCH v3 0/4] Add support for a DRM tool like PMU Ian Rogers
2025-04-03 20:24 ` [PATCH v3 1/4] perf parse-events: Avoid scanning PMUs that can't contain events Ian Rogers
2025-04-03 20:24 ` [PATCH v3 2/4] perf parse-events: Avoid scanning PMUs that can't match a wildcard Ian Rogers
2025-04-03 20:24 ` [PATCH v3 3/4] perf drm_pmu: Add a tool like PMU to expose DRM information Ian Rogers
2025-04-03 20:24 ` [PATCH v3 4/4] perf tests: Add a DRM PMU test Ian Rogers
2025-04-30 15:21 ` [PATCH v3 0/4] Add support for a DRM tool like PMU Ian Rogers
2025-04-30 23:36   ` Arnaldo Carvalho de Melo
2025-05-27 21:08     ` Ian Rogers
2025-06-23 23:22 ` Namhyung Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox