This page aims to provide a overview of riscv support statuses in various debug & profiling related opensource projects. We can use below table for sync up, and get aligned understanding and planning for future work.
Projects classification | Tools | Support status in upstream (2024 June) | Features to be added/enhanced | 2024 2H |
Debugger | gdb | basic support OK. no watchpoint, the gdb simulator supports just a few exts (GC) | RVV reg dump? | RVV reg dump? |
lldb | basic support OK |
|
|
OpenOCD | RFP WIP |
|
|
Perf Monitor | perf | yes, with SSCOFPMF suppoted; cycle/insnret CSR mmaped to U; based on SBI PMU | Smcdeleg (RFC sent), CTR (not ratified yet) |
|
gprof-ng |
?no, only support x86 and aarch64 | Enable gprofng in binutils-gdb build |
|
simpleperf | yes for most common events | raw events support, depending on Smcdeleg and Json config |
|
Dynamic Binary Instrumentation | valgrind | Basic RV64 GC support in Petr's tree, not yet merged in main tree | First, help to reivew/fix issues to get GC merged. Then, RVV and other extensions | help fix and improve the RV64 GC port |
dynamoRIO | Basic GC support merged. | RVV instrumentation clients | RVV instrumentation clients |
Compile-time Instrumentation | ASAN | yes | optimization with MTE (spec at early stage) |
|
MSAN | ? |
|
|
TSAN | ? |
|
|
PGO | yes |
|
|
Tracing | bpftrace | yes for most events tracing, except for HW watchpoint | HW watchpoint? Dependency on debug spec? |
|
bcc | yes |
|
|
bpf JIT | yes, with C/Zba/Zbb based optimization | more JIT optimization (e.g. Zacas, RV32, etc) |
|
ftrace | yes |
|
|
SystemTAP | ? |
|
|
Perf CI on opensource projects | LKP, etc | just build check, no function/perf test and profiling | enable function/perf CI in LKP for riscv | enable function/perf CI |