diff options
author | Saket Kumar Bhaskar <skb99@linux.vnet.ibm.com> | 2022-11-23 11:22:08 +0300 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2022-11-25 20:50:04 +0300 |
commit | 5975e2558e2dea7ef35fbb1a29613e1c176bd190 (patch) | |
tree | da16f5123c3513ff9eb37874e030bc3757cd566c /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 9abf2313adc1ca1b6180c508c25f22f9395cc780 (diff) | |
download | linux-5975e2558e2dea7ef35fbb1a29613e1c176bd190.tar.xz |
tools/cpupower: Choose base_cpu to display default cpupower details
The default output of cpupower info utils shows unexpected output
when CPU 0 is disabled.
Considering a case where CPU 0 is disabled, output of cpupower idle-info:
Before change:
cpupower idle-info
CPUidle driver: pseries_idle
CPUidle governor: menu
analyzing CPU 0:
*is offline
After change:
./cpupower idle-info
CPUidle driver: pseries_idle
CPUidle governor: menu
analyzing CPU 50:
Number of idle states: 2
Available idle states: snooze CEDE
snooze:
Flags/Description: snooze
Latency: 0
Usage: 101748
Duration: 2724058
CEDE:
Flags/Description: CEDE
Latency: 12
Usage: 270004
Duration: 283019526849
If -c option is not passed, CPU 0 was chosen as the default chosen CPU to
display details. However when CPU 0 is offline, it results in showing
unexpected output. This commit chooses the base_cpu
instead of CPU 0, hence keeping the output more relevant in all cases.
The base_cpu is the number of CPU on which the calling thread is
currently executing.
Signed-off-by: Saket Kumar Bhaskar <skb99@linux.vnet.ibm.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions