diff options
author | Milan Jurik <milan.jurik@xylab.cz> | 2012-02-25 00:14:04 -0800 |
---|---|---|
committer | Milan Jurik <milan.jurik@xylab.cz> | 2012-02-25 00:14:04 -0800 |
commit | b54d0971a8fbfdfacbe9451070dd10e3a56a96ae (patch) | |
tree | 59f58a7ad0836064c847c15f43db1a3b014d07b9 /usr/src | |
parent | e21ea675c9d0030463bdeb69c83449de4b9fc0f3 (diff) | |
download | illumos-joyent-b54d0971a8fbfdfacbe9451070dd10e3a56a96ae.tar.gz |
2099 powertop output hangs under heavy load
Reviewed by: Garrett D'Amore <garrett@damore.org>
Reviewed by: Dan McDonald <danmcd@nexenta.com>
Approved by: Garrett D'Amore <garrett@damore.org>
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/cmd/powertop/common/powertop.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr/src/cmd/powertop/common/powertop.c b/usr/src/cmd/powertop/common/powertop.c index c36c3a1d0a..3f54f45957 100644 --- a/usr/src/cmd/powertop/common/powertop.c +++ b/usr/src/cmd/powertop/common/powertop.c @@ -397,7 +397,8 @@ main(int argc, char **argv) * specified an interval we skip this bit and keep it fixed. */ if (g_features & FEATURE_CSTATE && !PT_ON_TIME && - g_longest_cstate > 0) { + g_longest_cstate > 0 && + g_cstate_info[g_longest_cstate].events > 0) { double deep_idle_res = (((double) g_cstate_info[g_longest_cstate].total_time/MICROSEC /g_ncpus)/g_cstate_info[g_longest_cstate].events); |