Skip to content

Add support for a DRM tool like PMU

Ian Rogers dri-devel linux-perf-users lkml 3 versions – Applied

Status from this message: Applied to perf-tools-next, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest3 patches 1 replyApplied
  2. v34 patches 4 repliesSuperseded
  3. v24 patches 0 repliesSuperseded

v1 from the cover letter

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/3perf parse-events: Avoid scanning PMUs that can't contain eventstools/perf/util/parse-events.c tools/perf/util/pmus.c tools/perf/util/pmus.h+97 -150 replies
2/3perf drm_pmu: Add a tool like PMU to expose DRM informationtools/perf/util/Build tools/perf/util/drm_pmu.c tools/perf/util/drm_pmu.h +4 more+779 -50 replies
3/3perf tests: Add a DRM PMU testtools/perf/tests/shell/drm_pmu.sh+78 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH v4 0/3] Add support for a DRM tool like PMU

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.

v4: Rebase over changes like the auto merge stat to first wildcard PMU
change and the clean up of tool PMU initialization.

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/[email protected]/

Ian Rogers (3):
perf parse-events: Avoid scanning PMUs that can't contain events 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         | 686 ++++++++++++++++++++++++++++++
 tools/perf/util/drm_pmu.h         |  39 ++
 tools/perf/util/evsel.c           |   9 +
 tools/perf/util/parse-events.c    |  33 +-
 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, 951 insertions(+), 17 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
Signature · 1 line
2.50.0.727.gbf7dc18ff4-goog