linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf test: Add cgroup summary test case for perf trace
@ 2025-05-22 14:25 Namhyung Kim
  2025-05-22 15:33 ` Howard Chu
  0 siblings, 1 reply; 9+ messages in thread
From: Namhyung Kim @ 2025-05-22 14:25 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Ian Rogers, Kan Liang
  Cc: Jiri Olsa, Adrian Hunter, Peter Zijlstra, Ingo Molnar, LKML,
	linux-perf-users, Howard Chu

  $ sudo ./perf test -vv 112
  112: perf trace summary:
  --- start ---
  test child forked, pid 1018940
  testing: perf trace -s -- true
  testing: perf trace -S -- true
  testing: perf trace -s --summary-mode=thread -- true
  testing: perf trace -S --summary-mode=total -- true
  testing: perf trace -as --summary-mode=thread --no-bpf-summary -- true
  testing: perf trace -as --summary-mode=total --no-bpf-summary -- true
  testing: perf trace -as --summary-mode=thread --bpf-summary -- true
  testing: perf trace -as --summary-mode=total --bpf-summary -- true
  testing: perf trace -aS --summary-mode=total --bpf-summary -- true
  testing: perf trace -as --summary-mode=cgroup --bpf-summary -- true
  testing: perf trace -aS --summary-mode=cgroup --bpf-summary -- true
  ---- end(0) ----
  112: perf trace summary                                              : Ok

Cc: Howard Chu <howardchu95@gmail.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
 tools/perf/tests/shell/trace_summary.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tools/perf/tests/shell/trace_summary.sh b/tools/perf/tests/shell/trace_summary.sh
index 4d98cb212dd9de0b..bb350dfabdc2bf5e 100755
--- a/tools/perf/tests/shell/trace_summary.sh
+++ b/tools/perf/tests/shell/trace_summary.sh
@@ -62,4 +62,10 @@ test_perf_trace "-as --summary-mode=total --bpf-summary"
 # summary with normal output for system wide - total summary mode with BPF
 test_perf_trace "-aS --summary-mode=total --bpf-summary"
 
+# summary only for system wide - cgroup summary mode with BPF
+test_perf_trace "-as --summary-mode=cgroup --bpf-summary"
+
+# summary with normal output for system wide - cgroup summary mode with BPF
+test_perf_trace "-aS --summary-mode=cgroup --bpf-summary"
+
 rm -f ${OUTPUT}
-- 
2.49.0.1164.gab81da1b16-goog


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

* Re: [PATCH] perf test: Add cgroup summary test case for perf trace
  2025-05-22 14:25 [PATCH] perf test: Add cgroup summary test case for perf trace Namhyung Kim
@ 2025-05-22 15:33 ` Howard Chu
  2025-05-22 16:49   ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 9+ messages in thread
From: Howard Chu @ 2025-05-22 15:33 UTC (permalink / raw)
  To: Namhyung Kim
  Cc: Arnaldo Carvalho de Melo, Ian Rogers, Kan Liang, Jiri Olsa,
	Adrian Hunter, Peter Zijlstra, Ingo Molnar, LKML,
	linux-perf-users

Hello Namhyung,

$ sudo /tmp/perf/perf test -vv 112
112: perf trace summary:
112: perf trace summary
--- start ---
test child forked, pid 1574993
testing: perf trace -s -- true
testing: perf trace -S -- true
testing: perf trace -s --summary-mode=thread -- true
testing: perf trace -S --summary-mode=total -- true
testing: perf trace -as --summary-mode=thread --no-bpf-summary -- true
testing: perf trace -as --summary-mode=total --no-bpf-summary -- true
testing: perf trace -as --summary-mode=thread --bpf-summary -- true
testing: perf trace -as --summary-mode=total --bpf-summary -- true
testing: perf trace -aS --summary-mode=total --bpf-summary -- true
testing: perf trace -as --summary-mode=cgroup --bpf-summary -- true
testing: perf trace -aS --summary-mode=cgroup --bpf-summary -- true
---- end(0) ----
112: perf trace summary                                              : Ok


On Thu, May 22, 2025 at 7:25 AM Namhyung Kim <namhyung@kernel.org> wrote:
>
>   $ sudo ./perf test -vv 112
>   112: perf trace summary:
>   --- start ---
>   test child forked, pid 1018940
>   testing: perf trace -s -- true
>   testing: perf trace -S -- true
>   testing: perf trace -s --summary-mode=thread -- true
>   testing: perf trace -S --summary-mode=total -- true
>   testing: perf trace -as --summary-mode=thread --no-bpf-summary -- true
>   testing: perf trace -as --summary-mode=total --no-bpf-summary -- true
>   testing: perf trace -as --summary-mode=thread --bpf-summary -- true
>   testing: perf trace -as --summary-mode=total --bpf-summary -- true
>   testing: perf trace -aS --summary-mode=total --bpf-summary -- true
>   testing: perf trace -as --summary-mode=cgroup --bpf-summary -- true
>   testing: perf trace -aS --summary-mode=cgroup --bpf-summary -- true
>   ---- end(0) ----
>   112: perf trace summary                                              : Ok
>
> Cc: Howard Chu <howardchu95@gmail.com>
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>

Reviewed-by: Howard Chu <howardchu95@gmail.com>

Thanks,
Howard

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

* Re: [PATCH] perf test: Add cgroup summary test case for perf trace
  2025-05-22 15:33 ` Howard Chu
@ 2025-05-22 16:49   ` Arnaldo Carvalho de Melo
  2025-05-22 22:11     ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 9+ messages in thread
From: Arnaldo Carvalho de Melo @ 2025-05-22 16:49 UTC (permalink / raw)
  To: Howard Chu
  Cc: Namhyung Kim, Ian Rogers, Kan Liang, Jiri Olsa, Adrian Hunter,
	Peter Zijlstra, Ingo Molnar, LKML, linux-perf-users

On Thu, May 22, 2025 at 08:33:16AM -0700, Howard Chu wrote:
> Hello Namhyung,
> 
> $ sudo /tmp/perf/perf test -vv 112
> 112: perf trace summary:
> 112: perf trace summary
> --- start ---
> test child forked, pid 1574993
> testing: perf trace -s -- true
> testing: perf trace -S -- true
> testing: perf trace -s --summary-mode=thread -- true
> testing: perf trace -S --summary-mode=total -- true
> testing: perf trace -as --summary-mode=thread --no-bpf-summary -- true
> testing: perf trace -as --summary-mode=total --no-bpf-summary -- true
> testing: perf trace -as --summary-mode=thread --bpf-summary -- true
> testing: perf trace -as --summary-mode=total --bpf-summary -- true
> testing: perf trace -aS --summary-mode=total --bpf-summary -- true
> testing: perf trace -as --summary-mode=cgroup --bpf-summary -- true
> testing: perf trace -aS --summary-mode=cgroup --bpf-summary -- true
> ---- end(0) ----
> 112: perf trace summary                                              : Ok

Thanks, tested and applied to perf-tools-next,

- Arnaldo
 
> 
> On Thu, May 22, 2025 at 7:25 AM Namhyung Kim <namhyung@kernel.org> wrote:
> >
> >   $ sudo ./perf test -vv 112
> >   112: perf trace summary:
> >   --- start ---
> >   test child forked, pid 1018940
> >   testing: perf trace -s -- true
> >   testing: perf trace -S -- true
> >   testing: perf trace -s --summary-mode=thread -- true
> >   testing: perf trace -S --summary-mode=total -- true
> >   testing: perf trace -as --summary-mode=thread --no-bpf-summary -- true
> >   testing: perf trace -as --summary-mode=total --no-bpf-summary -- true
> >   testing: perf trace -as --summary-mode=thread --bpf-summary -- true
> >   testing: perf trace -as --summary-mode=total --bpf-summary -- true
> >   testing: perf trace -aS --summary-mode=total --bpf-summary -- true
> >   testing: perf trace -as --summary-mode=cgroup --bpf-summary -- true
> >   testing: perf trace -aS --summary-mode=cgroup --bpf-summary -- true
> >   ---- end(0) ----
> >   112: perf trace summary                                              : Ok
> >
> > Cc: Howard Chu <howardchu95@gmail.com>
> > Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> 
> Reviewed-by: Howard Chu <howardchu95@gmail.com>
> 
> Thanks,
> Howard

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

* Re: [PATCH] perf test: Add cgroup summary test case for perf trace
  2025-05-22 16:49   ` Arnaldo Carvalho de Melo
@ 2025-05-22 22:11     ` Arnaldo Carvalho de Melo
  2025-05-23  0:48       ` Howard Chu
  2025-05-23 22:12       ` Namhyung Kim
  0 siblings, 2 replies; 9+ messages in thread
From: Arnaldo Carvalho de Melo @ 2025-05-22 22:11 UTC (permalink / raw)
  To: Namhyung Kim, Howard Chu
  Cc: Ian Rogers, Kan Liang, Jiri Olsa, Adrian Hunter, Peter Zijlstra,
	Ingo Molnar, LKML, linux-perf-users

On Thu, May 22, 2025 at 01:49:37PM -0300, Arnaldo Carvalho de Melo wrote:
> On Thu, May 22, 2025 at 08:33:16AM -0700, Howard Chu wrote:
> > $ sudo /tmp/perf/perf test -vv 112
> > 112: perf trace summary:
> > 112: perf trace summary
> > --- start ---
> > test child forked, pid 1574993
> > testing: perf trace -s -- true
> > testing: perf trace -S -- true
> > testing: perf trace -s --summary-mode=thread -- true
> > testing: perf trace -S --summary-mode=total -- true
> > testing: perf trace -as --summary-mode=thread --no-bpf-summary -- true
> > testing: perf trace -as --summary-mode=total --no-bpf-summary -- true
> > testing: perf trace -as --summary-mode=thread --bpf-summary -- true
> > testing: perf trace -as --summary-mode=total --bpf-summary -- true
> > testing: perf trace -aS --summary-mode=total --bpf-summary -- true
> > testing: perf trace -as --summary-mode=cgroup --bpf-summary -- true
> > testing: perf trace -aS --summary-mode=cgroup --bpf-summary -- true
> > ---- end(0) ----
> > 112: perf trace summary                                              : Ok
 
> Thanks, tested and applied to perf-tools-next,

But then when running all the tests, since this does system wide
tracing, it fails:

112: perf trace summary                                              : FAILED!

It works with the following patch applied, please check and ack/review:

From 8c868979d886e2e88aa89f4e3d884e1b6450a7b2 Mon Sep 17 00:00:00 2001
From: Arnaldo Carvalho de Melo <acme@redhat.com>
Date: Thu, 22 May 2025 19:01:47 -0300
Subject: [PATCH 1/1] perf tests trace_summary.sh: Run in exclusive mode

And it is being successfull only when running alone, probably because
there are some tests that add the vfs_getname probe that gets used by
'perf trace' and alter how it does syscall arg pathname resolution.

This should be removed or made a fallback to the preferred BPF mode of
getting syscall parameters, but till then, run this in exclusive mode.

For reference, here are some of the tests that run close to this one:

  127: perf record offcpu profiling tests                              : Ok
  128: perf all PMU test                                               : Ok
  129: perf stat --bpf-counters test                                   : Ok
  130: Check Arm CoreSight trace data recording and synthesized samples: Skip
  131: Check Arm CoreSight disassembly script completes without errors : Skip
  132: Check Arm SPE trace data recording and synthesized samples      : Skip
  133: Test data symbol                                                : Ok
  134: Miscellaneous Intel PT testing                                  : Skip
  135: test Intel TPEBS counting mode                                  : Skip
  136: perf script task-analyzer tests                                 : Ok
  137: Check open filename arg using perf trace + vfs_getname          : Ok
  138: perf trace summary                                              : Ok

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Howard Chu <howardchu95@gmail.com>
Cc: Ian Rogers <irogers@google.com>
Cc: James Clark <james.clark@linaro.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/tests/shell/trace_summary.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/tests/shell/trace_summary.sh b/tools/perf/tests/shell/trace_summary.sh
index bb350dfabdc2bf5e..49766524dc21b534 100755
--- a/tools/perf/tests/shell/trace_summary.sh
+++ b/tools/perf/tests/shell/trace_summary.sh
@@ -1,5 +1,5 @@
 #!/bin/sh
-# perf trace summary
+# perf trace summary (exclusive)
 # SPDX-License-Identifier: GPL-2.0
 
 # Check that perf trace works with various summary mode
-- 
2.49.0


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

* Re: [PATCH] perf test: Add cgroup summary test case for perf trace
  2025-05-22 22:11     ` Arnaldo Carvalho de Melo
@ 2025-05-23  0:48       ` Howard Chu
  2025-05-23 22:12       ` Namhyung Kim
  1 sibling, 0 replies; 9+ messages in thread
From: Howard Chu @ 2025-05-23  0:48 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Namhyung Kim, Ian Rogers, Kan Liang, Jiri Olsa, Adrian Hunter,
	Peter Zijlstra, Ingo Molnar, LKML, linux-perf-users

Hello Arnaldo,

On Thu, May 22, 2025 at 3:11 PM Arnaldo Carvalho de Melo
<acme@kernel.org> wrote:
>
> On Thu, May 22, 2025 at 01:49:37PM -0300, Arnaldo Carvalho de Melo wrote:
> > On Thu, May 22, 2025 at 08:33:16AM -0700, Howard Chu wrote:
> > > $ sudo /tmp/perf/perf test -vv 112
> > > 112: perf trace summary:
> > > 112: perf trace summary
> > > --- start ---
> > > test child forked, pid 1574993
> > > testing: perf trace -s -- true
> > > testing: perf trace -S -- true
> > > testing: perf trace -s --summary-mode=thread -- true
> > > testing: perf trace -S --summary-mode=total -- true
> > > testing: perf trace -as --summary-mode=thread --no-bpf-summary -- true
> > > testing: perf trace -as --summary-mode=total --no-bpf-summary -- true
> > > testing: perf trace -as --summary-mode=thread --bpf-summary -- true
> > > testing: perf trace -as --summary-mode=total --bpf-summary -- true
> > > testing: perf trace -aS --summary-mode=total --bpf-summary -- true
> > > testing: perf trace -as --summary-mode=cgroup --bpf-summary -- true
> > > testing: perf trace -aS --summary-mode=cgroup --bpf-summary -- true
> > > ---- end(0) ----
> > > 112: perf trace summary                                              : Ok
>
> > Thanks, tested and applied to perf-tools-next,
>
> But then when running all the tests, since this does system wide
> tracing, it fails:
>
> 112: perf trace summary                                              : FAILED!

Yeah I've been trying to diagnose the parallel problem for days... I
just can't find documentation about why 'returning 1' (in
syscall_unaugmented) can emit a sample in
tp/raw_syscalls/sys_(exit|enter)...

Thanks,
Howard

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

* Re: [PATCH] perf test: Add cgroup summary test case for perf trace
  2025-05-22 22:11     ` Arnaldo Carvalho de Melo
  2025-05-23  0:48       ` Howard Chu
@ 2025-05-23 22:12       ` Namhyung Kim
  2025-05-29  6:59         ` Howard Chu
  1 sibling, 1 reply; 9+ messages in thread
From: Namhyung Kim @ 2025-05-23 22:12 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Howard Chu, Ian Rogers, Kan Liang, Jiri Olsa, Adrian Hunter,
	Peter Zijlstra, Ingo Molnar, LKML, linux-perf-users

On Thu, May 22, 2025 at 07:11:41PM -0300, Arnaldo Carvalho de Melo wrote:
> On Thu, May 22, 2025 at 01:49:37PM -0300, Arnaldo Carvalho de Melo wrote:
> > On Thu, May 22, 2025 at 08:33:16AM -0700, Howard Chu wrote:
> > > $ sudo /tmp/perf/perf test -vv 112
> > > 112: perf trace summary:
> > > 112: perf trace summary
> > > --- start ---
> > > test child forked, pid 1574993
> > > testing: perf trace -s -- true
> > > testing: perf trace -S -- true
> > > testing: perf trace -s --summary-mode=thread -- true
> > > testing: perf trace -S --summary-mode=total -- true
> > > testing: perf trace -as --summary-mode=thread --no-bpf-summary -- true
> > > testing: perf trace -as --summary-mode=total --no-bpf-summary -- true
> > > testing: perf trace -as --summary-mode=thread --bpf-summary -- true
> > > testing: perf trace -as --summary-mode=total --bpf-summary -- true
> > > testing: perf trace -aS --summary-mode=total --bpf-summary -- true
> > > testing: perf trace -as --summary-mode=cgroup --bpf-summary -- true
> > > testing: perf trace -aS --summary-mode=cgroup --bpf-summary -- true
> > > ---- end(0) ----
> > > 112: perf trace summary                                              : Ok
>  
> > Thanks, tested and applied to perf-tools-next,
> 
> But then when running all the tests, since this does system wide
> tracing, it fails:
> 
> 112: perf trace summary                                              : FAILED!
> 
> It works with the following patch applied, please check and ack/review:
> 
> From 8c868979d886e2e88aa89f4e3d884e1b6450a7b2 Mon Sep 17 00:00:00 2001
> From: Arnaldo Carvalho de Melo <acme@redhat.com>
> Date: Thu, 22 May 2025 19:01:47 -0300
> Subject: [PATCH 1/1] perf tests trace_summary.sh: Run in exclusive mode
> 
> And it is being successfull only when running alone, probably because
> there are some tests that add the vfs_getname probe that gets used by
> 'perf trace' and alter how it does syscall arg pathname resolution.
> 
> This should be removed or made a fallback to the preferred BPF mode of
> getting syscall parameters, but till then, run this in exclusive mode.
> 
> For reference, here are some of the tests that run close to this one:
> 
>   127: perf record offcpu profiling tests                              : Ok
>   128: perf all PMU test                                               : Ok
>   129: perf stat --bpf-counters test                                   : Ok
>   130: Check Arm CoreSight trace data recording and synthesized samples: Skip
>   131: Check Arm CoreSight disassembly script completes without errors : Skip
>   132: Check Arm SPE trace data recording and synthesized samples      : Skip
>   133: Test data symbol                                                : Ok
>   134: Miscellaneous Intel PT testing                                  : Skip
>   135: test Intel TPEBS counting mode                                  : Skip
>   136: perf script task-analyzer tests                                 : Ok
>   137: Check open filename arg using perf trace + vfs_getname          : Ok
>   138: perf trace summary                                              : Ok
> 
> Cc: Adrian Hunter <adrian.hunter@intel.com>
> Cc: Howard Chu <howardchu95@gmail.com>
> Cc: Ian Rogers <irogers@google.com>
> Cc: James Clark <james.clark@linaro.org>
> Cc: Jiri Olsa <jolsa@kernel.org>
> Cc: Kan Liang <kan.liang@linux.intel.com>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

Looks good to me.

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

Thanks,
Namhyung

> ---
>  tools/perf/tests/shell/trace_summary.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/tests/shell/trace_summary.sh b/tools/perf/tests/shell/trace_summary.sh
> index bb350dfabdc2bf5e..49766524dc21b534 100755
> --- a/tools/perf/tests/shell/trace_summary.sh
> +++ b/tools/perf/tests/shell/trace_summary.sh
> @@ -1,5 +1,5 @@
>  #!/bin/sh
> -# perf trace summary
> +# perf trace summary (exclusive)
>  # SPDX-License-Identifier: GPL-2.0
>  
>  # Check that perf trace works with various summary mode
> -- 
> 2.49.0
> 

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

* Re: [PATCH] perf test: Add cgroup summary test case for perf trace
  2025-05-23 22:12       ` Namhyung Kim
@ 2025-05-29  6:59         ` Howard Chu
  2025-05-29 20:46           ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 9+ messages in thread
From: Howard Chu @ 2025-05-29  6:59 UTC (permalink / raw)
  To: Namhyung Kim
  Cc: Arnaldo Carvalho de Melo, Ian Rogers, Kan Liang, Jiri Olsa,
	Adrian Hunter, Peter Zijlstra, Ingo Molnar, LKML,
	linux-perf-users

Hello Arnaldo and Namhyung,

On Fri, May 23, 2025 at 3:12 PM Namhyung Kim <namhyung@kernel.org> wrote:
>
> On Thu, May 22, 2025 at 07:11:41PM -0300, Arnaldo Carvalho de Melo wrote:
> > On Thu, May 22, 2025 at 01:49:37PM -0300, Arnaldo Carvalho de Melo wrote:
> > > On Thu, May 22, 2025 at 08:33:16AM -0700, Howard Chu wrote:
> > > > $ sudo /tmp/perf/perf test -vv 112
> > > > 112: perf trace summary:
> > > > 112: perf trace summary
> > > > --- start ---
> > > > test child forked, pid 1574993
> > > > testing: perf trace -s -- true
> > > > testing: perf trace -S -- true
> > > > testing: perf trace -s --summary-mode=thread -- true
> > > > testing: perf trace -S --summary-mode=total -- true
> > > > testing: perf trace -as --summary-mode=thread --no-bpf-summary -- true
> > > > testing: perf trace -as --summary-mode=total --no-bpf-summary -- true
> > > > testing: perf trace -as --summary-mode=thread --bpf-summary -- true
> > > > testing: perf trace -as --summary-mode=total --bpf-summary -- true
> > > > testing: perf trace -aS --summary-mode=total --bpf-summary -- true
> > > > testing: perf trace -as --summary-mode=cgroup --bpf-summary -- true
> > > > testing: perf trace -aS --summary-mode=cgroup --bpf-summary -- true
> > > > ---- end(0) ----
> > > > 112: perf trace summary                                              : Ok
> >
> > > Thanks, tested and applied to perf-tools-next,
> >
> > But then when running all the tests, since this does system wide
> > tracing, it fails:
> >
> > 112: perf trace summary                                              : FAILED!
> >
> > It works with the following patch applied, please check and ack/review:
> >
> > From 8c868979d886e2e88aa89f4e3d884e1b6450a7b2 Mon Sep 17 00:00:00 2001
> > From: Arnaldo Carvalho de Melo <acme@redhat.com>
> > Date: Thu, 22 May 2025 19:01:47 -0300
> > Subject: [PATCH 1/1] perf tests trace_summary.sh: Run in exclusive mode
> >
> > And it is being successfull only when running alone, probably because
> > there are some tests that add the vfs_getname probe that gets used by
> > 'perf trace' and alter how it does syscall arg pathname resolution.
> >
> > This should be removed or made a fallback to the preferred BPF mode of
> > getting syscall parameters, but till then, run this in exclusive mode.
> >
> > For reference, here are some of the tests that run close to this one:
> >
> >   127: perf record offcpu profiling tests                              : Ok
> >   128: perf all PMU test                                               : Ok
> >   129: perf stat --bpf-counters test                                   : Ok
> >   130: Check Arm CoreSight trace data recording and synthesized samples: Skip
> >   131: Check Arm CoreSight disassembly script completes without errors : Skip
> >   132: Check Arm SPE trace data recording and synthesized samples      : Skip
> >   133: Test data symbol                                                : Ok
> >   134: Miscellaneous Intel PT testing                                  : Skip
> >   135: test Intel TPEBS counting mode                                  : Skip
> >   136: perf script task-analyzer tests                                 : Ok
> >   137: Check open filename arg using perf trace + vfs_getname          : Ok
> >   138: perf trace summary                                              : Ok
> >
> > Cc: Adrian Hunter <adrian.hunter@intel.com>
> > Cc: Howard Chu <howardchu95@gmail.com>
> > Cc: Ian Rogers <irogers@google.com>
> > Cc: James Clark <james.clark@linaro.org>
> > Cc: Jiri Olsa <jolsa@kernel.org>
> > Cc: Kan Liang <kan.liang@linux.intel.com>
> > Cc: Namhyung Kim <namhyung@kernel.org>
> > Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
>
> Looks good to me.
>
> Acked-by: Namhyung Kim <namhyung@kernel.org>

Nacked (sorry). I think running them tests in parallel is great
because it points out a problem that perf trace has. Please check out
this approach: https://lore.kernel.org/linux-perf-users/20250529065537.529937-1-howardchu95@gmail.com/T/#u

Thanks,
Howard

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

* Re: [PATCH] perf test: Add cgroup summary test case for perf trace
  2025-05-29  6:59         ` Howard Chu
@ 2025-05-29 20:46           ` Arnaldo Carvalho de Melo
  2025-05-30 17:12             ` Howard Chu
  0 siblings, 1 reply; 9+ messages in thread
From: Arnaldo Carvalho de Melo @ 2025-05-29 20:46 UTC (permalink / raw)
  To: Howard Chu
  Cc: Namhyung Kim, Ian Rogers, Kan Liang, Jiri Olsa, Adrian Hunter,
	Peter Zijlstra, Ingo Molnar, LKML, linux-perf-users

On Wed, May 28, 2025 at 11:59:44PM -0700, Howard Chu wrote:
> On Fri, May 23, 2025 at 3:12 PM Namhyung Kim <namhyung@kernel.org> wrote:
> > On Thu, May 22, 2025 at 07:11:41PM -0300, Arnaldo Carvalho de Melo wrote:
> > > From 8c868979d886e2e88aa89f4e3d884e1b6450a7b2 Mon Sep 17 00:00:00 2001
> > > From: Arnaldo Carvalho de Melo <acme@redhat.com>
> > > Date: Thu, 22 May 2025 19:01:47 -0300
> > > Subject: [PATCH 1/1] perf tests trace_summary.sh: Run in exclusive mode

> > > And it is being successfull only when running alone, probably because
> > > there are some tests that add the vfs_getname probe that gets used by
> > > 'perf trace' and alter how it does syscall arg pathname resolution.

> > > This should be removed or made a fallback to the preferred BPF mode of
> > > getting syscall parameters, but till then, run this in exclusive mode.

> > > For reference, here are some of the tests that run close to this one:

> > >   127: perf record offcpu profiling tests                              : Ok
> > >   128: perf all PMU test                                               : Ok
> > >   129: perf stat --bpf-counters test                                   : Ok
> > >   130: Check Arm CoreSight trace data recording and synthesized samples: Skip
> > >   131: Check Arm CoreSight disassembly script completes without errors : Skip
> > >   132: Check Arm SPE trace data recording and synthesized samples      : Skip
> > >   133: Test data symbol                                                : Ok
> > >   134: Miscellaneous Intel PT testing                                  : Skip
> > >   135: test Intel TPEBS counting mode                                  : Skip
> > >   136: perf script task-analyzer tests                                 : Ok
> > >   137: Check open filename arg using perf trace + vfs_getname          : Ok
> > >   138: perf trace summary                                              : Ok

> > Looks good to me.

> > Acked-by: Namhyung Kim <namhyung@kernel.org>
 
> Nacked (sorry). I think running them tests in parallel is great
> because it points out a problem that perf trace has. Please check out
> this approach: https://lore.kernel.org/linux-perf-users/20250529065537.529937-1-howardchu95@gmail.com/T/#u

I'm not saying that perf trace shouldn't be used in parallel, but the
vfs_getname code, IIRC, checks for the existence of that probe to do
pathname collection (this predates the BPF method by a long time) and
then counts on it to do.

There are tests that put it in place and then at the end remove it,
multiple tests.

So there are possible races with that and out of being conservative I
made it exclusive for the time being.

The plan is to remove that vfs_getname code in builtin-trace.c and then
the tests, as we have the BPF method that is way better and should allow
for parallel use.

Probably in the meantime it would be better to mark the vfs_getname ones
as exclusive tho now that I that I wrote the above explanation... :-\

- Arnaldo

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

* Re: [PATCH] perf test: Add cgroup summary test case for perf trace
  2025-05-29 20:46           ` Arnaldo Carvalho de Melo
@ 2025-05-30 17:12             ` Howard Chu
  0 siblings, 0 replies; 9+ messages in thread
From: Howard Chu @ 2025-05-30 17:12 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Namhyung Kim, Ian Rogers, Kan Liang, Jiri Olsa, Adrian Hunter,
	Peter Zijlstra, Ingo Molnar, LKML, linux-perf-users

Hello Arnaldo,

On Thu, May 29, 2025 at 1:46 PM Arnaldo Carvalho de Melo
<acme@kernel.org> wrote:
>
> On Wed, May 28, 2025 at 11:59:44PM -0700, Howard Chu wrote:
> > On Fri, May 23, 2025 at 3:12 PM Namhyung Kim <namhyung@kernel.org> wrote:
> > > On Thu, May 22, 2025 at 07:11:41PM -0300, Arnaldo Carvalho de Melo wrote:
> > > > From 8c868979d886e2e88aa89f4e3d884e1b6450a7b2 Mon Sep 17 00:00:00 2001
> > > > From: Arnaldo Carvalho de Melo <acme@redhat.com>
> > > > Date: Thu, 22 May 2025 19:01:47 -0300
> > > > Subject: [PATCH 1/1] perf tests trace_summary.sh: Run in exclusive mode
>
> > > > And it is being successfull only when running alone, probably because
> > > > there are some tests that add the vfs_getname probe that gets used by
> > > > 'perf trace' and alter how it does syscall arg pathname resolution.
>
> > > > This should be removed or made a fallback to the preferred BPF mode of
> > > > getting syscall parameters, but till then, run this in exclusive mode.
>
> > > > For reference, here are some of the tests that run close to this one:
>
> > > >   127: perf record offcpu profiling tests                              : Ok
> > > >   128: perf all PMU test                                               : Ok
> > > >   129: perf stat --bpf-counters test                                   : Ok
> > > >   130: Check Arm CoreSight trace data recording and synthesized samples: Skip
> > > >   131: Check Arm CoreSight disassembly script completes without errors : Skip
> > > >   132: Check Arm SPE trace data recording and synthesized samples      : Skip
> > > >   133: Test data symbol                                                : Ok
> > > >   134: Miscellaneous Intel PT testing                                  : Skip
> > > >   135: test Intel TPEBS counting mode                                  : Skip
> > > >   136: perf script task-analyzer tests                                 : Ok
> > > >   137: Check open filename arg using perf trace + vfs_getname          : Ok
> > > >   138: perf trace summary                                              : Ok
>
> > > Looks good to me.
>
> > > Acked-by: Namhyung Kim <namhyung@kernel.org>
>
> > Nacked (sorry). I think running them tests in parallel is great
> > because it points out a problem that perf trace has. Please check out
> > this approach: https://lore.kernel.org/linux-perf-users/20250529065537.529937-1-howardchu95@gmail.com/T/#u
>
> I'm not saying that perf trace shouldn't be used in parallel, but the
> vfs_getname code, IIRC, checks for the existence of that probe to do
> pathname collection (this predates the BPF method by a long time) and
> then counts on it to do.
>
> There are tests that put it in place and then at the end remove it,
> multiple tests.
>
> So there are possible races with that and out of being conservative I
> made it exclusive for the time being.

Thanks for explaining this.

>
> The plan is to remove that vfs_getname code in builtin-trace.c and then
> the tests, as we have the BPF method that is way better and should allow
> for parallel use.

Agreed.

>
> Probably in the meantime it would be better to mark the vfs_getname ones
> as exclusive tho now that I that I wrote the above explanation... :-\
>
> - Arnaldo

:)

Thanks,
Howard

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

end of thread, other threads:[~2025-05-30 17:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-22 14:25 [PATCH] perf test: Add cgroup summary test case for perf trace Namhyung Kim
2025-05-22 15:33 ` Howard Chu
2025-05-22 16:49   ` Arnaldo Carvalho de Melo
2025-05-22 22:11     ` Arnaldo Carvalho de Melo
2025-05-23  0:48       ` Howard Chu
2025-05-23 22:12       ` Namhyung Kim
2025-05-29  6:59         ` Howard Chu
2025-05-29 20:46           ` Arnaldo Carvalho de Melo
2025-05-30 17:12             ` Howard Chu

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