1
0
Fork 0

tools/power turbostat: fix -S on UP systems

[ Upstream commit 9d83601a9c ]

The -S (system summary) option failed to print any data on a 1-processor system.

Reported-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
pull/10/head
Len Brown 2018-07-20 14:47:03 -04:00 committed by Greg Kroah-Hartman
parent 10ca6b3f92
commit a10170d94e
1 changed files with 1 additions and 3 deletions

View File

@ -1038,9 +1038,7 @@ void format_all_counters(struct thread_data *t, struct core_data *c, struct pkg_
if (!printed || !summary_only)
print_header("\t");
if (topo.num_cpus > 1)
format_counters(&average.threads, &average.cores,
&average.packages);
format_counters(&average.threads, &average.cores, &average.packages);
printed = 1;