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

feature: support to get type information from btf #383

Closed
dalehamel opened this issue Jan 30, 2019 · 2 comments
Closed

feature: support to get type information from btf #383

dalehamel opened this issue Jan 30, 2019 · 2 comments
Labels
enhancement New feature or request, changes on existing features

Comments

@dalehamel
Copy link
Contributor

It looks like BTF has been merged as of 4.18 into the linux kernel https://github.com/iovisor/bcc/blob/master/docs/kernel-versions.md

What would it take for bpftrace to be able to use type information from BTF instead of parsing headers? I suppose this support should be added to iovisor/bcc first, and then leverage it from there?

I imagine that a lot of the code in clang_parser would need to be replaced with calls to get the information from btf instead of relying on clang to parse headers for us.

For issues like #329, I think that this would allow for a more reliable struct navigation of the task_struct, and this (should) effectively allow bpftrace to handle structs with #ifdefs on members, where we can otherwise not correctly/reliably calculate field offsets.

Should this issue be filed against bcc instead? Is anyone aware of work going on in this area?

@brendangregg
Copy link
Contributor

Yes, I believe @yonghong-song is working on it for bcc, and once we have it all working on bcc we can adopt it in bpftrace too.

@mmarchini mmarchini added enhancement New feature or request, changes on existing features bcc labels Feb 8, 2019
@fbs
Copy link
Contributor

fbs commented Nov 7, 2019

Fixed by #734

@fbs fbs closed this as completed Nov 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request, changes on existing features
Projects
None yet
Development

No branches or pull requests

4 participants