jschwinger233 / gofuncgraph

bpf(2)-based ftrace(1)-like function graph tracer for golang processes.
MIT License
27 stars 5 forks source link

It shows error: program ent: map event_queue: map create without BTF: invalid argument #5

Open xing393939 opened 5 months ago

xing393939 commented 5 months ago

My version is:

gofuncgraph -v
Version:        v22.09.05
Git hash:       ed2f5df4fa08ad4b7c649462f6bba678b777c99a
Built:          2022-09-06T08:00:53Z
Golang version: go1.18.5
OS/Arch:        linux/amd64

My kernel is 4.19.104, does it too low? Someone says it need 5.8+.

jschwinger233 commented 5 months ago

Yes very likely. And kernel is also required to be compiled with CONFIG_DEBUG_INFO_BTF.. My personal experience is ubuntu2204 handles everything needed...

xing393939 commented 5 months ago

Thanks, I am doing the same thing with you. My tool has named gocallstack. Here is the usage if you Interested:

// installation
go install github.com/xing393939/gotools/cmd/gocallstack@latest

// this will output a web url likes "http://getlocx.net/callstack?demo=xxx"
gocallstack -p 'net/http.*' ./example

// visit the website and it would show the call stack.

My tool is depend on golang dlv, it processes very slow, I am just looking for the ebpf solution for it.