Perf-like tool for RISC-V?

Hi there,

Anyone knows if there is any perf-like tools for RISC-V? Struggling in profiling the cycle count for a simple C program running on RISC-V spike simulator. Understand that Spike will not give you the actual cycle count because CPI is always 1, but always be good to have a general feeling about the algorithm.

Anyone knows if there is a similar tool?


Have you looked at “spike -g” and “spike -l”?

Yes, looked at -g option, but that option only gives you the PC histogram, and it has to be cross-referenced to the static objdump output to see the details, but I haven’t tried spike -l option.

Is there any other tool that does better job?