summaryrefslogtreecommitdiff
path: root/tools/power
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2018-09-22 05:26:57 +0300
committerLen Brown <len.brown@intel.com>2018-11-02 21:06:31 +0300
commit0ec712e36c1d5bafe6e65e53a19f136b778866cd (patch)
tree1aced6c00ca36a91cda44fe2ae30010f12ca3af8 /tools/power
parent3404155190ce09a1e5d8407e968fc19aac4493e3 (diff)
downloadlinux-0ec712e36c1d5bafe6e65e53a19f136b778866cd.tar.xz
tools/power turbostat: reduce debug output
A recent turbostat release increased topo.max_cpu_num to make it convenient to handle sysfs bitmaps of 32-cpus. But users, who regularly make use of "--debug", then saw a bunch of output for cpus that were not present. Remove that extra output by checking a cpu is online before dumping its info. Signed-off-by: Len Brown <len.brown@intel.com> Cc: Prarit Bhargava <prarit@redhat.com>
Diffstat (limited to 'tools/power')
-rw-r--r--tools/power/x86/turbostat/turbostat.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c
index 092853123ddb..772cf554b6d2 100644
--- a/tools/power/x86/turbostat/turbostat.c
+++ b/tools/power/x86/turbostat/turbostat.c
@@ -4887,6 +4887,8 @@ void topology_probe()
return;
for (i = 0; i <= topo.max_cpu_num; ++i) {
+ if (cpu_is_not_present(i))
+ continue;
fprintf(outf,
"cpu %d pkg %d node %d lnode %d core %d thread %d\n",
i, cpus[i].physical_package_id,