diff options
| author | Alan Maguire <alan.maguire@oracle.com> | 2026-03-26 14:54:37 +0000 |
|---|---|---|
| committer | Andrii Nakryiko <andrii@kernel.org> | 2026-03-26 13:53:56 -0700 |
| commit | 087f3964f4b3031dbd0a98844b225add8e1e1169 (patch) | |
| tree | 1f754e247465fabcd18ce4c9331d09ac9e8e96d8 /tools/perf/scripts/python/bin/stackcollapse-report | |
| parent | 222edc843c158666d2d71793b4b7d0bbb9801883 (diff) | |
libbpf: Support layout section handling in BTF
Support reading in layout fixing endian issues on reading;
also support writing layout section to raw BTF object.
There is not yet an API to populate the layout with meaningful
information.
As part of this, we need to consider multiple valid BTF header
sizes; the original or the layout-extended headers.
So to support this, the "struct btf" representation is modified
to contain a "struct btf_header" and we copy the valid
portion from the raw data to it; this means we can always safely
check fields like btf->hdr.layout_len .
Note if parsed-in BTF has extra header information beyond
sizeof(struct btf_header) - if so we make that BTF ineligible
for modification by setting btf->has_hdr_extra .
Ensure that we handle endianness issues for BTF layout section,
though currently only field that needs this (flags) is unused.
Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20260326145444.2076244-3-alan.maguire@oracle.com
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions
