linux-s390.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf test: perf header test fails on s390
@ 2025-06-30  9:16 Thomas Richter
  2025-06-30 15:42 ` Ian Rogers
  2025-07-01 17:55 ` Namhyung Kim
  0 siblings, 2 replies; 5+ messages in thread
From: Thomas Richter @ 2025-06-30  9:16 UTC (permalink / raw)
  To: linux-kernel, linux-s390, linux-perf-users, acme, namhyung,
	irogers
  Cc: agordeev, gor, sumanthk, hca, japo, Thomas Richter

commit 2d584688643fa ("perf test: Add header shell test")
introduced a new test case for perf header. It fails on s390
because call graph option -g is not supported on s390.
Also the option --call-graph dwarf is only supported for
the event cpu-clock.

Remove this option and the test succeeds.

Output after:
 # ./perf test 76
 76: perf header tests                           : Ok

Fixes: 2d584688643fa ("perf test: Add header shell test")
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Acked-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
Cc: Ian Rogers <irogers@google.com>
---
 tools/perf/tests/shell/header.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/tests/shell/header.sh b/tools/perf/tests/shell/header.sh
index 813831cff0bd..412263de6ed7 100755
--- a/tools/perf/tests/shell/header.sh
+++ b/tools/perf/tests/shell/header.sh
@@ -51,7 +51,7 @@ check_header_output() {
 test_file() {
   echo "Test perf header file"
 
-  perf record -o "${perfdata}" -g -- perf test -w noploop
+  perf record -o "${perfdata}" -- perf test -w noploop
   perf report --header-only -I -i "${perfdata}" > "${script_output}"
   check_header_output
 
@@ -61,7 +61,7 @@ test_file() {
 test_pipe() {
   echo "Test perf header pipe"
 
-  perf record -o - -g -- perf test -w noploop | perf report --header-only -I -i - > "${script_output}"
+  perf record -o - -- perf test -w noploop | perf report --header-only -I -i - > "${script_output}"
   check_header_output
 
   echo "Test perf header pipe [Done]"
-- 
2.50.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] perf test: perf header test fails on s390
  2025-06-30  9:16 [PATCH] perf test: perf header test fails on s390 Thomas Richter
@ 2025-06-30 15:42 ` Ian Rogers
  2025-06-30 16:09   ` Namhyung Kim
  2025-07-01 17:55 ` Namhyung Kim
  1 sibling, 1 reply; 5+ messages in thread
From: Ian Rogers @ 2025-06-30 15:42 UTC (permalink / raw)
  To: Thomas Richter
  Cc: linux-kernel, linux-s390, linux-perf-users, acme, namhyung,
	agordeev, gor, sumanthk, hca, japo

On Mon, Jun 30, 2025 at 2:16 AM Thomas Richter <tmricht@linux.ibm.com> wrote:
>
> commit 2d584688643fa ("perf test: Add header shell test")
> introduced a new test case for perf header. It fails on s390
> because call graph option -g is not supported on s390.
> Also the option --call-graph dwarf is only supported for
> the event cpu-clock.
>
> Remove this option and the test succeeds.
>
> Output after:
>  # ./perf test 76
>  76: perf header tests                           : Ok
>
> Fixes: 2d584688643fa ("perf test: Add header shell test")
> Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
> Acked-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
> Cc: Ian Rogers <irogers@google.com>

Thanks Thomas! Given the s390 restriction to require dwarf, should we
switch the default "-g" meaning on s390 to mean use dwarf? James Clark
proposed this previously. It doesn't affect the change here so:

Reviewed-by: Ian Rogers <irogers@google.com>

Thanks,
Ian

> ---
>  tools/perf/tests/shell/header.sh | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/perf/tests/shell/header.sh b/tools/perf/tests/shell/header.sh
> index 813831cff0bd..412263de6ed7 100755
> --- a/tools/perf/tests/shell/header.sh
> +++ b/tools/perf/tests/shell/header.sh
> @@ -51,7 +51,7 @@ check_header_output() {
>  test_file() {
>    echo "Test perf header file"
>
> -  perf record -o "${perfdata}" -g -- perf test -w noploop
> +  perf record -o "${perfdata}" -- perf test -w noploop
>    perf report --header-only -I -i "${perfdata}" > "${script_output}"
>    check_header_output
>
> @@ -61,7 +61,7 @@ test_file() {
>  test_pipe() {
>    echo "Test perf header pipe"
>
> -  perf record -o - -g -- perf test -w noploop | perf report --header-only -I -i - > "${script_output}"
> +  perf record -o - -- perf test -w noploop | perf report --header-only -I -i - > "${script_output}"
>    check_header_output
>
>    echo "Test perf header pipe [Done]"
> --
> 2.50.0
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] perf test: perf header test fails on s390
  2025-06-30 15:42 ` Ian Rogers
@ 2025-06-30 16:09   ` Namhyung Kim
  2025-06-30 16:38     ` Ian Rogers
  0 siblings, 1 reply; 5+ messages in thread
From: Namhyung Kim @ 2025-06-30 16:09 UTC (permalink / raw)
  To: Ian Rogers
  Cc: Thomas Richter, linux-kernel, linux-s390, linux-perf-users, acme,
	agordeev, gor, sumanthk, hca, japo

On Mon, Jun 30, 2025 at 08:42:01AM -0700, Ian Rogers wrote:
> On Mon, Jun 30, 2025 at 2:16 AM Thomas Richter <tmricht@linux.ibm.com> wrote:
> >
> > commit 2d584688643fa ("perf test: Add header shell test")
> > introduced a new test case for perf header. It fails on s390
> > because call graph option -g is not supported on s390.
> > Also the option --call-graph dwarf is only supported for
> > the event cpu-clock.
> >
> > Remove this option and the test succeeds.
> >
> > Output after:
> >  # ./perf test 76
> >  76: perf header tests                           : Ok
> >
> > Fixes: 2d584688643fa ("perf test: Add header shell test")
> > Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
> > Acked-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
> > Cc: Ian Rogers <irogers@google.com>
> 
> Thanks Thomas! Given the s390 restriction to require dwarf, should we
> switch the default "-g" meaning on s390 to mean use dwarf? James Clark
> proposed this previously. It doesn't affect the change here so:
> 
> Reviewed-by: Ian Rogers <irogers@google.com>

Unrelated but I found this test is failing on my machine.

  $ ./perf test -v header
  --- start ---
  test child forked, pid 42799
  Test perf header file
  [ perf record: Woken up 1 times to write data ]
  [ perf record: Captured and wrote 0.182 MB /tmp/__perf_test_header.perf.data.vvFUf (4114 samples) ]
  Test perf header file [Done]
  Test perf header pipe
  Failed to find expect hostname in output
  Failed to find expect os release in output
  Failed to find expect arch in output
  Failed to find expect cpuid in output
  Failed to find expect nrcpus in output
  Failed to find expect event in output
  Failed to find expect cmdline in output
  Failed to find expect perf version in output
  Failed to find expect sibling (cores|dies|threads) in output
  Failed to find expect sibling threads in output
  Failed to find expect total memory in output
  Test perf header pipe [Done]
  ---- end(-1) ----
   83: perf header tests                                               : FAILED!
  
The pipe mode doesn't have the headers.

  $ ./perf record -o- -g -- ./perf test -w noploop | ./perf report -i- -I --header-only
  # ========
  # captured on    : Mon Jun 30 09:02:09 2025
  # header version : 1
  # data offset    : 0
  # data size      : 0
  # feat offset    : 0
  # ========
  #

Thanks,
Namhyung


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] perf test: perf header test fails on s390
  2025-06-30 16:09   ` Namhyung Kim
@ 2025-06-30 16:38     ` Ian Rogers
  0 siblings, 0 replies; 5+ messages in thread
From: Ian Rogers @ 2025-06-30 16:38 UTC (permalink / raw)
  To: Namhyung Kim
  Cc: Thomas Richter, linux-kernel, linux-s390, linux-perf-users, acme,
	agordeev, gor, sumanthk, hca, japo

On Mon, Jun 30, 2025 at 9:09 AM Namhyung Kim <namhyung@kernel.org> wrote:
>
> On Mon, Jun 30, 2025 at 08:42:01AM -0700, Ian Rogers wrote:
> > On Mon, Jun 30, 2025 at 2:16 AM Thomas Richter <tmricht@linux.ibm.com> wrote:
> > >
> > > commit 2d584688643fa ("perf test: Add header shell test")
> > > introduced a new test case for perf header. It fails on s390
> > > because call graph option -g is not supported on s390.
> > > Also the option --call-graph dwarf is only supported for
> > > the event cpu-clock.
> > >
> > > Remove this option and the test succeeds.
> > >
> > > Output after:
> > >  # ./perf test 76
> > >  76: perf header tests                           : Ok
> > >
> > > Fixes: 2d584688643fa ("perf test: Add header shell test")
> > > Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
> > > Acked-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
> > > Cc: Ian Rogers <irogers@google.com>
> >
> > Thanks Thomas! Given the s390 restriction to require dwarf, should we
> > switch the default "-g" meaning on s390 to mean use dwarf? James Clark
> > proposed this previously. It doesn't affect the change here so:
> >
> > Reviewed-by: Ian Rogers <irogers@google.com>
>
> Unrelated but I found this test is failing on my machine.
>
>   $ ./perf test -v header
>   --- start ---
>   test child forked, pid 42799
>   Test perf header file
>   [ perf record: Woken up 1 times to write data ]
>   [ perf record: Captured and wrote 0.182 MB /tmp/__perf_test_header.perf.data.vvFUf (4114 samples) ]
>   Test perf header file [Done]
>   Test perf header pipe
>   Failed to find expect hostname in output
>   Failed to find expect os release in output
>   Failed to find expect arch in output
>   Failed to find expect cpuid in output
>   Failed to find expect nrcpus in output
>   Failed to find expect event in output
>   Failed to find expect cmdline in output
>   Failed to find expect perf version in output
>   Failed to find expect sibling (cores|dies|threads) in output
>   Failed to find expect sibling threads in output
>   Failed to find expect total memory in output
>   Test perf header pipe [Done]
>   ---- end(-1) ----
>    83: perf header tests                                               : FAILED!
>
> The pipe mode doesn't have the headers.
>
>   $ ./perf record -o- -g -- ./perf test -w noploop | ./perf report -i- -I --header-only
>   # ========
>   # captured on    : Mon Jun 30 09:02:09 2025
>   # header version : 1
>   # data offset    : 0
>   # data size      : 0
>   # feat offset    : 0
>   # ========
>   #

Strange, permissions? I see:

```
$ /tmp/perf/perf record -o- -g -- /tmp/perf/perf test -w noploop |
/tmp/perf/perf report -i- -I --header-only
# ========
# captured on    : Mon Jun 30 09:35:21 2025
# header version : 1
# data offset    : 0
# data size      : 0
# feat offset    : 0
# ========
#
# hostname : ...
# os release : ...
# perf version : 6.16.rc3.g8f2bc25ec32d
# arch : x86_64
etc.
```

Thanks,
Ian

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] perf test: perf header test fails on s390
  2025-06-30  9:16 [PATCH] perf test: perf header test fails on s390 Thomas Richter
  2025-06-30 15:42 ` Ian Rogers
@ 2025-07-01 17:55 ` Namhyung Kim
  1 sibling, 0 replies; 5+ messages in thread
From: Namhyung Kim @ 2025-07-01 17:55 UTC (permalink / raw)
  To: linux-kernel, linux-s390, linux-perf-users, acme, irogers,
	Thomas Richter
  Cc: agordeev, gor, sumanthk, hca, japo

On Mon, 30 Jun 2025 11:16:13 +0200, Thomas Richter wrote:
> commit 2d584688643fa ("perf test: Add header shell test")
> introduced a new test case for perf header. It fails on s390
> because call graph option -g is not supported on s390.
> Also the option --call-graph dwarf is only supported for
> the event cpu-clock.
> 
> Remove this option and the test succeeds.
> 
> [...]
Applied to perf-tools-next, thanks!

Best regards,
Namhyung



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-07-01 17:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-30  9:16 [PATCH] perf test: perf header test fails on s390 Thomas Richter
2025-06-30 15:42 ` Ian Rogers
2025-06-30 16:09   ` Namhyung Kim
2025-06-30 16:38     ` Ian Rogers
2025-07-01 17:55 ` Namhyung Kim

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).