* [PATCH] perf test: Record kcore for the CoreSight callchain test
@ 2026-09-28 9:06 Leo Yan
2026-09-28 9:13 ` James Clark
2026-09-28 9:19 ` sashiko-bot
0 siblings, 2 replies; 3+ messages in thread
From: Leo Yan @ 2026-09-28 9:06 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Namhyung Kim, Jiri Olsa, Ian Rogers,
Adrian Hunter, Suzuki K Poulose, Mike Leach, James Clark,
coresight, linux-arm-kernel, linux-perf-users, linux-kernel
Cc: Leo Yan
The CoreSight callchain test traces both userspace and kernel execution
and checks the callchain across a syscall.
Add --kcore to perf record to save the running kernel image alongside
the trace data so perf script can use it to decode the kernel trace.
Add a Fixes tag so the change can be backported to stable kernels and
improve the test reliability.
Fixes: ca0e19074bd6 ("perf test: Add Arm CoreSight callchain test")
Signed-off-by: Leo Yan <leo.yan@arm.com>
---
tools/perf/tests/shell/coresight/callchain.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/tests/shell/coresight/callchain.sh b/tools/perf/tests/shell/coresight/callchain.sh
index 13cca7dc1118..b69187f1a37f 100755
--- a/tools/perf/tests/shell/coresight/callchain.sh
+++ b/tools/perf/tests/shell/coresight/callchain.sh
@@ -43,7 +43,7 @@ record_trace()
mkfifo "$cf" "$af"
- perf record -o "$data" -e cs_etm// --per-thread -D -1 --control fifo:"$cf","$af" -- \
+ perf record --kcore -o "$data" -e cs_etm// --per-thread -D -1 --control fifo:"$cf","$af" -- \
perf test --record-ctl fifo:"$cf","$af" -w callchain >/dev/null 2>&1 &&
# It is safe to use 'i3i' with a three-instruction interval, since the
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] perf test: Record kcore for the CoreSight callchain test
2026-09-28 9:06 [PATCH] perf test: Record kcore for the CoreSight callchain test Leo Yan
@ 2026-09-28 9:13 ` James Clark
2026-09-28 9:19 ` sashiko-bot
1 sibling, 0 replies; 3+ messages in thread
From: James Clark @ 2026-09-28 9:13 UTC (permalink / raw)
To: Leo Yan
Cc: Arnaldo Carvalho de Melo, Namhyung Kim, Jiri Olsa, Ian Rogers,
Adrian Hunter, Suzuki K Poulose, Mike Leach, coresight,
linux-arm-kernel, linux-perf-users, linux-kernel
On 28/09/2026 10:06, Leo Yan wrote:
> The CoreSight callchain test traces both userspace and kernel execution
> and checks the callchain across a syscall.
>
> Add --kcore to perf record to save the running kernel image alongside
> the trace data so perf script can use it to decode the kernel trace.
>
> Add a Fixes tag so the change can be backported to stable kernels and
> improve the test reliability.
>
> Fixes: ca0e19074bd6 ("perf test: Add Arm CoreSight callchain test")
> Signed-off-by: Leo Yan <leo.yan@arm.com>
> ---
> tools/perf/tests/shell/coresight/callchain.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/tests/shell/coresight/callchain.sh b/tools/perf/tests/shell/coresight/callchain.sh
> index 13cca7dc1118..b69187f1a37f 100755
> --- a/tools/perf/tests/shell/coresight/callchain.sh
> +++ b/tools/perf/tests/shell/coresight/callchain.sh
> @@ -43,7 +43,7 @@ record_trace()
>
> mkfifo "$cf" "$af"
>
> - perf record -o "$data" -e cs_etm// --per-thread -D -1 --control fifo:"$cf","$af" -- \
> + perf record --kcore -o "$data" -e cs_etm// --per-thread -D -1 --control fifo:"$cf","$af" -- \
> perf test --record-ctl fifo:"$cf","$af" -w callchain >/dev/null 2>&1 &&
>
> # It is safe to use 'i3i' with a three-instruction interval, since the
Reviewed-by: James Clark <james.clark@linaro.org>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] perf test: Record kcore for the CoreSight callchain test
2026-09-28 9:06 [PATCH] perf test: Record kcore for the CoreSight callchain test Leo Yan
2026-09-28 9:13 ` James Clark
@ 2026-09-28 9:19 ` sashiko-bot
1 sibling, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-09-28 9:19 UTC (permalink / raw)
To: Leo Yan; +Cc: linux-perf-users
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] perf/test: fail instead of skip when /proc/kcore is inaccessible
--
commit f13d58799b60cb0c738cb7c9e2cb5ed0a5fa9e32
Author: Leo Yan <leo.yan@arm.com>
Subject: perf test: Record kcore for the CoreSight callchain test
The CoreSight callchain test traces both userspace and kernel execution
and checks the callchain across a syscall.
Add --kcore to perf record to save the running kernel image alongside
the trace data so perf script can use it to decode the kernel trace.
> diff --git a/tools/perf/tests/shell/coresight/callchain.sh b/tools/perf/tests/shell/coresight/callchain.sh
> index 13cca7dc11184..b69187f1a37f5 100755
> --- a/tools/perf/tests/shell/coresight/callchain.sh
> +++ b/tools/perf/tests/shell/coresight/callchain.sh
> @@ -43,7 +43,7 @@ record_trace()
>
> mkfifo "$cf" "$af"
>
> - perf record -o "$data" -e cs_etm// --per-thread -D -1 --control fifo:"$cf","$af" -- \
> + perf record --kcore -o "$data" -e cs_etm// --per-thread -D -1 --control fifo:"$cf","$af" -- \
[Severity: Medium]
Will this unconditional --kcore flag cause the test to fail instead of
skipping when /proc/kcore is inaccessible?
If /proc/kcore is missing (e.g., due to CONFIG_PROC_KCORE=n) or restricted
by kernel lockdown, perf record --kcore returns an error. This error causes
record_trace() to fail, which propagates an overall test failure (exit
code 1) instead of gracefully skipping (exit code 2). This may cause false
positive regression reports in kernel CI environments.
Should skip_if_system_is_not_ready() be updated to check [ -r /proc/kcore ]
to ensure the test degrades gracefully?
> perf test --record-ctl fifo:"$cf","$af" -w callchain >/dev/null 2>&1 &&
>
> # It is safe to use 'i3i' with a three-instruction interval, since the
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260928090644.24346-1-leo.yan@arm.com?part=1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-09-28 9:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-28 9:06 [PATCH] perf test: Record kcore for the CoreSight callchain test Leo Yan
2026-09-28 9:13 ` James Clark
2026-09-28 9:19 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox