summaryrefslogtreecommitdiff
path: root/tools/power
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2018-07-20 21:47:03 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-09-05 10:16:20 +0300
commit944dbf3b36cffd8d180c46545a5e5dc66f360d72 (patch)
tree7485c75d744c11aa271f90432a99f7ef19d52b47 /tools/power
parent2b8e010e3a0c12e88adad7017f03aefd9532d2e3 (diff)
downloadlinux-944dbf3b36cffd8d180c46545a5e5dc66f360d72.tar.xz
tools/power turbostat: fix -S on UP systems
[ Upstream commit 9d83601a9cc1884d1b5706ee2acc661d558c6838 ] 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>
Diffstat (limited to 'tools/power')
-rw-r--r--tools/power/x86/turbostat/turbostat.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c
index 5b1b807265a1..195ddd950ba2 100644
--- a/tools/power/x86/turbostat/turbostat.c
+++ b/tools/power/x86/turbostat/turbostat.c
@@ -605,9 +605,7 @@ void format_all_counters(struct thread_data *t, struct core_data *c, struct pkg_
if (!printed || !summary_only)
print_header();
- if (topo.num_cpus > 1)
- format_counters(&average.threads, &average.cores,
- &average.packages);
+ format_counters(&average.threads, &average.cores, &average.packages);
printed = 1;