public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 dwarves 0/2] pahole: add BTF layout encoding feature
@ 2026-02-26  8:52 Alan Maguire
  2026-02-26  8:52 ` [PATCH v3 dwarves 1/2] pahole: Add "layout" BTF " Alan Maguire
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Alan Maguire @ 2026-02-26  8:52 UTC (permalink / raw)
  To: andrii, ast
  Cc: daniel, martin.lau, eddyz87, song, yonghong.song, john.fastabend,
	kpsingh, sdf, haoluo, jolsa, qmo, ihor.solodrai, mykyta.yatsenko5,
	dwarves, bpf, Alan Maguire

A soon-to-arrive v9 series will add support to add BTF layout
information to BTF; this describes the BTF kinds known about at
time of encoding in order to support parsing even in cases where
the kinds are not known to the parser; the layout relates a
BTF kind to the amount of space it consumes via an optional single
element following the BTF type or a set of vlen-specified objects.

This series implements the support for the BTF "layout" feature
but does not require the libbpf changes to support it; the feature
test uses a weak declaration of btf__new_empty_opts() to handle the
unsupported case.

To test pahole with this feature, the following approach can be used;

1. Specify -DLIBBPF_EMBEDDED=OFF option to cmake
2. Install latest libbpf with associated patch series with layout support

Alternatively with embedded libbpf the changes can be applied to
the embedded libbpf in lib/bpf/src.

Changes since v2 [1]:

- Resynced, renamed kind_layout -> layout
- Avoid encoding layout info in split BTF since it is a waste of space

Changes since v1 [2]:

 - Resynced with latest pahole

[1] https://lore.kernel.org/dwarves/20251210202752.813919-1-alan.maguire@oracle.com/
[2] https://lore.kernel.org/dwarves/20250528095349.788793-1-alan.maguire@oracle.com/

Alan Maguire (2):
  pahole: Add "layout" BTF encoding feature
  man-pages: describe layout BTF feature

 btf_encoder.c      | 21 ++++++++++++++++++++-
 dwarves.h          |  4 ++++
 man-pages/pahole.1 |  2 ++
 pahole.c           |  6 ++++++
 4 files changed, 32 insertions(+), 1 deletion(-)

-- 
2.39.3


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-04-03 21:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-26  8:52 [PATCH v3 dwarves 0/2] pahole: add BTF layout encoding feature Alan Maguire
2026-02-26  8:52 ` [PATCH v3 dwarves 1/2] pahole: Add "layout" BTF " Alan Maguire
2026-02-26  8:52 ` [PATCH v3 dwarves 2/2] man-pages: describe layout BTF feature Alan Maguire
2026-04-02  8:00 ` [PATCH v3 dwarves 0/2] pahole: add BTF layout encoding feature Alan Maguire
2026-04-02 14:03   ` Alexei Starovoitov
2026-04-03 21:08 ` Jiri Olsa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox