* [PATCH 0/1] perf arm-spe: extend Arm SPE test script with regression testing
@ 2021-11-12 16:20 German Gomez
[not found] ` <20211112162005.11876-2-german.gomez@arm.com>
0 siblings, 1 reply; 4+ messages in thread
From: German Gomez @ 2021-11-12 16:20 UTC (permalink / raw)
To: linux-kernel, linux-perf-users, acme
Cc: leo.yan, German Gomez, Mark Rutland, Alexander Shishkin,
Jiri Olsa, Namhyung Kim
This patch extends the test_arm_spe.sh test script in order to tests for
regressions in the decoding flow of Arm SPE samples.
At the time of writing, perf-inject is not working for Arm SPE. In order
to test/apply this patch, [1] needs to be resolved first.
[1] https://lore.kernel.org/all/20211105104130.28186-1-german.gomez@arm.com/T/#m06a8cc68f7b971b6eb10d11aa6e7385a7f6be29e
German Gomez (1):
perf arm-spe: extend Arm SPE test script with regression testing
tools/perf/tests/shell/test_arm_spe.sh | 32 ++++++++++++++++++++++++
tools/perf/tests/shell/test_arm_spe.tgz | Bin 0 -> 253541 bytes
2 files changed, 32 insertions(+)
create mode 100644 tools/perf/tests/shell/test_arm_spe.tgz
--
2.25.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] perf arm-spe: extend Arm SPE test script with regression testing
[not found] ` <20211112162005.11876-2-german.gomez@arm.com>
@ 2021-11-22 13:46 ` German Gomez
2021-11-23 5:19 ` Leo Yan
1 sibling, 0 replies; 4+ messages in thread
From: German Gomez @ 2021-11-22 13:46 UTC (permalink / raw)
To: linux-kernel, linux-perf-users, acme
Cc: James Clark, leo.yan, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Namhyung Kim
On 12/11/2021 16:20, German Gomez wrote:
> Extend the test_arm_spe.sh script to test for regressions in the
> decoding flow of Arm SPE samples. In order to support the tests, a set
> of perf.data files has been generated offline and is being hosted under
> tools/perf/tests/shell/test_arm_spe.tgz:
>
> (See perf report --header-only to see the actual commands used)
Looking back at this patch, I don't think it can be applied as is. I
notice that the docs for the --itrace argument aren't up to date (it
says the default is --itrace=ibxwpe but lately it has changed ([1] &
[2]). The value of --itrace should be locked in the test script.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/perf/Documentation/itrace.txt?id=136057256686de39cc3a07c2e39ef6bc43003ff6#n26
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/perf/util/auxtrace.c?id=136057256686de39cc3a07c2e39ef6bc43003ff6#n1335
>
> - test_arm_spe.tgz
> `- arm_spe_decode_contextidr.data
> `- arm_spe_decode_contextidr.data.inject
> `- arm_spe_decode_switch_events.data
> `- arm_spe_decode_switch_events.data.inject
>
> [...]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] perf arm-spe: extend Arm SPE test script with regression testing
[not found] ` <20211112162005.11876-2-german.gomez@arm.com>
2021-11-22 13:46 ` [PATCH 1/1] " German Gomez
@ 2021-11-23 5:19 ` Leo Yan
2021-11-23 11:41 ` German Gomez
1 sibling, 1 reply; 4+ messages in thread
From: Leo Yan @ 2021-11-23 5:19 UTC (permalink / raw)
To: German Gomez
Cc: linux-kernel, linux-perf-users, acme, Mark Rutland,
Alexander Shishkin, Jiri Olsa, Namhyung Kim
Hi German,
On Fri, Nov 12, 2021 at 04:20:03PM +0000, German Gomez wrote:
> Extend the test_arm_spe.sh script to test for regressions in the
> decoding flow of Arm SPE samples. In order to support the tests, a set
> of perf.data files has been generated offline and is being hosted under
> tools/perf/tests/shell/test_arm_spe.tgz:
Seems to me it's not a good idea to upstream perf data binaries into the
mainline kernel. I understood you want to test the perf data with
different context tracing modes (using contextidr vs switch events),
since these two different modes we cannot capture them with the same
kernel Image, I think this is the main reason you upstreamed the perf
data binaries in this patch.
On the other hand, like CoreSight smoke testing, by default we can give
priority for testing root PID namespace, so you could do the test with
below commands, which is assumed that tracing PID in contextidr:
perf record -e arm_spe_0// -- test_program
perf report
perf script
Then, for testing non-root PID namespace, can we use the command
"unshare" to create a namespace and run perf tool in a non-root
PID namespace? In this way, you could record Arm SPE trace data and
decode it on the fly. Finally we can avoid to upstream perf data
binaries.
Thanks,
Leo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] perf arm-spe: extend Arm SPE test script with regression testing
2021-11-23 5:19 ` Leo Yan
@ 2021-11-23 11:41 ` German Gomez
0 siblings, 0 replies; 4+ messages in thread
From: German Gomez @ 2021-11-23 11:41 UTC (permalink / raw)
To: Leo Yan
Cc: linux-kernel, linux-perf-users, acme, Mark Rutland,
Alexander Shishkin, Jiri Olsa, Namhyung Kim
Hi Leo,
Thanks for the comments.
On 23/11/2021 05:19, Leo Yan wrote:
> Hi German,
>
> On Fri, Nov 12, 2021 at 04:20:03PM +0000, German Gomez wrote:
>> Extend the test_arm_spe.sh script to test for regressions in the
>> decoding flow of Arm SPE samples. In order to support the tests, a set
>> of perf.data files has been generated offline and is being hosted under
>> tools/perf/tests/shell/test_arm_spe.tgz:
> Seems to me it's not a good idea to upstream perf data binaries into the
> mainline kernel. I understood you want to test the perf data with
> different context tracing modes (using contextidr vs switch events),
> since these two different modes we cannot capture them with the same
> kernel Image, I think this is the main reason you upstreamed the perf
> data binaries in this patch.
For this patch I wanted to test the decoding of SPE events, given fixed
inputs, in order to lock the current implementation of the decoder.
>
> On the other hand, like CoreSight smoke testing, by default we can give
> priority for testing root PID namespace, so you could do the test with
> below commands, which is assumed that tracing PID in contextidr:
>
> perf record -e arm_spe_0// -- test_program
> perf report
> perf script
>
> Then, for testing non-root PID namespace, can we use the command
> "unshare" to create a namespace and run perf tool in a non-root
> PID namespace? In this way, you could record Arm SPE trace data and
> decode it on the fly. Finally we can avoid to upstream perf data
> binaries.
I think adding additional smoke testing is a good idea. We could also
check if CONTEXTIDR is enabled in the config (either /boot/config... or
/proc/config.gz).
Thanks,
German
>
> Thanks,
> Leo
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-11-23 11:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-12 16:20 [PATCH 0/1] perf arm-spe: extend Arm SPE test script with regression testing German Gomez
[not found] ` <20211112162005.11876-2-german.gomez@arm.com>
2021-11-22 13:46 ` [PATCH 1/1] " German Gomez
2021-11-23 5:19 ` Leo Yan
2021-11-23 11:41 ` German Gomez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).