Re: mcycle behavior during stalled wfi
mcycle is considered part of the HPM facility.toggle quoted messageShow quoted text
If the clock to the core is not running, mcycle does not need to increment.
If part of the core is being clocked (including just mcycle), then mcycle can increment.
Sometimes mcycle counter hardware will also be used to implement mtime, in which case might not want it to stop incrementing during WFI if it’s providing timer interrupt.
The spec allows either interpretation.
The intended use of mcycle is for timing short runs of code with low overhead and high fidelity., and for combining with other HPM values for analysis of code performance.
mtime should be used for wall-clock timing, and might have higher overhead and possibly lower fidelity.