-
Notifications
You must be signed in to change notification settings - Fork 94
Add support of gcc BPF backend #89
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
Conversation
|
Thank you for your pull request and welcome to our community! To contribute, please sign the Oracle Contributor Agreement (OCA).
To sign the OCA, please create an Oracle account and sign the OCA in Oracle's Contributor Agreement Application. When signing the OCA, please provide your GitHub username. After signing the OCA and getting an OCA approval from Oracle, this PR will be automatically updated. If you are an Oracle employee, please make sure that you are a member of the main Oracle GitHub organization, and your membership in this organization is public. |
|
These appear to be what the gcc bpf backend is throwing warnings about: Here are the files grepped from project root: Let me know how I can help with this! 😃 |
|
Thank you for signing the OCA. |
alan-maguire
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks great, thanks Brian! We'll work on resolving the CO-RE related warnings later.
|
your efforts are greatly appreciated, thanks Brian! On the subject of the warnings, the push attribute for Compile Once, Run Everywhere (CO-RE) is in the bpftool-generated vmlinux files as you've observed. That attribute is not supported in gcc so there are efforts upstream to support a gcc-friendly vmlinux.h generation. That said, gcc-bpf does support CO-Re so I think we should be able to get BTF relocations to work regardless. I suggest we regenerate our vmlinux.h files once the upstream efforts are complete. |
|
Ok, got it! Thank you for getting back to the PR so quickly. That was awesome. I will look into what the upstream situation is and see if I can get clarity on options available for |
|
thanks for working on this! see this thread for more on the bpftool stuff: https://lore.kernel.org/bpf/[email protected]/ |
Hey, Alan.
Thanks for all the work on bpftune (and your informative talks on BTF 😄 ).
I wanted to begin the process of porting
bpftuneto support the BPF backend for gcc.I started with the Makefile(s).
On my fork, you can:
It compiles successfully (and throws warnings due to ignoring unkown clang #pragmas).
Then you can run
bpftunein legacy mode:Below are the specifications for the machine I am testing on.
I use upstream Debian for my work as much as possible:
I was wondering how I could help
bpftunesupport the gcc backend for BPF and getbpftuneto work "fully" out of the box with it.