perf trace and BTF
- Mentors
- Ian, Namhyung Kim, Arnaldo Carvalho de Melo
- Organization
- The Linux Foundation
- Technologies
- c, linux, ebpf, c programming, BPF
- Topics
- operating systems, Performance Analysis
Background:
perf trace is similar to strace but much performant since it doesn't use ptrace. So it needs to capture and understand the format of syscall arguments as strace does. Right now, it has to build a list of format to pretty-print the syscall args. But we find it limited and manual work. Instead, it could use BTF (BPF type format) which has all the type information and is available in the (most) kernel.
Deliverables:
1. A new method of fetching augmented argument data.
2. Implementation of an auto-generated beauty map that stores the type and size of augmented syscall
argument, based on BTF.
3. eBPF side augmented argument caching refactoring.
4. Pretty print feature to visualize data from struct pointer, char* string, etc, using BTF.
5. New sets of command line arguments to control pretty printing.