VisionFive SiFive programmable hardware event counters

Hello,

Is there any known working best known method or recipe to bring out the hardware performance counters listed in the u74 sifive manual? I have a visionfive platform, and my goal is to have ‘perf’ tool pull out hardware performance counters while running benchmarks, but the distro I downloaded from ubuntu has linux kernel 5.17, and this kernel does not seem to support the changes needed (is there something like a .img I can try that will enable these, am I using a stale release?). I’ve tried to pull patches and what not, but no avail. Has anyone successfully been able to bring out these counters? I am very new to linux development so it has been challenging.

Thanks in advance!

Something like the following:

The VisionFive is not a HiFive Unmatched, go ask in the RVspace forums. Though I can tell you that 5.17 is too old for RISC-V: Add perf platform driver based on SBI PMU extension · torvalds/linux@e999143 · GitHub (you can see from the tags the initial perf driver was merged for 5.18).

1 Like