Skip to content

Compare the BTF of two builds with rk btf - #80

Merged
tamnd merged 1 commit into
mainfrom
rk-btf
Oct 7, 2026
Merged

tamnd merged 1 commit into
mainfrom
rk-btf

Conversation

@tamnd

@tamnd tamnd commented Oct 7, 2026

Copy link
Copy Markdown
Owner

K5's fourth criterion is the BTF differential: both builds' vmlinux must describe the same types and the same functions, and functions only one has because of inlining are listed and not failed. Nothing measured it, and the runners had no pahole, so kconfig dropped DEBUG_INFO_BTF from the distro configs.

rk btf --reference DIR --other DIR reads the .BTF section of each vmlinux with the object crate and parses it by hand. Type IDs differ between builds, so every named struct, union, enum, typedef, int, float, var and decl tag is written out with the types it uses named, and anonymous ones written in full where they are used. A name can have more than one description, since two files can define different structs of one name, so each name maps to a set. Functions map to their linkage and prototype, parameter names included.

It fails on a name both builds describe differently, a type only one has, and a function both have with different prototypes. Functions only one has are listed. It takes --save FILE and accepts a saved file or a vmlinux path in place of a build, like rk frames.

The nightly installs dwarves (1.25 on Ubuntu 24.04, which the plan asks for), runs rk btf after rk frames and adds a btf column to the headline. Exit status 2, which is what a build without .BTF gives (tinyconfig), shows as not run.

Part of #6 and #7.

@tamnd tamnd added kind/feature New capability in the harness area/rk The rk command line area/ci Workflows and release automation row/a64 arm64 labels Oct 7, 2026
@tamnd
tamnd merged commit 598ebdf into main Oct 7, 2026
2 checks passed
@tamnd
tamnd deleted the rk-btf branch October 7, 2026 16:00
@tamnd tamnd mentioned this pull request Oct 9, 2026
4 of 7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci Workflows and release automation area/rk The rk command line kind/feature New capability in the harness row/a64 arm64

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant