linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf/test: reduce run time of perf test Test java symbol
@ 2023-05-09 13:18 Thomas Richter
  2023-05-09 17:34 ` Ian Rogers
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Richter @ 2023-05-09 13:18 UTC (permalink / raw)
  To: linux-kernel, linux-perf-users, acme, leo.yan, irogers
  Cc: svens, gor, sumanthk, hca, Thomas Richter

Test case Test java symbol might run a long time. On Fedora 38 the
run time is very, very long:

 Output before:
 # time ./perf test 108
 108: Test java symbol                  : Ok
 real   22m15.775s
 user   3m42.584s
 sys    4m30.685s
 #

The reason is a lookup for the server for debug symbols as shown in
 # cat /etc/debuginfod/elfutils.urls
 https://debuginfod.fedoraproject.org/
 #
This lookup is done for every symbol/sample, so about 3500 lookups
will take place.
To omit this lookup, which is not needed, unset environment variable
DEBUGINFOD_URLS=''.

 Output after:
 # time ./perf test 108
 108: Test java symbol                  : Ok

 real	0m6.242s
 user	0m4.982s
 sys	0m3.243s
 #

Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Cc: leo.yan@linaro.org
Cc: irogers@google.com
---
 tools/perf/tests/shell/test_java_symbol.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/tests/shell/test_java_symbol.sh b/tools/perf/tests/shell/test_java_symbol.sh
index 90cea8811926..499539d1c479 100755
--- a/tools/perf/tests/shell/test_java_symbol.sh
+++ b/tools/perf/tests/shell/test_java_symbol.sh
@@ -56,7 +56,7 @@ if [ $? -ne 0 ]; then
 	exit 1
 fi
 
-if ! perf inject -i $PERF_DATA -o $PERF_INJ_DATA -j; then
+if ! DEBUGINFOD_URLS='' perf inject -i $PERF_DATA -o $PERF_INJ_DATA -j; then
 	echo "Fail to inject samples"
 	exit 1
 fi
-- 
2.40.0


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

* Re: [PATCH] perf/test: reduce run time of perf test Test java symbol
  2023-05-09 13:18 [PATCH] perf/test: reduce run time of perf test Test java symbol Thomas Richter
@ 2023-05-09 17:34 ` Ian Rogers
  2023-05-09 18:10   ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 4+ messages in thread
From: Ian Rogers @ 2023-05-09 17:34 UTC (permalink / raw)
  To: Thomas Richter, jolsa
  Cc: linux-kernel, linux-perf-users, acme, leo.yan, svens, gor,
	sumanthk, hca

On Tue, May 9, 2023 at 6:19 AM Thomas Richter <tmricht@linux.ibm.com> wrote:
>
> Test case Test java symbol might run a long time. On Fedora 38 the
> run time is very, very long:
>
>  Output before:
>  # time ./perf test 108
>  108: Test java symbol                  : Ok
>  real   22m15.775s
>  user   3m42.584s
>  sys    4m30.685s
>  #
>
> The reason is a lookup for the server for debug symbols as shown in
>  # cat /etc/debuginfod/elfutils.urls
>  https://debuginfod.fedoraproject.org/
>  #
> This lookup is done for every symbol/sample, so about 3500 lookups
> will take place.
> To omit this lookup, which is not needed, unset environment variable
> DEBUGINFOD_URLS=''.
>
>  Output after:
>  # time ./perf test 108
>  108: Test java symbol                  : Ok
>
>  real   0m6.242s
>  user   0m4.982s
>  sys    0m3.243s
>  #
>
> Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
> Cc: leo.yan@linaro.org
> Cc: irogers@google.com
> ---
>  tools/perf/tests/shell/test_java_symbol.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/tests/shell/test_java_symbol.sh b/tools/perf/tests/shell/test_java_symbol.sh
> index 90cea8811926..499539d1c479 100755
> --- a/tools/perf/tests/shell/test_java_symbol.sh
> +++ b/tools/perf/tests/shell/test_java_symbol.sh
> @@ -56,7 +56,7 @@ if [ $? -ne 0 ]; then
>         exit 1
>  fi
>
> -if ! perf inject -i $PERF_DATA -o $PERF_INJ_DATA -j; then
> +if ! DEBUGINFOD_URLS='' perf inject -i $PERF_DATA -o $PERF_INJ_DATA -j; then

Jiri, is this the best way to workaround a debuginfod slowness?

Thanks,
Ian

>         echo "Fail to inject samples"
>         exit 1
>  fi
> --
> 2.40.0
>

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

* Re: [PATCH] perf/test: reduce run time of perf test Test java symbol
  2023-05-09 17:34 ` Ian Rogers
@ 2023-05-09 18:10   ` Arnaldo Carvalho de Melo
  2023-05-09 18:16     ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-05-09 18:10 UTC (permalink / raw)
  To: Ian Rogers
  Cc: Thomas Richter, jolsa, linux-kernel, linux-perf-users, leo.yan,
	svens, gor, sumanthk, hca

Em Tue, May 09, 2023 at 10:34:44AM -0700, Ian Rogers escreveu:
> On Tue, May 9, 2023 at 6:19 AM Thomas Richter <tmricht@linux.ibm.com> wrote:
> >
> > Test case Test java symbol might run a long time. On Fedora 38 the
> > run time is very, very long:
> >
> >  Output before:
> >  # time ./perf test 108
> >  108: Test java symbol                  : Ok
> >  real   22m15.775s
> >  user   3m42.584s
> >  sys    4m30.685s
> >  #
> >
> > The reason is a lookup for the server for debug symbols as shown in
> >  # cat /etc/debuginfod/elfutils.urls
> >  https://debuginfod.fedoraproject.org/
> >  #
> > This lookup is done for every symbol/sample, so about 3500 lookups
> > will take place.
> > To omit this lookup, which is not needed, unset environment variable
> > DEBUGINFOD_URLS=''.
> >
> >  Output after:
> >  # time ./perf test 108
> >  108: Test java symbol                  : Ok
> >
> >  real   0m6.242s
> >  user   0m4.982s
> >  sys    0m3.243s
> >  #
> >
> > Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
> > Cc: leo.yan@linaro.org
> > Cc: irogers@google.com
> > ---
> >  tools/perf/tests/shell/test_java_symbol.sh | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tools/perf/tests/shell/test_java_symbol.sh b/tools/perf/tests/shell/test_java_symbol.sh
> > index 90cea8811926..499539d1c479 100755
> > --- a/tools/perf/tests/shell/test_java_symbol.sh
> > +++ b/tools/perf/tests/shell/test_java_symbol.sh
> > @@ -56,7 +56,7 @@ if [ $? -ne 0 ]; then
> >         exit 1
> >  fi
> >
> > -if ! perf inject -i $PERF_DATA -o $PERF_INJ_DATA -j; then
> > +if ! DEBUGINFOD_URLS='' perf inject -i $PERF_DATA -o $PERF_INJ_DATA -j; then
> 
> Jiri, is this the best way to workaround a debuginfod slowness?

I noticed this delay, It is good that someone worked on rootcausing this
excessive delay, thanks Thomas.

I'll test it now.

- Arnaldo

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

* Re: [PATCH] perf/test: reduce run time of perf test Test java symbol
  2023-05-09 18:10   ` Arnaldo Carvalho de Melo
@ 2023-05-09 18:16     ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-05-09 18:16 UTC (permalink / raw)
  To: Ian Rogers
  Cc: Thomas Richter, jolsa, linux-kernel, linux-perf-users, leo.yan,
	svens, gor, sumanthk, hca

Em Tue, May 09, 2023 at 03:10:58PM -0300, Arnaldo Carvalho de Melo escreveu:
> > On Tue, May 9, 2023 at 6:19 AM Thomas Richter <tmricht@linux.ibm.com> wrote:
> > > -if ! perf inject -i $PERF_DATA -o $PERF_INJ_DATA -j; then
> > > +if ! DEBUGINFOD_URLS='' perf inject -i $PERF_DATA -o $PERF_INJ_DATA -j; then
 
> I noticed this delay, It is good that someone worked on rootcausing this
> excessive delay, thanks Thomas.
> 
> I'll test it now.

gdb asks the user if debuginfod should be used, perf is doing this if
the system is configured for debuginfod queries via a systemwide config,
what is best? Unsure, but since the test passes, i.e. the expected
symbols are found in the 'perf report' output, avoiding debuginfod
queries seems to fit the bill,

Applied,

- Arnaldo

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

end of thread, other threads:[~2023-05-09 18:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-09 13:18 [PATCH] perf/test: reduce run time of perf test Test java symbol Thomas Richter
2023-05-09 17:34 ` Ian Rogers
2023-05-09 18:10   ` Arnaldo Carvalho de Melo
2023-05-09 18:16     ` Arnaldo Carvalho de Melo

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