From: Zhan Xusheng <zhanxusheng1024@gmail.com>
To: Ian Rogers <irogers@google.com>
Cc: Zhan Xusheng <zhanxusheng@xiaomi.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Changbin Du <changbin.du@huawei.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>, Jiri Olsa <jolsa@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf symbols: Don't apply the symfs layout to synthesised paths
Date: Tue, 18 Aug 2026 10:08:39 +0800 [thread overview]
Message-ID: <20260818020840.56874-1-zhanxusheng@xiaomi.com> (raw)
In-Reply-To: <CAP-5=fV0sqh1cVc1kxSPNV0mBS7V0oTLQDvybE3MZCnpQ7N0RQ@mail.gmail.com>
On Mon, 17 Aug 2026 14:42:26 -0700, Ian Rogers wrote:
> Would it be possible to provide a before and after the
> patch so we can better appreciate the issue you are fixing?
Two builds of 8d3ae59288f1 differing only by the patch, empty /tmp/s:
perf record -o pd.data -- sleep 0.3
strace -f -e trace=openat,newfstatat \
perf report -i pd.data --symfs /tmp/s,flat --stdio
15 paths get tried under /tmp/s. Four of them differ. Before:
/tmp/s/debug/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
/tmp/s/debug/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
/tmp/s/debug/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2.debug
/tmp/s/f5/8808c9c8a388055b126492a1706d732761f86e.debug
After:
/tmp/s//usr/lib/debug/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
/tmp/s//usr/lib/debug/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
/tmp/s//usr/lib/debug/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2.debug
/tmp/s//usr/lib/debug/.build-id/f5/8808c9c8a388055b126492a1706d732761f86e.debug
The first three are FEDORA, UBUNTU and MIXEDUP_UBUNTU, the fourth
BUILDID_DEBUGINFO. What the old ones have in common is the shape: the
prefix perf supplied is flattened while dso__long_name() is still appended
whole, so they follow neither 'flat' nor 'hierarchy'.
Among the 11 unchanged paths are the basename lookups the option exists
for, so it keeps working:
/tmp/s/ld-linux-x86-64.so.2
/tmp/s/sleep
/tmp/s/vmlinux
The same trace with ,hierarchy is identical between the two builds. The
doubled slash is path__join() on a component starting with '/', present
without the patch too, in 7 of the 15.
I will add this to the changelog in v2.
Thanks,
Zhan Xusheng
prev parent reply other threads:[~2026-08-18 2:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-11 5:00 [PATCH] perf symbols: Don't apply the symfs layout to synthesised paths Zhan Xusheng
2026-08-17 21:42 ` Ian Rogers
2026-08-18 2:08 ` Zhan Xusheng [this message]
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=20260818020840.56874-1-zhanxusheng@xiaomi.com \
--to=zhanxusheng1024@gmail.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=changbin.du@huawei.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=zhanxusheng@xiaomi.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