From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: James Clark <james.clark@linaro.org>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>,
Mike Leach <mike.leach@arm.com>, Leo Yan <leo.yan@arm.com>,
Namhyung Kim <namhyung@kernel.org>, Jiri Olsa <jolsa@kernel.org>,
Ian Rogers <irogers@google.com>, Amir Ayupov <aaupov@meta.com>,
Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
Paschalis Mpeis <Paschalis.Mpeis@arm.com>,
coresight@lists.linaro.org, linux-perf-users@vger.kernel.org,
linux-kernel@vger.kernel.org,
Arnaldo Carvalho de Melo <acme@redhat.com>,
linux-doc@vger.kernel.org
Subject: Re: [PATCH v5 00/19] perf cs-etm: Queue context packets for frontend
Date: Wed, 10 Jun 2026 17:14:34 -0300 [thread overview]
Message-ID: <ainFqtxdLwhbRqrI@x1> (raw)
In-Reply-To: <20260609-james-cs-context-tracking-fix-v5-0-d53a7d096a19@linaro.org>
On Tue, Jun 09, 2026 at 03:40:05PM +0100, James Clark wrote:
> Fix thread tracking when decoding Coresight trace and add a new test for
> it.
The issues found by sashiko seem mild and you can address them in follow
up patches, I think.
So for the benefit of having perf-tools-next available for linux-next
testing and the window is closing soon, so I've merged this, ok?
- Arnaldo
> The new test is added as a Perf test workload instead of a custom binary
> with its own build system, but this requires a new feature in Perf test
> to pass in control pipes which can enable and disable events. This
> scopes the recording to just the workload and helps to reduce the amount
> of data recorded in tracing tests.
>
> With this new feature we can re-write all of the Coresight tests to make
> use of it and remove the remaining binaries which fixes the following
> issues:
>
> * They didn't work in out of source builds
> * A lot of the tests unnecessarily required root and didn't skip
> without it
> * They were mainly qualitative tests which didn't look for specific
> behavior
>
> Most importantly, the long build and runtime has been reduced. On a
> Radxa Orion O6, unroll_loop_thread.c took 37s to compile which is longer
> than the entire Perf build. Now the build time is negligible and the
> before and after test runtimes for all the Coresight tests are:
>
> | N1SDP | Orion O6
> -----------------------------------
> Before | 4m 0s | 14m 49s
> After | 26s | 56s
> -----------------------------------
>
> Signed-off-by: James Clark <james.clark@linaro.org>
> ---
> Changes in v5:
> - Forgot to include this change:
> - Test for actual length of expected raw dump (Leo)
> - Link to v4: https://lore.kernel.org/r/20260609-james-cs-context-tracking-fix-v4-0-44f9fb9e5c42@linaro.org
>
> Changes in v4:
> - Rename workload-ctl to record-ctl and improve docs (Leo)
> - Use new packet argument everywhere in
> cs_etm__synth_instruction_sample() (Sashiko)
> - Test for actual length of expected raw dump (Leo)
> - Use -fno-inline instead of keyword (Leo)
> - Don't test any brace or call lines in deterministic test
> - Make sure context switch loop test does cleanup on failure (Sashiko)
> - Remove undef int overflows in workloads (Sashiko)
> - Link to v3: https://lore.kernel.org/r/20260603-james-cs-context-tracking-fix-v3-0-c392945d9ed5@linaro.org
>
> Changes in v3:
> - Minor sashiko comments
> - Close some more pipes
> - Fix warning messages
> - Error handling improvements
> - Pass packet into cs_etm__synth_instruction_sample()
> - Fixup stale comment (Leo)
> - Link to v2: https://lore.kernel.org/r/20260602-james-cs-context-tracking-fix-v2-0-85b5ce6f55c6@linaro.org
>
> Changes in v2:
> - Add --workload-ctl option to Perf test
> - Re-write all the Coresight tests and speed them up
> - Pass packet to memory access function so frontend can use either the
> previous or current packet's EL
> - Link to v1: https://lore.kernel.org/r/20260526-james-cs-context-tracking-fix-v1-0-ebd602e18287@linaro.org
>
> ---
> James Clark (19):
> perf cs-etm: Queue context packets for frontend
> perf test: Add workload-ctl option
> perf test: Add a workload that forces context switches
> perf test cs-etm: Test process attribution
> perf test: Add deterministic workload
> perf test cs-etm: Replace unroll loop thread with deterministic decode test
> perf test cs-etm: Remove asm_pure_loop test
> perf test cs-etm: Replace memcpy test with raw dump stress test
> perf test: Add named_threads workload
> perf test cs-etm: Test decoding for concurrent threads test
> perf test cs-etm: Remove duplicate branch tests
> perf test cs-etm: Skip if not root
> perf test cs-etm: Reduce snapshot size
> perf test cs-etm: Speed up basic test
> perf test cs-etm: Remove unused Coresight workloads
> perf test cs-etm: Make disassembly test use kcore
> perf test cs-etm: Add all branch instructions to test
> perf test cs-etm: Speed up disassembly test
> perf test cs-etm: Move existing tests to coresight folder
>
> Documentation/trace/coresight/coresight-perf.rst | 78 +------
> MAINTAINERS | 2 -
> tools/perf/Documentation/perf-test.txt | 24 ++-
> tools/perf/Makefile.perf | 14 +-
> tools/perf/scripts/python/arm-cs-trace-disasm.py | 20 +-
> tools/perf/tests/builtin-test.c | 187 +++++++++++++++-
> tools/perf/tests/shell/coresight/Makefile | 29 ---
> .../perf/tests/shell/coresight/Makefile.miniconfig | 14 --
> tools/perf/tests/shell/coresight/asm_pure_loop.sh | 22 --
> .../tests/shell/coresight/asm_pure_loop/.gitignore | 1 -
> .../tests/shell/coresight/asm_pure_loop/Makefile | 34 ---
> .../shell/coresight/asm_pure_loop/asm_pure_loop.S | 30 ---
> .../tests/shell/coresight/concurrent_threads.sh | 45 ++++
> .../tests/shell/coresight/context_switch_thread.sh | 69 ++++++
> tools/perf/tests/shell/coresight/deterministic.sh | 72 +++++++
> .../tests/shell/coresight/memcpy_thread/.gitignore | 1 -
> .../tests/shell/coresight/memcpy_thread/Makefile | 33 ---
> .../shell/coresight/memcpy_thread/memcpy_thread.c | 80 -------
> .../tests/shell/coresight/memcpy_thread_16k_10.sh | 22 --
> .../perf/tests/shell/coresight/raw_dump_stress.sh | 65 ++++++
> .../shell/{ => coresight}/test_arm_coresight.sh | 43 ++--
> .../{ => coresight}/test_arm_coresight_disasm.sh | 23 +-
> .../tests/shell/coresight/thread_loop/.gitignore | 1 -
> .../tests/shell/coresight/thread_loop/Makefile | 33 ---
> .../shell/coresight/thread_loop/thread_loop.c | 85 --------
> .../shell/coresight/thread_loop_check_tid_10.sh | 23 --
> .../shell/coresight/thread_loop_check_tid_2.sh | 23 --
> .../shell/coresight/unroll_loop_thread/.gitignore | 1 -
> .../shell/coresight/unroll_loop_thread/Makefile | 33 ---
> .../unroll_loop_thread/unroll_loop_thread.c | 75 -------
> .../tests/shell/coresight/unroll_loop_thread_10.sh | 22 --
> tools/perf/tests/shell/lib/coresight.sh | 134 ------------
> tools/perf/tests/tests.h | 3 +
> tools/perf/tests/workloads/Build | 4 +
> tools/perf/tests/workloads/context_switch_loop.c | 110 ++++++++++
> tools/perf/tests/workloads/deterministic.c | 39 ++++
> tools/perf/tests/workloads/named_threads.c | 109 ++++++++++
> tools/perf/util/cs-etm-decoder/cs-etm-decoder.c | 21 +-
> tools/perf/util/cs-etm.c | 236 ++++++++++++---------
> tools/perf/util/cs-etm.h | 8 +-
> 40 files changed, 926 insertions(+), 942 deletions(-)
> ---
> base-commit: 351a37f2fda4db668cff8ba12f2992d73dccdaea
> change-id: 20260515-james-cs-context-tracking-fix-754998bae7ed
>
> Best regards,
> --
> James Clark <james.clark@linaro.org>
next prev parent reply other threads:[~2026-06-10 20:14 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-09 14:40 [PATCH v5 00/19] perf cs-etm: Queue context packets for frontend James Clark
2026-06-09 14:40 ` [PATCH v5 01/19] " James Clark
2026-06-09 14:40 ` [PATCH v5 02/19] perf test: Add workload-ctl option James Clark
2026-06-09 14:40 ` [PATCH v5 03/19] perf test: Add a workload that forces context switches James Clark
2026-06-09 14:40 ` [PATCH v5 04/19] perf test cs-etm: Test process attribution James Clark
2026-06-09 14:40 ` [PATCH v5 05/19] perf test: Add deterministic workload James Clark
2026-06-09 14:40 ` [PATCH v5 06/19] perf test cs-etm: Replace unroll loop thread with deterministic decode test James Clark
2026-06-09 17:04 ` Leo Yan
2026-06-09 14:40 ` [PATCH v5 07/19] perf test cs-etm: Remove asm_pure_loop test James Clark
2026-06-09 14:40 ` [PATCH v5 08/19] perf test cs-etm: Replace memcpy test with raw dump stress test James Clark
2026-06-09 17:16 ` Leo Yan
2026-06-09 14:40 ` [PATCH v5 09/19] perf test: Add named_threads workload James Clark
2026-06-09 16:00 ` sashiko-bot
2026-06-09 14:40 ` [PATCH v5 10/19] perf test cs-etm: Test decoding for concurrent threads test James Clark
2026-06-09 17:18 ` Leo Yan
2026-06-09 14:40 ` [PATCH v5 11/19] perf test cs-etm: Remove duplicate branch tests James Clark
2026-06-09 14:40 ` [PATCH v5 12/19] perf test cs-etm: Skip if not root James Clark
2026-06-09 16:13 ` sashiko-bot
2026-06-09 14:40 ` [PATCH v5 13/19] perf test cs-etm: Reduce snapshot size James Clark
2026-06-09 14:40 ` [PATCH v5 14/19] perf test cs-etm: Speed up basic test James Clark
2026-06-09 14:40 ` [PATCH v5 15/19] perf test cs-etm: Remove unused Coresight workloads James Clark
2026-06-09 17:22 ` Leo Yan
2026-06-09 14:40 ` [PATCH v5 16/19] perf test cs-etm: Make disassembly test use kcore James Clark
2026-06-09 14:40 ` [PATCH v5 17/19] perf test cs-etm: Add all branch instructions to test James Clark
2026-06-09 14:40 ` [PATCH v5 18/19] perf test cs-etm: Speed up disassembly test James Clark
2026-06-09 16:48 ` sashiko-bot
2026-06-09 14:40 ` [PATCH v5 19/19] perf test cs-etm: Move existing tests to coresight folder James Clark
2026-06-10 20:14 ` Arnaldo Carvalho de Melo [this message]
2026-06-11 8:37 ` [PATCH v5 00/19] perf cs-etm: Queue context packets for frontend James Clark
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=ainFqtxdLwhbRqrI@x1 \
--to=acme@kernel.org \
--cc=Paschalis.Mpeis@arm.com \
--cc=aaupov@meta.com \
--cc=acme@redhat.com \
--cc=corbet@lwn.net \
--cc=coresight@lists.linaro.org \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=leo.yan@arm.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mike.leach@arm.com \
--cc=namhyung@kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=suzuki.poulose@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.