Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pahole utility needed for BTF generation in our kernels #171

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sdimitro
Copy link
Contributor

Motivation

bpftrace has had BTF support for a while (ref: https://github.com/iovisor/bpftrace/blob/master/docs/reference_guide.md#btf-support). We currently have in-place a few hacks to include ZFS (and other?) headers in our bpftrace package so we can use the type information on our scripts. If we had BTF info on our kernels we would no longer need those hacks for ZFS (and any other kernel modules really).

This Patch

This PR includes the pahole(1) utilty that is part of the dwarves package from Canonical. This utility will be automatically used by our kernel builds when we enable the CONFIG_DEBUG_INFO_BTF config flag on our kernels, to generate BTF info.

Testing

TBA

Copy link
Contributor

@sebroy sebroy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm starting to get excited about the prospect of leveraging BTF!

@sdimitro
Copy link
Contributor Author

The pahole utility that comes with 18.04 is too old for the kernel build which fails with the following error when trying to generate BTF:

BTF: .tmp_vmlinux.btf: pahole version v1.9 is too old, need at least v1.13
Failed to generate BTF for vmlinux
Try to disable CONFIG_DEBUG_INFO_BTF

We'll revisit this after we move to 20.04, which I think should be soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants