iovisor / iovisor/bcc

How to enable BTF support for ubuntu 20.04?

Open
#2,948 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
22.7k
Forks
4.1k
Avg merge
10d 4h
Merged PRs (30d)
3

Description

I tried to enable BTF support by rebuilding kernel with CONFIG_DEBUG_INFO_BTF=y.

The specific configuration is shown below:

Kernel version:
![image](https://user-images.githubusercontent.com/16064432/83645652-4c096780-a5e5-11ea-8c87-0aa098da1760.png)

Clang and LLVM version:
![image](https://user-images.githubusercontent.com/16064432/83645813-7e1ac980-a5e5-11ea-916f-3c17b725b485.png)
![image](https://user-images.githubusercontent.com/16064432/83645862-8a9f2200-a5e5-11ea-8f40-9ebba166aab2.png)

And /sys/kernel/btf/vmlinux exist.
![image](https://user-images.githubusercontent.com/16064432/83646120-d651cb80-a5e5-11ea-9ed9-b260e5bab8e5.png)
bpftool btf dump file /sys/kernel/btf/vmlinux format c > vmlinux.h is OK.

**However, I encouter this problem:**
![image](https://user-images.githubusercontent.com/16064432/83646391-2761bf80-a5e6-11ea-8935-7b479b9e5c8c.png)

**So actually opensnoop use kprobe and kretprobe to get the filled funcation arguments.
KFUNC and KRETFUNC are not load successfully.**

I don't know what's going wrong. Is there anybody meet similar problems? Very gratefull if you have any suggestions!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.