rubrikinc / wachy

A UI for eBPF-based performance debugging
https://rubrikinc.github.io/wachy/
Other
559 stars 17 forks source link

CPU architecture independent design #13

Open gitkiru opened 1 year ago

gitkiru commented 1 year ago

It is nice to have dynamic user space profiling support. Instead of resolving dependencies, another approach that could be considered is to have a light-weight agent running on-board the system streaming the data and have an external server handle the UI part, that could be web-based as well. Regular ftrace based perf tool itself can generate CPU data reports at function level, though not continuously. When combined with the debug symbol resolution and external web server/UI and possibly adding process ID based tracing, that would work out well across CPU architectures.

gitkiru commented 1 year ago

Seems to work fine on x86_64. With the current code, does the compilation work fine for ARM32 CPUs? Looking at this for an embedded Linux environment - are there build or runtime dependencies for wachy or for the bpftrace it relies on other than enabling BPF kernel config? Applications need to be recompiled with debug option though for symbols. That is another consideration for profiling in a production environment with embedded Linux. (extracting and keeping a map of debug symbols to addresses offline similar to parca, but with relatively little overhead, may help do code navigation externally?)