tools/power/turbostat: Obey allowed CPUs for primary thread/core detection
authorZhang Rui <rui.zhang@intel.com>
Fri, 6 Oct 2023 01:59:14 +0000 (09:59 +0800)
committerZhang Rui <rui.zhang@intel.com>
Fri, 20 Oct 2023 02:27:09 +0000 (10:27 +0800)
commitccf8a0528061b4ca5f5c0e73c8d888e7e6d8b054
tree940693a4adae2735c3fe25fe235dd41cdec72728
parent74318add132365db3026e281ac06836a26cda857
tools/power/turbostat: Obey allowed CPUs for primary thread/core detection

Thread_id doesn't tell if a CPU is allowed or not.

Detect allowed CPUs only and use the first detected thread/core as the
primary thread/core of a core/package.

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