tools/power turbostat: add built-in-counter for IPC -- Instructions per Cycle
authorLen Brown <len.brown@intel.com>
Sun, 31 Jan 2021 04:43:10 +0000 (23:43 -0500)
committerLen Brown <len.brown@intel.com>
Tue, 4 May 2021 22:23:14 +0000 (18:23 -0400)
commit2af4f9b8596afbbd7667a18fa71d117bac227dea
tree58f114fb5263ed38fd797f9c2e6791a2fa770cc6
parent9f4ad9e425a1d3b6a34617b8ea226d56a119a717
tools/power turbostat: add built-in-counter for IPC -- Instructions per Cycle

Use linux-perf to access the hardware instructions-retired counter.
This is necessary because the counter is not enabled by default,
and also the counter is prone to roll-over -- both of which
perf manages.

It is not necessary to use perf for the cycle counter,
because turbostat already needs to collect delta-aperf
to calcuate frequency.

Signed-off-by: Len Brown <len.brown@intel.com>
tools/power/x86/turbostat/turbostat.c