From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Li Zhijian <lizhijian@cn.fujitsu.com>
Cc: linux-kernel@vger.kernel.org, peterz@infradead.org,
mingo@redhat.com, alexander.shishkin@linux.intel.com,
kim.phillips@arm.com, philip.li@intel.com
Subject: Re: [PATCH] perf test shell: trace+probe_libc_inet_pton.sh: be compatible with debian/ubuntu
Date: Wed, 18 Oct 2017 09:20:04 -0300 [thread overview]
Message-ID: <20171018122004.GE3707@kernel.org> (raw)
In-Reply-To: <1508315649-18836-1-git-send-email-lizhijian@cn.fujitsu.com>
Em Wed, Oct 18, 2017 at 04:34:09PM +0800, Li Zhijian escreveu:
> at debian/ubuntu, libc.so is located at /lib/x86_64-linux-gnu/libc-2.23.so
> it outputs like when testing:
> ---------------
Thanks, tested and applied.
- Arnaldo
> PING ::1(::1) 56 data bytes
> 64 bytes from ::1: icmp_seq=1 ttl=64 time=0.040 ms
>
> --- ::1 ping statistics ---
> 1 packets transmitted, 1 received, 0% packet loss, time 0ms
> rtt min/avg/max/mdev = 0.040/0.040/0.040/0.000 ms
> 0.000 probe_libc:inet_pton:(7f0e2db741c0))
> __GI___inet_pton (/lib/x86_64-linux-gnu/libc-2.23.so)
> getaddrinfo (/lib/x86_64-linux-gnu/libc-2.23.so)
> [0xffffa9d40f34ff4d] (/bin/ping)
> ---------------
>
> Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
> ---
> tools/perf/tests/shell/trace+probe_libc_inet_pton.sh | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/tools/perf/tests/shell/trace+probe_libc_inet_pton.sh b/tools/perf/tests/shell/trace+probe_libc_inet_pton.sh
> index 462fc75..7a84d73 100755
> --- a/tools/perf/tests/shell/trace+probe_libc_inet_pton.sh
> +++ b/tools/perf/tests/shell/trace+probe_libc_inet_pton.sh
> @@ -10,6 +10,9 @@
>
> . $(dirname $0)/lib/probe.sh
>
> +ld=$(realpath /lib64/ld*.so.* | uniq)
> +libc=$(echo $ld | sed 's/ld/libc/g')
> +
> trace_libc_inet_pton_backtrace() {
> idx=0
> expected[0]="PING.*bytes"
> @@ -18,8 +21,8 @@ trace_libc_inet_pton_backtrace() {
> expected[3]=".*packets transmitted.*"
> expected[4]="rtt min.*"
> expected[5]="[0-9]+\.[0-9]+[[:space:]]+probe_libc:inet_pton:\([[:xdigit:]]+\)"
> - expected[6]=".*inet_pton[[:space:]]\(/usr/lib.*/libc-[0-9]+\.[0-9]+\.so\)$"
> - expected[7]="getaddrinfo[[:space:]]\(/usr/lib.*/libc-[0-9]+\.[0-9]+\.so\)$"
> + expected[6]=".*inet_pton[[:space:]]\($libc\)$"
> + expected[7]="getaddrinfo[[:space:]]\($libc\)$"
> expected[8]=".*\(.*/bin/ping.*\)$"
>
> perf trace --no-syscalls -e probe_libc:inet_pton/max-stack=3/ ping -6 -c 1 ::1 2>&1 | grep -v ^$ | while read line ; do
> @@ -35,7 +38,7 @@ trace_libc_inet_pton_backtrace() {
> }
>
> skip_if_no_perf_probe && \
> -perf probe -q /lib64/libc-*.so inet_pton && \
> +perf probe -q $libc inet_pton && \
> trace_libc_inet_pton_backtrace
> err=$?
> rm -f ${file}
> --
> 2.7.4
next prev parent reply other threads:[~2017-10-18 12:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-18 8:34 [PATCH] perf test shell: trace+probe_libc_inet_pton.sh: be compatible with debian/ubuntu Li Zhijian
2017-10-18 12:20 ` Arnaldo Carvalho de Melo [this message]
2017-10-20 7:21 ` [tip:perf/urgent] perf test shell trace+probe_libc_inet_pton.sh: Be compatible with Debian/Ubuntu tip-bot for Li Zhijian
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171018122004.GE3707@kernel.org \
--to=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=kim.phillips@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizhijian@cn.fujitsu.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=philip.li@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox