summaryrefslogtreecommitdiff
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:20:00 +0300
commit354d5a345b910fc0d4b74f0f7bec1bc6e7b6ea42 (patch)
tree68033eceac390e1cd82bc76bf80fe3c244915bef
parent6e9261aac3d8216563647e0c671750783ccf1993 (diff)
downloadlinux-354d5a345b910fc0d4b74f0f7bec1bc6e7b6ea42.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>
-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 9664b1ff4285..6e22798a367d 100644
--- a/tools/power/x86/turbostat/turbostat.c
+++ b/tools/power/x86/turbostat/turbostat.c
@@ -733,9 +733,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;