tools/power turbostat: Clustered Uncore MHz counters should honor show/hide options
authorLen Brown <len.brown@intel.com>
Fri, 7 Feb 2025 03:46:24 +0000 (21:46 -0600)
committerLen Brown <len.brown@intel.com>
Fri, 7 Feb 2025 18:06:26 +0000 (12:06 -0600)
commit1c7c7388e6c31f46b26a884d80b45efbad8237b2
tree9634874c2ae87b236765c455b13271b24c7ec4ec
parent2c4627c8ced77855b106c7104ecab70837d53799
tools/power turbostat: Clustered Uncore MHz counters should honor show/hide options

The clustered uncore frequency counters, UMHz*.*
should honor the --show and --hide options.

All non-specified counters should be implicityly hidden.
But when --show was used, UMHz*.* showed up anyway:

$ sudo turbostat -q -S --show Busy%
Busy%  UMHz0.0  UMHz1.0  UMHz2.0  UMHz3.0  UMHz4.0

Indeed, there was no string that can be used to explicitly
show or hide clustered uncore counters.

Even through they are dynamically probed and added,
group the clustered UMHz*.* counters with the legacy
built-in-counter "UncMHz" for show/hide.

turbostat --show Busy%
does not show UMHz*.*.
turbostat --show UncMHz
shows either UncMHz or UMHz*.*, if present
turbostat --hide UncMHz
hides either UncMHz or UMHz*.*, if present

Reported-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Tested-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
tools/power/x86/turbostat/turbostat.8
tools/power/x86/turbostat/turbostat.c