hi
Once a @dehydratedpotato. I miss the days of C macros you could barely read.
Pinned Loading
-
Using XCPM to sample P-States on Int...
Using XCPM to sample P-States on Intel Macs 1This is a demonstration on a simple way you can get CPU P-State distribution, turbo states, and average package frequency on Intel Macs by accessing the XCPM (XNU CPU Power Manager) through `ioctl`.
23I figured it out while reverse engineering the x86 portion of [powermetrics](https://ss64.com/mac/powermetrics.html) and managed to find the function pointers [here](https://github.com/acidanthera/CPUFriend/blob/30c773385312b4b46255d9432aacf02c91fece4e/Tools/FrequencyVectors.bt#L123). Structures recreated from scratch.
45Sadly requires root (as does everything of this nature on Intel). This only works on Haswell or newer though (no XCPM before then).
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.