Commit 0ec712e3 authored by Len Brown's avatar Len Brown

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: default avatarLen Brown <len.brown@intel.com>
Cc: Prarit Bhargava <prarit@redhat.com>
parent 34041551
...@@ -4887,6 +4887,8 @@ void topology_probe() ...@@ -4887,6 +4887,8 @@ void topology_probe()
return; return;
for (i = 0; i <= topo.max_cpu_num; ++i) { for (i = 0; i <= topo.max_cpu_num; ++i) {
if (cpu_is_not_present(i))
continue;
fprintf(outf, fprintf(outf,
"cpu %d pkg %d node %d lnode %d core %d thread %d\n", "cpu %d pkg %d node %d lnode %d core %d thread %d\n",
i, cpus[i].physical_package_id, i, cpus[i].physical_package_id,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment