changeset 10836:d373f2a78647

8152180: SIGFPE in CMSCollector::preclean with big CMSScheduleRemarkSamplingRatio Summary: Rephrased the calculation routine to avoid an overflow for CMSScheduleRemarkSamplingRatio Reviewed-by: jwilhelm, drwhite
author sangheki
date Thu, 07 Apr 2016 15:33:25 -0700
parents 62c366d44b74
children fb0e13a7eb35
files src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp	Thu Apr 07 21:24:12 2016 +0000
+++ b/src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp	Thu Apr 07 15:33:25 2016 -0700
@@ -3598,7 +3598,7 @@
     size_t capacity = get_eden_capacity();
     // Don't start sampling unless we will get sufficiently
     // many samples.
-    if (used < (capacity/(CMSScheduleRemarkSamplingRatio * 100)
+    if (used < (((capacity / CMSScheduleRemarkSamplingRatio) / 100)
                 * CMSScheduleRemarkEdenPenetration)) {
       _start_sampling = true;
     } else {