Debug and Profiling - Status of Opensource Projects

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 classificationToolsSupport status in upstream (2024 June)Features to be added/enhanced2024 2H
Debuggergdbbasic support OK. no watchpoint, the gdb simulator supports just a few exts (GC)

RVV reg dump? and dump of FP16/BF16

HW breakpoint and watchpoint

RVV reg dump, and dump of FP16/BF16.

HW breakpoint and watchpoint

lldbbasic support OK, how about advanced features???
OpenOCDRFP WIP

Perf Monitorperfyes, with SSCOFPMF suppoted; cycle/insnret CSR mmaped to U; based on SBI PMUSmcdeleg (RFC sent), CTR (not ratified yet)
gprof-ngno, only support x86 and aarch64priority?
simpleperfyes for most common eventsraw events support, depending on Smcdeleg and Json config
Dynamic Binary InstrumentationvalgrindBasic RV64 GC support in Petr's tree, not yet merged in main treeFirst, help to reivew/fix issues to get GC merged. Then, RVV and other extensionshelp fix and improve the RV64 GC port
dynamoRIOBasic GC support merged.RVV instrumentation clientsRVV instrumentation clients
Compile-time InstrumentationASANyesoptimization with MTE (spec at early stage)
MSAN?

TSAN?

PGOyes

SW Tracingbpftraceyes for most events tracing, except for HW watchpointHW watchpoint? Dependency on debug spec?
bccyes

bpf JITyes, with C/Zba/Zbb based optimizationmore JIT optimization (e.g. Zacas, RV32, etc)
ftraceyes

SystemTAP?

Perf CI on opensource projectsLKP, etcjust build check, no function/perf test and profilingenable function/perf CI in LKP for riscvenable function/perf CI
HW tracingsomething like Tarmacno project exists yet