linux-stable/tools/perf
Seeteena Thoufeek 3b57b7a3a8 perf tests: Fix record+probe_libc_inet_pton.sh for powerpc64
[ Upstream commit bff5a556c1 ]

'probe libc's inet_pton & backtrace it with ping' testcase sometimes
fails on powerpc because distro ping binary does not have symbol
information and thus it prints "[unknown]" function name in the
backtrace.

Accept "[unknown]" as valid function name for powerpc as well.

 # perf test -v "probe libc's inet_pton & backtrace it with ping"

Before:

  59: probe libc's inet_pton & backtrace it with ping       :
  --- start ---
  test child forked, pid 79695
  ping 79718 [077] 96483.787025: probe_libc:inet_pton: (7fff83a754c8)
  7fff83a754c8 __GI___inet_pton+0x8 (/usr/lib64/power9/libc-2.28.so)
  7fff83a2b7a0 gaih_inet.constprop.7+0x1020
  (/usr/lib64/power9/libc-2.28.so)
  7fff83a2c170 getaddrinfo+0x160 (/usr/lib64/power9/libc-2.28.so)
  1171830f4 [unknown] (/usr/bin/ping)
  FAIL: expected backtrace entry
  ".*\+0x[[:xdigit:]]+[[:space:]]\(.*/bin/ping.*\)$"
  got "1171830f4 [unknown] (/usr/bin/ping)"
  test child finished with -1
  ---- end ----
  probe libc's inet_pton & backtrace it with ping: FAILED!

After:

  59: probe libc's inet_pton & backtrace it with ping       :
  --- start ---
  test child forked, pid 79085
  ping 79108 [045] 96400.214177: probe_libc:inet_pton: (7fffbb9654c8)
  7fffbb9654c8 __GI___inet_pton+0x8 (/usr/lib64/power9/libc-2.28.so)
  7fffbb91b7a0 gaih_inet.constprop.7+0x1020
  (/usr/lib64/power9/libc-2.28.so)
  7fffbb91c170 getaddrinfo+0x160 (/usr/lib64/power9/libc-2.28.so)
  132e830f4 [unknown] (/usr/bin/ping)
  test child finished with 0
  ---- end ----
  probe libc's inet_pton & backtrace it with ping: Ok

Signed-off-by: Seeteena Thoufeek <s1seetee@linux.vnet.ibm.com>
Reviewed-by: Kim Phillips <kim.phillips@amd.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Hendrik Brueckner <brueckner@linux.ibm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sandipan Das <sandipan@linux.ibm.com>
Fixes: 1632936480 ("perf tests: Fix record+probe_libc_inet_pton.sh without ping's debuginfo")
Link: http://lkml.kernel.org/r/1561630614-3216-1-git-send-email-s1seetee@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-07-26 09:14:16 +02:00
..
arch perf cs-etm: Properly set the value of 'old' and 'head' in snapshot mode 2019-07-26 09:14:05 +02:00
bench perf bench numa: Add define for RUSAGE_THREAD if not present 2019-05-25 18:23:46 +02:00
Documentation perf config: Fix an error in the config template documentation 2019-04-20 09:15:57 +02:00
examples/bpf perf trace: Handle "bpf-output" events associated with "__augmented_syscalls__" BPF map 2018-08-08 15:55:57 -03:00
include/bpf perf bpf: Add wrappers to BPF_FUNC_probe_read(_str) functions 2018-08-08 15:55:57 -03:00
jvmti perf jvmti: Address gcc string overflow warning for strncpy() 2019-07-26 09:14:04 +02:00
pmu-events perf vendor events intel: Fix Load_Miss_Real_Latency on SKL/SKX 2019-01-26 09:32:40 +01:00
python
scripts perf script python: Fix export-to-sqlite.py sample columns 2018-09-25 11:37:05 -03:00
tests perf tests: Fix record+probe_libc_inet_pton.sh for powerpc64 2019-07-26 09:14:16 +02:00
trace perf trace beauty: Add beautifiers for 'socket''s 'protocol' arg 2018-07-31 10:52:47 -03:00
ui perf annotate TUI browser: Do not use member from variable within its own initialization 2019-07-26 09:14:02 +02:00
util perf stat: Fix group lookup for metric group 2019-07-26 09:14:15 +02:00
.gitignore
Build
builtin-annotate.c perf annotate: Add --percent-type option 2018-08-08 15:55:53 -03:00
builtin-bench.c
builtin-buildid-cache.c perf buildid-cache: Warn --purge-all failures 2018-05-15 10:32:16 -03:00
builtin-buildid-list.c
builtin-c2c.c perf c2c: Fix c2c report for empty numa node 2019-04-05 22:32:57 +02:00
builtin-config.c
builtin-data.c
builtin-diff.c perf hists: Clarify callchain disabling when available 2018-07-24 14:37:33 -03:00
builtin-evlist.c
builtin-ftrace.c
builtin-help.c perf help: Remove needless use of strncpy() 2019-07-03 13:14:41 +02:00
builtin-inject.c perf thread: Make thread__find_map() return the map 2018-04-26 13:47:08 -03:00
builtin-kallsyms.c perf machine: Ditch find_kernel_function variants 2018-04-30 12:20:54 -03:00
builtin-kmem.c tools lib traceevent, perf tools: Rename 'enum pevent_flag' to 'enum tep_flag' 2018-08-13 15:22:18 -03:00
builtin-kvm.c perf tools: Ditch the symbol_conf.nr_events global 2018-06-04 10:28:52 -03:00
builtin-list.c
builtin-lock.c
builtin-mem.c perf mem: Allow all record/report options 2018-04-18 15:35:48 -03:00
builtin-probe.c perf tools: No need to check if the argument to __get() function is NULL 2018-06-04 10:28:50 -03:00
builtin-record.c
builtin-report.c perf evsel: Store ids for events with their own cpus perf_event__synthesize_event_update_cpus 2018-10-16 08:18:52 -03:00
builtin-sched.c perf sched: Use sched->show_callchain where appropriate 2018-06-05 10:09:54 -03:00
builtin-script.c perf script: Fix crash when processing recorded stat data 2019-03-13 14:02:26 -07:00
builtin-stat.c perf stat: Avoid segfaults caused by negated options 2019-01-26 09:32:41 +01:00
builtin-timechart.c perf tools: Add missing open_memstream() prototype for systems lacking it 2019-01-26 09:32:41 +01:00
builtin-top.c perf top: Fix error handling in cmd_top() 2019-04-20 09:15:57 +02:00
builtin-trace.c perf trace: Support multiple "vfs_getname" probes 2019-03-13 14:02:37 -07:00
builtin-version.c perf version: Print status for syscall_table 2018-04-12 10:33:34 -03:00
builtin.h
check-headers.sh tools include: Adopt linux/bits.h 2019-04-27 09:36:40 +02:00
command-list.txt
CREDITS
design.txt
Makefile perf tools: Disable parallelism for 'make clean' 2018-08-20 08:54:58 -03:00
Makefile.config perf build: Don't unconditionally link the libbfd feature test to -liberty and -lz 2019-02-12 19:47:16 +01:00
Makefile.perf perf tools: Pass build flags to traceevent build 2018-10-16 14:57:59 -03:00
MANIFEST
perf-archive.sh
perf-completion.sh
perf-read-vdso.c
perf-sys.h
perf-with-kcore.sh
perf.c perf tools: Remove dead quote.[ch] code 2018-06-04 10:28:50 -03:00
perf.h perf tools: Increase MAX_NR_CPUS and MAX_CACHES 2019-07-26 09:14:12 +02:00