PMU Counters on Apple Silicon

19 points by ohrv


zmitchell

I’ve always wondered what the reasoning is for not documenting frameworks like this. Is it really about protecting IP? Surely it’s not a lack of resources.

olliej

I can't speak to kperf, but my experience using instruments' UI is that it is not really that clear (purely at the UI level) what "bad" events (things like mispredicts and what not) are actually important, e.g. it will report "x% of these mispredicted", but the UI makes it difficult to tell "but is that highly mispredicted thing actually responsible for significant amounts of performance loss?" e.g imagine two different functions that both have if(rand()%2), the UI does not make it clear which (if either) of those functions is actually causing more of a performance impact than the other. So while I've tried to use the tools available, I've found the UI makes it fairly opaque and hard to reason about.

There are also some other simply weird UI issues, that mean that even just getting the proportional information of anything requires click in the correct part of the correct row of numerous very similar rows, and then choosing the correct option in a drop down, that only includes the required option if you ran the correct version of the PMU based profiling mode, and as stated have selected the right version of numerous nearly identical UI elements.