[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z4U2MarOp0DLo31_@x1>
Date: Mon, 13 Jan 2025 12:50:09 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: James Clark <james.clark@...aro.org>
Cc: Leo Yan <leo.yan@....com>, Jing Zhang <renyu.zj@...ux.alibaba.com>,
Guilherme Amadio <amadio@...too.org>,
Namhyung Kim <namhyung@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>, Ian Rogers <irogers@...gle.com>,
Adrian Hunter <adrian.hunter@...el.com>,
"Liang, Kan" <kan.liang@...ux.intel.com>,
Thomas Richter <tmricht@...ux.ibm.com>,
Athira Rajeev <atrajeev@...ux.vnet.ibm.com>,
linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] perf test record+probe_libc_inet_pton: Make test
resilient
On Tue, Jan 07, 2025 at 04:51:31PM +0000, James Clark wrote:
>
>
> On 02/12/2024 11:19 am, Leo Yan wrote:
> > The test failed back and forth due to the call chain being heavily
> > impacted by the libc, which varies across different architectures and
> > distros.
> >
> > The libc contains the symbols for "gaih_inet" and "getaddrinfo" in some
> > cases, but not always. Moreover, these symbols can be either normal
> > symbols or dynamic symbols, making it difficult to decide the call chain
> > entries due to the symbols are inconsistent.
> >
> > To fix the issue, this commit identifies three call chain entries are
> > always present. These entries are matched by iterating through the
> > lines in the "perf script" result. The recording attribute max-stack is
> > set to 4 for the possible maximum call chain depth.
> >
> > After:
> >
> > # perf test -vF pton
> > --- start ---
> > Pattern: ping[][0-9 \.:]+probe_libc:inet_pton: \([[:xdigit:]]+\)
> > Matching: ping 285058 [025] 1219802.466939: probe_libc:inet_pton: (ffffa14b7cf0)
> > Pattern: .*inet_pton\+0x[[:xdigit:]]+[[:space:]]\(/usr/lib/aarch64-linux-gnu/libc-2.31.so|inlined\)$
> > Matching: ping 285058 [025] 1219802.466939: probe_libc:inet_pton: (ffffa14b7cf0)
> > Matching: ffffa14b7cf0 __GI___inet_pton+0x0 (/usr/lib/aarch64-linux-gnu/libc-2.31.so)
> > Pattern: .*(\+0x[[:xdigit:]]+|\[unknown\])[[:space:]]\(.*/bin/ping.*\)$
> > Matching: ping 285058 [025] 1219802.466939: probe_libc:inet_pton: (ffffa14b7cf0)
> > Matching: ffffa14b7cf0 __GI___inet_pton+0x0 (/usr/lib/aarch64-linux-gnu/libc-2.31.so)
> > Matching: ffffa1488040 getaddrinfo+0xe8 (/usr/lib/aarch64-linux-gnu/libc-2.31.so)
> > Matching: aaaab8672da4 [unknown] (/usr/bin/ping)
> > ---- end ----
> > 82: probe libc's inet_pton & backtrace it with ping : Ok
> >
> > Reported-by: Jing Zhang <renyu.zj@...ux.alibaba.com>
> > Closes: https://lore.kernel.org/linux-perf-users/1728978807-81116-1-git-send-email-renyu.zj@linux.alibaba.com/
> > Reported-by: Guilherme Amadio <amadio@...too.org>
> > Closes: https://lore.kernel.org/linux-perf-users/Z0X3AYUWkAgfPpWj@x1/T/#m57327e135b156047e37d214a0d453af6ae1e02be
> > Signed-off-by: Leo Yan <leo.yan@....com>
> > ---
> > Changes from v1: Fixed a typo s/Seatch/Search.
> >
> > .../shell/record+probe_libc_inet_pton.sh | 34 ++++++++++---------
> > 1 file changed, 18 insertions(+), 16 deletions(-)
> >
>
> Reviewed-by: James Clark <james.clark@...aro.org>
Thanks, applied to perf-tools-next,
- Arnaldo
Powered by blists - more mailing lists