diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-11-12 00:22:56 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-11-12 00:22:56 +0100 |
commit | f57ab32a843690fe7431ebb3a2f461e689a2e3c7 (patch) | |
tree | b1316569e599668d1dd028297b569fe2ef75f651 /tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c | |
parent | f6f18a261c1748973e9aac529ed81bb4abd9f120 (diff) | |
parent | 89ba7d8c22acb43e318ca1c82e25c8b75ef7a7b2 (diff) |
Merge branch 'pm-tools'
* pm-tools:
Creating a common structure initialization pattern for struct option
cpupower: Enable disabled Cstates if they are below max latency
cpupower: Remove debug message when using cpupower idle-set -D switch
cpupower: cpupower monitor reports uninitialized values for offline cpus
tools/power turbostat: bugfix: print MAX_NON_TURBO_RATIO
tools/power turbostat: simplify Bzy_MHz calculation
Diffstat (limited to 'tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c')
-rw-r--r-- | tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c b/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c index c4bae9203a69..05f953f0f0a0 100644 --- a/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c +++ b/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c @@ -143,6 +143,9 @@ void print_results(int topology_depth, int cpu) /* Be careful CPUs may got resorted for pkg value do not just use cpu */ if (!bitmask_isbitset(cpus_chosen, cpu_top.core_info[cpu].cpu)) return; + if (!cpu_top.core_info[cpu].is_online && + cpu_top.core_info[cpu].pkg == -1) + return; if (topology_depth > 2) printf("%4d|", cpu_top.core_info[cpu].pkg); @@ -191,7 +194,8 @@ void print_results(int topology_depth, int cpu) * It's up to the monitor plug-in to check .is_online, this one * is just for additional info. */ - if (!cpu_top.core_info[cpu].is_online) { + if (!cpu_top.core_info[cpu].is_online && + cpu_top.core_info[cpu].pkg != -1) { printf(_(" *is offline\n")); return; } else @@ -388,6 +392,9 @@ int cmd_monitor(int argc, char **argv) return EXIT_FAILURE; } + if (!cpu_top.core_info[0].is_online) + printf("WARNING: at least one cpu is offline\n"); + /* Default is: monitor all CPUs */ if (bitmask_isallclear(cpus_chosen)) bitmask_setall(cpus_chosen); |