History

perf test record+probe_libc_inet_pton: Ask 'nm' for dynamic symbols

Adrian reported that this test fails in his system where: probe libc's inet_pton & backtrace it with ping: FAILED! root@kbl04:~/git/linux-perf# nm -g /lib/x86_64-linux-gnu/libc-2.19.so | grep inet_pton nm: /lib/x86_64-linux-gnu/libc-2.19.so: no symbols This fails on ubuntu systems, with Adrian's being kubuntu 14.04, I tested with ubuntu 14.04.4 and 18.04, and there we need to use the -D/--dynamic 'nm' option to have this test working. And it works as well with that on fedora 27, so use it.

Arnaldo Carvalho de Melo committed 8 years ago

Commit 005cc001 parent 97802f31 file · +1 −1Browse files

Unified · Split

tools/perf/tests/shell/record+probe_libc_inet_pton.sh+1−1
@@ -11,7 +11,7 @@ · 10 unmodified lines
1111 . $(dirname $0)/lib/probe.sh
1212
1313 libc=$(grep -w libc /proc/self/maps | head -1 | sed -r 's/.*[[:space:]](\/.*)/\1/g')
14−nm -g $libc 2>/dev/null | fgrep -q inet_pton || exit 254
14+nm -Dg $libc 2>/dev/null | fgrep -q inet_pton || exit 254
1515
1616 trace_libc_inet_pton_backtrace() {
1717 idx=0

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t