tools/power turbostat: Introduce add_msr_counter()
authorZhang Rui <rui.zhang@intel.com>
Sat, 17 May 2025 07:58:51 +0000 (15:58 +0800)
committerLen Brown <len.brown@intel.com>
Sun, 8 Jun 2025 18:10:16 +0000 (14:10 -0400)
commit1ab2e19b4c52ee08700938d52024d85bd15c9721
tree5e9a3fe29633be758b17e32438a99e479267fd18
parent3403e89f97ce71e473a5128ea389cb83bc27e7a9
tools/power turbostat: Introduce add_msr_counter()

probe_rapl_msr() is reused for probing RAPL MSR counters, cstate MSR
counters and MPERF/APERF/SMI MSR counters, thus its name is misleading.

Similar to add_perf_counter(), introduce add_msr_counter() to probe a
counter via MSR. Introduce wrapper function add_rapl_msr_counter() at
the same time to add extra check for Zero return value for specified
RAPL counters.

No functional change intended.

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