Skip to content

Commit

Permalink
tools/power turbostat: fix -S on UP systems
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Len Brown committed Jul 20, 2018
1 parent 32e7024 commit 9d83601
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tools/power/x86/turbostat/turbostat.c
Original file line number Diff line number Diff line change
Expand Up @@ -1163,9 +1163,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;

Expand Down

0 comments on commit 9d83601

Please sign in to comment.