public inbox for linux-perf-users@vger.kernel.org
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Changbin Du <changbin.du@huawei.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>, Ian Rogers <irogers@google.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	James Clark <james.clark@linaro.org>,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] perf: Add layout support for --symfs option
Date: Wed, 11 Mar 2026 18:17:19 -0700	[thread overview]
Message-ID: <abIUH0ATipVuBKxz@google.com> (raw)
In-Reply-To: <20260309174412.1166259-1-changbin.du@huawei.com>

On Mon, Mar 09, 2026 at 05:44:12PM +0000, Changbin Du wrote:
> Add support for parsing an optional layout parameter in the --symfs
> command line option. The format is:
> 
>   --symfs <directory[,layout]>
> 
> Where layout can be:
>   - 'hierarchy': matches full path (default)
>   - 'flat': only matches base name
> 
> When debugging symbol files from a copy of the filesystem (e.g., from a
> container or remote machine), the debug files are often stored in a
> flat directory structure with only filenames, not the full original
> paths. In this case, using 'flat' layout allows perf to find debug
> symbols by matching only the filename rather than the full path.
> 
> For example, given a binary path like:
>   /build/output/lib/foo.so
> 
> With 'perf report --symfs /debug/files,flat', perf will look for:
>   /debug/files/foo.so
> 
> Instead of:
>   /debug/files/build/output/lib/foo.so
> 
> This is particularly useful when:
> - Extracting debug files from containers with different directory layouts
> - Working with build systems that flatten directory structures
> 
> Changes:
> - Add symfs_layout_flat field to symbol_conf struct.
> - Parse optional layout in symbol__config_symfs().
> - Modify __symbol__join_symfs() to use basename() when layout
>   is 'flat'.
> - Update documentation in Documentation/ folder.
> 
> Signed-off-by: Changbin Du <changbin.du@huawei.com>

Applied to perf-tools-next, thanks!

Best regards,
Namhyung


      reply	other threads:[~2026-03-12  1:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-09 17:44 [PATCH v4] perf: Add layout support for --symfs option Changbin Du
2026-03-12  1:17 ` Namhyung Kim [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=abIUH0ATipVuBKxz@google.com \
    --to=namhyung@kernel.org \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=changbin.du@huawei.com \
    --cc=irogers@google.com \
    --cc=james.clark@linaro.org \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    /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