Re: [PATCH v2] perf test: Fix inet_pton probe failure and unroll call graph

Ian Rogers <[email protected]>
Newsgroups dev.linux.lists.sashiko,org.kernel.vger.linux-perf-users
Message-ID <CAP-5=fUvMcBbHTumUVRmxFA7OL6bBP-bC9SUeWHDi5XQJ=ZWkg@mail.gmail.com>
On Sat, Apr 11, 2026 at 12:54 PM <[email protected]> wrote:
>
> Sashiko AI review found 1 potential issue(s):
> - [Medium] Unconditionally requiring DWARF call-graphs causes the test to falsely fail on perf builds lacking DWARF support.
> --
>
> commit dbec7073d294917f7866e8ea3a6b39004a7407ad
> Author: Ian Rogers <[email protected]>
>
> perf test: Fix inet_pton probe failure and unroll call graph
>
> This commit fixes an issue where multiple identical event names were output
> by perf probe when creating multiple probe points, which broke subsequent
> commands. It also updates the backtrace collection to explicitly request
> dwarf call-graphs and increases max-stack to 8 for all architectures.
>
> > diff --git a/tools/perf/tests/shell/record+probe_libc_inet_pton.sh b/tools/perf/tests/shell/record+probe_libc_inet_pton.sh
> > index ab99bef556bf0..eca629ee83f03 100755
> > --- a/tools/perf/tests/shell/record+probe_libc_inet_pton.sh
> > +++ b/tools/perf/tests/shell/record+probe_libc_inet_pton.sh
> [ ... ]
> > @@ -40,12 +40,12 @@ trace_libc_inet_pton_backtrace() {
> >       echo ".*inet_pton\+0x[[:xdigit:]]+[[:space:]]\($libc|inlined\)$" >> $expected
> >       case "$(uname -m)" in
> >       s390x)
> > -             eventattr='call-graph=dwarf,max-stack=4'
> > +             eventattr='call-graph=dwarf,max-stack=8'
> >               echo "((__GI_)?getaddrinfo|text_to_binary_address)\+0x[[:xdigit:]]+[[:space:]]\($libc|inlined\)$" >> $expected
> >               echo "(gaih_inet|main)\+0x[[:xdigit:]]+[[:space:]]\(inlined|.*/bin/ping.*\)$" >> $expected
> >               ;;
> >       *)
> > -             eventattr='max-stack=4'
> > +             eventattr='call-graph=dwarf,max-stack=8'
>
> Will this cause the test to falsely fail on perf builds lacking DWARF support?
>
> If perf is compiled without libunwind or libdw, running perf record with
> call-graph=dwarf will exit with an error. Since the test script doesn't
> appear to verify DWARF support before running, the test will report a hard
> failure rather than gracefully skipping on minimal perf builds.

Since perf probe requires libdw and libunwind is deprecated this isn't
a concern.

Thanks,
Ian

> >               echo ".*(\+0x[[:xdigit:]]+|\[unknown\])[[:space:]]\(.*/bin/ping.*\)$" >> $expected
> >               ;;
> >       esac
>
> --
> Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.