summaryrefslogtreecommitdiffstats
path: root/tools/perf/perf-sys.h
diff options
context:
space:
mode:
authorSandipan Das2018-07-10 15:58:16 +0200
committerArnaldo Carvalho de Melo2018-07-24 19:52:09 +0200
commit83e3b6d73e66a10088f362b08b99c36fec3a14e7 (patch)
tree95b0b4c9ad93d2bd1a90ea5ec125a5414aba1796 /tools/perf/perf-sys.h
parentperf tests: Fix record+probe_libc_inet_pton.sh for powerpc64 (diff)
downloadkernel-qcow2-linux-83e3b6d73e66a10088f362b08b99c36fec3a14e7.tar.gz
kernel-qcow2-linux-83e3b6d73e66a10088f362b08b99c36fec3a14e7.tar.xz
kernel-qcow2-linux-83e3b6d73e66a10088f362b08b99c36fec3a14e7.zip
perf tests: Fix record+probe_libc_inet_pton.sh to ensure cleanups
If there is a mismatch in the perf script output, this test fails and exits before the event and temporary files created during its execution are cleaned up. This can be observed on a powerpc64 system running Fedora 27 as shown below. # perf test -v "probe libc's inet_pton & backtrace it with ping" 62: probe libc's inet_pton & backtrace it with ping : --- start --- test child forked, pid 18655 ping 18674 [013] 24511.496995: probe_libc:inet_pton: (7fffa6b423b0) 7fffa6b423b0 __GI___inet_pton+0x0 (/usr/lib64/power8/libc-2.26.so) 7fffa6af90dc gaih_inet.constprop.7+0xf4c (/usr/lib64/power8/libc-2.26.so) FAIL: expected backtrace entry "getaddrinfo\+0x[[:xdigit:]]+[[:space:]]\(/usr/lib64/power8/libc-2.26.so\)$" got "7fffa6af90dc gaih_inet.constprop.7+0xf4c (/usr/lib64/power8/libc-2.26.so)" test child finished with -1 ---- end ---- probe libc's inet_pton & backtrace it with ping: FAILED! # ls /tmp/expected.* /tmp/perf.data.* /tmp/perf.script.* /tmp/expected.u31 /tmp/perf.data.Pki /tmp/perf.script.Bhs # perf probe --list probe_libc:inet_pton (on __inet_pton@resolv/inet_pton.c in /usr/lib64/power8/libc-2.26.so) Cleanup of the event and the temporary files are now ensured by allowing the cleanup code to be executed even if the lines from the backtrace do not match their expected patterns instead of simply exiting from the point of failure. Signed-off-by: Sandipan Das <sandipan@linux.ibm.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Kim Phillips <kim.phillips@arm.com> Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> Cc: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> Link: http://lkml.kernel.org/r/ce9fb091dd3028fba8749a1a267cfbcb264bbfb1.1530724939.git.sandipan@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/perf-sys.h')
0 files changed, 0 insertions, 0 deletions