From: TAKANO Mitsuhiro <takano32@gmail.com>
To: Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
James Clark <james.clark@linaro.org>,
Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
Randy Dunlap <rdunlap@infradead.org>,
linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
TAKANO Mitsuhiro <takano32@gmail.com>
Subject: [PATCH v4] arm64: perf: Drop the example the userspace counter section points at
Date: Wed, 25 Nov 2026 10:03:57 +0000 [thread overview]
Message-ID: <20261125100357.1937729-1-takano32@gmail.com> (raw)
In-Reply-To: <20261111034432.2020955-1-takano32@gmail.com>
Documentation/arch/arm64/perf.rst points at
tools/perf/arch/arm64/tests/user-events.c, in the text and in the link
target, but that file is not in the tree and no commit in the history
leading to this base has added one.
The section already describes how to use the libperf helpers and points at
tools/lib/perf/tests/test-evsel.c as the example, so the sentence that
sends the reader elsewhere is redundant. Remove it and the link target
rather than pointing at another test, and give the commands to build and
run that example in the How-to section, next to the reference it belongs
to.
The edit and this changelog were written with the help of an LLM
assistant (Hermes Agent). I reviewed the diff and the reasoning, and I
am responsible for the submission.
Fixes: aa1005d15d2a ("Documentation: arm64: Document PMU counters access from userspace")
Reviewed-by: James Clark <james.clark@linaro.org>
Signed-off-by: TAKANO Mitsuhiro <takano32@gmail.com>
---
v2: drop the reference instead of pointing it at another file, and give
the libperf build and run commands in the How-to section. The
perf test -v user step is not moved; it is gone.
v3: drop the v1 review history so the commit log is the change alone. The
missing file is stated once. Raised by Sashiko:
https://lore.kernel.org/all/sashiko-outbox-208137@kernel.org/
v4: rebased onto v7.4-rc4, with the Fixes tag and the note about the tool
that wrote this changelog back. The diff is unchanged from v3:
https://lore.kernel.org/all/20261111034432.2020955-1-takano32@gmail.com/
v2 and v3 did not go to linux-arm-kernel; v1 did, and James Clark
answered it there.
Documentation/arch/arm64/perf.rst | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/Documentation/arch/arm64/perf.rst b/Documentation/arch/arm64/perf.rst
index 997fd716b82f..5b9cc2aeb642 100644
--- a/Documentation/arch/arm64/perf.rst
+++ b/Documentation/arch/arm64/perf.rst
@@ -131,7 +131,12 @@ changed.
The userspace access is supported in libperf using the perf_evsel__mmap()
and perf_evsel__read() functions. See `tools/lib/perf/tests/test-evsel.c`_ for
-an example.
+an example, which can be built and run from the source tree:
+
+.. code-block:: sh
+
+ make -C tools/lib/perf make-tests
+ tools/lib/perf/tests-static
About heterogeneous systems
---------------------------
@@ -140,14 +145,6 @@ only be enabled when the tasks are pinned to a homogeneous subset of cores and
the corresponding PMU instance is opened by specifying the 'type' attribute.
The use of generic event types is not supported in this case.
-Have a look at `tools/perf/arch/arm64/tests/user-events.c`_ for an example. It
-can be run using the perf tool to check that the access to the registers works
-correctly from userspace:
-
-.. code-block:: sh
-
- perf test -v user
-
About chained events and counter sizes
--------------------------------------
The user can request either a 32-bit (config1:0 == 0) or 64-bit (config1:0 == 1)
@@ -160,8 +157,6 @@ userspace must treat the upper 32-bits read from the counter as UNKNOWN. The
and should be used to mask the upper bits as needed.
.. Links
-.. _tools/perf/arch/arm64/tests/user-events.c:
- https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/perf/arch/arm64/tests/user-events.c
.. _tools/lib/perf/tests/test-evsel.c:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/lib/perf/tests/test-evsel.c
base-commit: b6a9fa34ce4187cb69d3c588a4bbffc31ce5db8f
--
2.53.0
prev parent reply other threads:[~2026-11-25 10:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-06 23:45 [PATCH] arm64: perf: Fix the userspace counter example link TAKANO Mitsuhiro
2026-11-09 11:19 ` James Clark
2026-11-11 2:35 ` [PATCH v2] arm64: perf: Drop the example the userspace counter section points at TAKANO Mitsuhiro
2026-11-11 3:44 ` [PATCH v3] " TAKANO Mitsuhiro
2026-11-11 9:53 ` James Clark
2026-11-25 10:03 ` TAKANO Mitsuhiro [this message]
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=20261125100357.1937729-1-takano32@gmail.com \
--to=takano32@gmail.com \
--cc=catalin.marinas@arm.com \
--cc=corbet@lwn.net \
--cc=james.clark@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=namhyung@kernel.org \
--cc=rdunlap@infradead.org \
--cc=skhan@linuxfoundation.org \
--cc=will@kernel.org \
/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®