From: Ian Rogers <irogers@google.com>
To: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Kan Liang <kan.liang@linux.intel.com>,
"Masami Hiramatsu (Google)" <mhiramat@kernel.org>,
James Clark <james.clark@linaro.org>,
Weilin Wang <weilin.wang@intel.com>,
Dominique Martinet <asmadeus@codewreck.org>,
Thomas Richter <tmricht@linux.ibm.com>,
Junhao He <hejunhao3@huawei.com>,
Jean-Philippe Romain <jean-philippe.romain@foss.st.com>,
matthew.olson@intel.com, linux-kernel@vger.kernel.org,
linux-perf-users@vger.kernel.org,
dri-devel@lists.freedesktop.org
Cc: Ian Rogers <irogers@google.com>
Subject: [PATCH v4 0/3] Add support for a DRM tool like PMU
Date: Tue, 24 Jun 2025 16:18:34 -0700 [thread overview]
Message-ID: <20250624231837.179536-1-irogers@google.com> (raw)
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/20250211071727.364389-1-irogers@google.com/
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
--
2.50.0.727.gbf7dc18ff4-goog
next reply other threads:[~2025-06-24 23:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-24 23:18 Ian Rogers [this message]
2025-06-24 23:18 ` [PATCH v4 1/3] perf parse-events: Avoid scanning PMUs that can't contain events Ian Rogers
2025-06-24 23:18 ` [PATCH v4 2/3] perf drm_pmu: Add a tool like PMU to expose DRM information Ian Rogers
2025-06-24 23:18 ` [PATCH v4 3/3] perf tests: Add a DRM PMU test Ian Rogers
2025-06-26 17:41 ` [PATCH v4 0/3] Add support for a DRM tool like PMU Namhyung Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250624231837.179536-1-irogers@google.com \
--to=irogers@google.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=asmadeus@codewreck.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=hejunhao3@huawei.com \
--cc=james.clark@linaro.org \
--cc=jean-philippe.romain@foss.st.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=matthew.olson@intel.com \
--cc=mhiramat@kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tmricht@linux.ibm.com \
--cc=weilin.wang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®