]> git.baikalelectronics.ru Git - kernel.git/commit
tools/power turbostat: Allow -e for all names.
authorZephaniah E. Loss-Cutler-Hull <zephaniah@gmail.com>
Tue, 5 Oct 2021 04:54:38 +0000 (21:54 -0700)
committerLen Brown <len.brown@intel.com>
Sun, 17 Apr 2022 01:58:15 +0000 (21:58 -0400)
commit503b43adedb6d9674749bc6d9c31cd998763ca49
treed7a7756d012cfc6e9c05231994c236289488b0df
parentdbc86a511e650cd17488bb1a536a48e611c9fc50
tools/power turbostat: Allow -e for all names.

Currently, there are a number of variables which are displayed by
default, enabled with -e all, and listed by --list, but which you can
not give to --enable/-e.

So you can enable CPU0c1 (in the bic array), but you can't enable C1 or
C1% (not in the bic array, but exists in sysfs).

This runs counter to both the documentation and user expectations, and
it's just not very user friendly.

As such, the mechanism used by --hide has been duplicated, and is now
also used by --enable, so we can handle unknown names gracefully.

Note: One impact of this is that truly unknown fields given to --enable
will no longer generate errors, they will be silently ignored, as --hide
does.

Signed-off-by: Zephaniah E. Loss-Cutler-Hull <zephaniah@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
tools/power/x86/turbostat/turbostat.c