bpf(2)-based ftrace(1)-like function graph tracer for Golang processes.
Limits:
.symtab
ELF section and.(z)debug_info
is required;- Running on x86-64 little-endian Linux only;
- Kernel version has to support bpf(2) and uprobe;
example: trace a specific function in etcd client "go.etcd.io/etcd/client/v3/concurrency.(*Mutex).tryAcquire"
gofun ./bin 'go.etcd.io/etcd/client/v3/concurrency.(*Mutex).tryAcquire'
example: trace all functions in etcd client
gofun ./bin 'go.etcd.io/etcd/client/v3/*'
example: trace a specific function and include runtime.chan* builtins
gofun ./bin 'go.etcd.io/etcd/client/v3/concurrency.(*Mutex).tryAcquire' 'runtime.chan*'
example: trace a specific function with some arguemnts
gofun ./bin 'go.etcd.io/etcd/client/v3/concurrency.(*Mutex).tryAcquire(pfx=+0(+8(%ax)):c512, n_pfx=+16(%ax):u64, m.s.id=16(0(%ax)):u64)'
- Wall time profiling;
- Execution flow observing;