Skip to contentSkip to conversation

perf/test: reduce run time of perf test Test java symbol

PATCH Applied Thomas Richter 3 participants 4 messages May 9, 2023 perf events

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf/test: reduce run time of perf test Test java symbol

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
#

---
 tools/perf/tests/shell/test_java_symbol.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/tests/shell/test_java_symbol.sh +1 -1
index 90cea8811926..499539d1c479 100755
@@ -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
Signature · 1 line
2.40.0
reviewer
#1 lore raw
Quoted 42 lines · 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

#

---
 tools/perf/tests/shell/test_java_symbol.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/tests/shell/test_java_symbol.sh +0 -0
index 90cea8811926..499539d1c479 100755

tools/perf/tests/shell/test_java_symbol.sh if [ $? -ne 0 ]; then · line 59

Quoted 5 lines
tools/perf/tests/shell/test_java_symbol.sh +1 -1
@@ -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

Quoted 6 lines
tools/perf/tests/shell/test_java_symbol.sh +0 -1
        echo "Fail to inject samples"
        exit 1
 fi
--

2.40.0

#2 lore raw

Em Tue, May 09, 2023 at 10:34:44AM -0700, Ian Rogers escreveu:

Quoted 46 lines · Thomas Richter
Quoted 45 lines

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

#

---
 tools/perf/tests/shell/test_java_symbol.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/tests/shell/test_java_symbol.sh +0 -0
index 90cea8811926..499539d1c479 100755
@@ -56,7 +56,7 @@ if [ $? -ne 0 ]; then
        exit 1
 fi
 
Quoted 4 lines

tools/perf/tests/shell/test_java_symbol.sh if [ $? -ne 0 ]; then · line 59

Quoted 2 lines
tools/perf/tests/shell/test_java_symbol.sh +1 -1
-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

maintainer Applied
#3 lore raw

Em Tue, May 09, 2023 at 03:10:58PM -0300, Arnaldo Carvalho de Melo escreveu:

Quoted 8 lines
Quoted 3 lines · Thomas Richter

tools/perf/tests/shell/test_java_symbol.sh if [ $? -ne 0 ]; then · line 59

Quoted 2 lines
tools/perf/tests/shell/test_java_symbol.sh +1 -1
-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