From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Alan Maguire <alan.maguire@oracle.com>
Cc: Jiri Olsa <jolsa@kernel.org>,
Clark Williams <williams@redhat.com>,
dwarves@vger.kernel.org,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: Re: [PATCH v2 0/9] pahole: Support cross-CU type references and dwz alternate debug files
Date: Wed, 26 Aug 2026 10:10:03 -0300 [thread overview]
Message-ID: <ao7lqxytDiHmVmkk@x2> (raw)
In-Reply-To: <d85a69a5-b08a-4ec8-b09c-4e45b7c1f712@oracle.com>
On Wed, Aug 26, 2026 at 12:43:09PM +0100, Alan Maguire wrote:
> On 26/08/2026 01:52, Arnaldo Carvalho de Melo wrote:
> > On Fri, Aug 21, 2026 at 06:34:59PM -0300, Arnaldo Carvalho de Melo wrote:
> >> Add support for cross-CU type references and dwz alternate debug
> >> files so pahole can process binaries (e.g. a perf binary with rust
> >> objects, or Firefox) that use DW_FORM_ref_addr inter-CU references or
> >> dwz-compressed .dwz alternate debug files.
> >> Cross-CU type references:
>> Force-merge CUs that contain inter-CU references (DW_FORM_ref_addr)
> >> so type lookups resolve correctly. Handle same-file partial units
> >> where types are shared across CUs via DW_TAG_imported_unit. Fix
> >> cus__merging_cu failing to detect DW_FORM_ref_addr when
> >> DW_FORM_implicit_const causes dwarf_getabbrevattr() to fail.
> > I did a lot of test runs, and with the patches that are waiting for this
> > series to be landed that stress even more this series, so I'll merge
> > this tomorrow unless anybody have anything against it.
> > And then as a followup I'll land a series of test patches that don't
> > affect the functioning of these tools, just do coverage analysis and add
> > lots more tests for its features.
> > We need to release a new version as there are people asking for features
> > developed and not yet released, so I'll make sure we get the goodies in
> > and the release out ASAP,
> Changes look good CI-wise, one issue that we see (not just for this series)
> is that perf on some systems is a shell script that selects the kernel-version-specific
> binary, so the result is tests relying on perf being a binary get skipped.
> Not a big deal now but maybe we could come up with variants in the future that
> generate inter-cu references reliably locally.
So, one of the patches in one of the test series is:
commit b7938d358c59c279a33a2c4de8943e5469a659bf
Author: Arnaldo Carvalho de Melo <acme@redhat.com>
Date: Tue Aug 4 11:07:38 2026 -0300
tests: Add automatic perf building for cross-distro compatibility
Make perf-dependent tests work across all distributions by building
perf from source when the system version lacks debug info. Previously
tests failed or skipped on Alpine, Debian without -dbgsym packages,
and other environments lacking perf debug packages.
Add get_perf_with_debug() helper to test_lib.sh that:
- Checks if system perf has debug info (file command, "not stripped")
- Downloads perf-specific tarball (~3MB) and builds with DEBUG=1
- Caches build in /tmp/pahole-test-perf-cache for reuse
- Supports wget and curl for download (Alpine compatibility)
- Skips gracefully if build fails
Uses kernel.org's perf-specific tarballs (HOWTO.build.perf) rather
than cloning the full kernel tree (~200MB+) for efficiency.
Before: 3 tests (inter_cu_refs, prettify_perf.data, prototypes) skip
on Alpine 3.20 and other distros without perf debug packages
After: Tests auto-download perf tarball and build from source
(one-time ~2min setup), then pass on all distros including
Alpine/musl systems
Update 3 tests to use get_perf_with_debug() instead of checking for
system perf.
Tested: All tests pass on Fedora with system perf, build-from-source
path exercises on systems without perf debug info.
Assisted-by: Claude:claude-sonnet-4-5
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> I tried a few other approaches where we handle inter-cu references, but all seemed
> like they were a bit too complex or involved multiple traversals of the CU set and
> were too expensive time-wise.
> I can land these if you'd prefer, whatever works. Thanks!
Please do it, I think its better so that we try to have multiple people
involved in landing features that touch the code code like in this case.
I'll then land the testing infra that doesn't touch the code code and is
less risky.
Thanks!
- Arnaldo
next prev parent reply other threads:[~2026-08-26 13:10 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-21 21:34 [PATCH v2 0/9] pahole: Support cross-CU type references and dwz alternate debug files Arnaldo Carvalho de Melo
2026-08-21 21:35 ` [PATCH v2 1/9] dwarf_loader: Initial support for DW_TAG_variant_part Arnaldo Carvalho de Melo
2026-08-21 21:35 ` [PATCH v2 2/9] dwarf_loader: Initial support for DW_TAG_subprogram in DW_TAG_enumeration Arnaldo Carvalho de Melo
2026-08-21 21:35 ` [PATCH v2 3/9] dwarf_loader: Allow forcing the merge of CUs for solving inter CU tag references Arnaldo Carvalho de Melo
2026-08-21 21:35 ` [PATCH v2 4/9] dwarf_loader: Support DW_TAG_imported_unit for same-file partial units Arnaldo Carvalho de Melo
2026-08-21 21:35 ` [PATCH v2 5/9] dwarf_loader: Fix cus__merging_cu failing to detect DW_FORM_ref_addr Arnaldo Carvalho de Melo
2026-08-21 21:35 ` [PATCH v2 6/9] tests: Add inter-CU type reference comparison test Arnaldo Carvalho de Melo
2026-08-21 21:35 ` [PATCH v2 7/9] dwarf_loader: Add cu parameter to tag__set_spec() and dwarf_tag__set_attr_type() Arnaldo Carvalho de Melo
2026-08-21 21:35 ` [PATCH v2 8/9] dwarf_loader: Support DW_FORM_GNU_ref_alt references to dwz alternate debug files Arnaldo Carvalho de Melo
2026-08-21 21:35 ` [PATCH v2 9/9] scripts: Add vmlinux_comparison.py for DWARF/BTF analysis Arnaldo Carvalho de Melo
2026-08-26 0:52 ` [PATCH v2 0/9] pahole: Support cross-CU type references and dwz alternate debug files Arnaldo Carvalho de Melo
2026-08-26 11:43 ` Alan Maguire
2026-08-26 13:10 ` Arnaldo Carvalho de Melo [this message]
2026-08-28 14:05 ` Alan Maguire
2026-08-28 22:59 ` Arnaldo Carvalho de Melo
2026-08-29 20:21 ` RFT: coverage analysis and lots more regression tests in the 'next' branch. Was: " Arnaldo Carvalho de Melo
2026-08-30 17:08 ` Alan Maguire
2026-08-31 0:18 ` Arnaldo Carvalho de Melo
2026-08-31 0:48 ` Arnaldo Carvalho de Melo
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=ao7lqxytDiHmVmkk@x2 \
--to=acme@kernel.org \
--cc=acme@redhat.com \
--cc=alan.maguire@oracle.com \
--cc=dwarves@vger.kernel.org \
--cc=jolsa@kernel.org \
--cc=williams@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.