mbox series

[v2,0/3] perf arm-spe: Add snapshot mode support

Message ID 20211109163009.92072-1-german.gomez@arm.com (mailing list archive)
Headers show
Series perf arm-spe: Add snapshot mode support | expand

Message

German Gomez Nov. 9, 2021, 4:30 p.m. UTC
This patchset adds snapshot mode support for arm-spe.

  - [PATCH 1/3] implements the minimal callbacks to support recording in
    snapshot mode.
  - [PATCH 2/3] implements the find_snapshot callback in order to handle
    wrap-arounds in the AUX buffer.
  - [PATCH 3/3] adds a test for spe snapshot mode.

---

Changes since v1:
  - Added acme@kernel.org to the recipients list as I forgot to include
    him in the original patchset [1].
  - Removed [PATCH 1/5] and [PATCH 2/5] in order to keep patches
    semantically relevant.
  - Updated test script test_arm_spe.sh because it wasn't working on
    distributions that use dash shell v0.5.10 (ubuntu 20) [2].

[1] https://lore.kernel.org/all/20210916154635.1525-1-german.gomez@arm.com/
[2] https://lore.kernel.org/all/fd65eb63-d4ca-2105-74cb-c717ad2eb7d3@arm.com/

German Gomez (3):
  perf arm-spe: Add snapshot mode support
  perf arm-spe: Implement find_snapshot callback
  perf arm-spe: Snapshot mode test

 tools/perf/arch/arm64/util/arm-spe.c   | 275 +++++++++++++++++++++++++
 tools/perf/tests/shell/test_arm_spe.sh |  89 ++++++++
 2 files changed, 364 insertions(+)
 create mode 100755 tools/perf/tests/shell/test_arm_spe.sh

Comments

Namhyung Kim Nov. 10, 2021, 11:52 p.m. UTC | #1
Hello,

On Tue, Nov 9, 2021 at 8:30 AM German Gomez <german.gomez@arm.com> wrote:
>
> This patchset adds snapshot mode support for arm-spe.
>
>   - [PATCH 1/3] implements the minimal callbacks to support recording in
>     snapshot mode.
>   - [PATCH 2/3] implements the find_snapshot callback in order to handle
>     wrap-arounds in the AUX buffer.
>   - [PATCH 3/3] adds a test for spe snapshot mode.
>
> ---
>
> Changes since v1:
>   - Added acme@kernel.org to the recipients list as I forgot to include
>     him in the original patchset [1].
>   - Removed [PATCH 1/5] and [PATCH 2/5] in order to keep patches
>     semantically relevant.
>   - Updated test script test_arm_spe.sh because it wasn't working on
>     distributions that use dash shell v0.5.10 (ubuntu 20) [2].
>
> [1] https://lore.kernel.org/all/20210916154635.1525-1-german.gomez@arm.com/
> [2] https://lore.kernel.org/all/fd65eb63-d4ca-2105-74cb-c717ad2eb7d3@arm.com/
>
> German Gomez (3):
>   perf arm-spe: Add snapshot mode support
>   perf arm-spe: Implement find_snapshot callback
>   perf arm-spe: Snapshot mode test

Acked-by: Namhyung Kim <namhyung@kernel.org>

Thanks,
Namhyung

>
>  tools/perf/arch/arm64/util/arm-spe.c   | 275 +++++++++++++++++++++++++
>  tools/perf/tests/shell/test_arm_spe.sh |  89 ++++++++
>  2 files changed, 364 insertions(+)
>  create mode 100755 tools/perf/tests/shell/test_arm_spe.sh
>
> --
> 2.25.1
>
Leo Yan Nov. 11, 2021, 8:46 a.m. UTC | #2
Hi Arnaldo,

On Tue, Nov 09, 2021 at 04:30:06PM +0000, German Gomez wrote:
> This patchset adds snapshot mode support for arm-spe.
> 
>   - [PATCH 1/3] implements the minimal callbacks to support recording in
>     snapshot mode.
>   - [PATCH 2/3] implements the find_snapshot callback in order to handle
>     wrap-arounds in the AUX buffer.
>   - [PATCH 3/3] adds a test for spe snapshot mode.

I have verified this patch set on Hisilicon D06 board, please consider
to pick up:

root@ubuntu:/home/leoy/linux/tools/perf# ./perf test -v 85
85: Check Arm SPE trace data recording and synthesized samples      :
--- start ---
test child forked, pid 17083
Recording trace with snapshot mode /tmp/__perf_test.perf.data.MI2iX
Looking at perf.data file for dumping samples:
Looking at perf.data file for reporting samples:
SPE snapshot testing: PASS
test child finished with 0
---- end ----
Check Arm SPE trace data recording and synthesized samples: Ok

BTW, you could see German has another patch set for enabling pid/tid
for Arm SPE tracing [1].  I confirmed that the pid/tid patch set and
current patch set have no conflit, and don't need worry the dependency
between these two patch sets (so you could apply two patch sets in any
ordering).

Thanks,
Leo

[1] https://lore.kernel.org/lkml/20211111072714.GB102075@leoy-ThinkPad-X240s/T/#m932fd26d54278208331d4e3c32597cf63b6d4341
Arnaldo Carvalho de Melo Nov. 11, 2021, 2:54 p.m. UTC | #3
Em Thu, Nov 11, 2021 at 04:46:21PM +0800, Leo Yan escreveu:
> Hi Arnaldo,
> 
> On Tue, Nov 09, 2021 at 04:30:06PM +0000, German Gomez wrote:
> > This patchset adds snapshot mode support for arm-spe.
> > 
> >   - [PATCH 1/3] implements the minimal callbacks to support recording in
> >     snapshot mode.
> >   - [PATCH 2/3] implements the find_snapshot callback in order to handle
> >     wrap-arounds in the AUX buffer.
> >   - [PATCH 3/3] adds a test for spe snapshot mode.
> 
> I have verified this patch set on Hisilicon D06 board, please consider
> to pick up:
> 
> root@ubuntu:/home/leoy/linux/tools/perf# ./perf test -v 85
> 85: Check Arm SPE trace data recording and synthesized samples      :
> --- start ---
> test child forked, pid 17083
> Recording trace with snapshot mode /tmp/__perf_test.perf.data.MI2iX
> Looking at perf.data file for dumping samples:
> Looking at perf.data file for reporting samples:
> SPE snapshot testing: PASS
> test child finished with 0
> ---- end ----
> Check Arm SPE trace data recording and synthesized samples: Ok
> 
> BTW, you could see German has another patch set for enabling pid/tid
> for Arm SPE tracing [1].  I confirmed that the pid/tid patch set and
> current patch set have no conflit, and don't need worry the dependency
> between these two patch sets (so you could apply two patch sets in any
> ordering).

Thanks for the clarifications, applied, its out in my tmp.perf/core
branch, that still needs some fixes for buiding on arm related to a
recent patchset for 'perf test' from Ian Rogers, as soon as that is
fixed it will be set in stone in perf/core.

- Arnaldo