-
Notifications
You must be signed in to change notification settings - Fork 854
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
Enable kernel headers for eBPF tools. #7437
Comments
Thanks for the suggestion, taking a look at adding this. |
I should probably create another ticket, but your releases could also include the perf binary pinned to Microsoft's WSL2 kernel build. I know WSL2 hasn't exposed all the hardware counters yet - but at least you wouldn't have to build from source yourself, and there would be eyeballs on missing features. @acmel I haven't seen your LCPC talk but I linked it - seems perf itself will need ebpf support? https://www.youtube.com/watch?v=q-LJ32BCiSQ&t=5726s |
perf probably was the first tool to link with libbpf, for 'perf trace', nowadays, besides that, it also uses BPF skels, as mentioned in my talk. |
@arcamelo can you point me to the list of kernel config settings that the latest perf needs? I didn't see it when browsing the docs: https://github.com/torvalds/linux/tree/master/tools/perf/Documentation |
@chadbrewbaker does it make more sense to enable CONFIG_DEBUG_INFO_BTF, instead of using the kernel headers provided by CONFIG_IKHEADERS, as mentioned in this blog post? |
I vote for BTF debuginfo too. |
After reading some more, the benefit of going the BTF and CO-RE route is that we aren't going to break BTF binaries in the process of performing a stable kernel update (5.10.43 -> 5.10.60) or, even more likely, when doing a major kernel version update (5.10.60 -> 5.16.8). There may be other valid reasons to enable CONFIG_IKHEADERS in the WSL2 kernel but CONFIG_DEBUG_INFO_BTF seems like the better choice for eBPF tools. |
I will test it tonight. @SeanHeelan might have more input. |
We've enabled BTF support in 5.10.74.3. |
Is your feature request related to a problem? Please describe.
Kernel headers are turned off Microsoft/config-wsl which barfs eBPF tracing tools:
# CONFIG_IKHEADERS is not set
should be
Describe the solution you'd like
Enable the flag so Prodfiler and bccutils work.
Describe alternatives you've considered
You can build your own kernel, but this should be a default for non-technical users.
Additional context
I tested on https://github.com/microsoft/WSL2-Linux-Kernel/releases/tag/linux-msft-wsl-5.10.43.3 and it seems to work.
@tyhicks if you were doing a build for Linux Plumbers Conf next week, please include this :)
The text was updated successfully, but these errors were encountered: