RFR(s): 8145312: CMS: There is insufficient memory with CMSSamplingGrain=1 (original) (raw)
sangheon sangheon.kim at oracle.com
Tue Mar 8 22:15:39 UTC 2016
- Previous message (by thread): RFR(s): 8145312: CMS: There is insufficient memory with CMSSamplingGrain=1
- Next message (by thread): RFR(s): 8145312: CMS: There is insufficient memory with CMSSamplingGrain=1
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Jon, Thanks for the review!
Sangheon
On 03/08/2016 02:02 PM, Jon Masamitsu wrote:
On 3/8/2016 11:47 AM, sangheon wrote: Hi Jon,
Thanks for reviewing this. concurrentMarkSweepGeneration.cpp: line 606 edenchunkcapacity = (younggen->maxcapacity() + CMSSamplingGrain) / CMSSamplingGrain; If CMSSamplingGrain is larger than 'maxuintx - younggen->maxcapacity()', it will make an overflow. FYI, 'edenchunkcapacity' is 'sizet' and 'CMSSamplingGrain' is 'uintx' Ok. Changes look good then. Jon
Thanks, Sangheon
On 03/08/2016 11:20 AM, Jon Masamitsu wrote: Sangheon, http://cr.openjdk.java.net/~sangheki/8145312/webrev.00/src/share/vm/runtime/commandLineFlagConstraintsGC.cpp.frames.html
456 if (value > maxuintx - maxcapacity) { 457 CommandLineError::print(verbose, 458 "CMSSamplingGrain (" UINTXFORMAT ") must be " 459 "less than or equal to ergonomic maximum (" SIZEFORMAT ")\n", 460 value, maxuintx - maxcapacity); How did you decide to use the test "value > maxuintx - maxcapacity"? Jon On 3/8/2016 12:00 AM, sangheon wrote: Hi all, Could I have some reviews for CMSSamplingGrain flag? The flag is used to calculate points at which the young gen should be partitioned for doing parallel work, so it only makes sense to partition at a granularity equal to or larger than the object size. I am proposing to change the minimum value of CMSSamplingGrain from '1' to 'ObjectAlignmentInBytes'. (ObjectAlignmentInBytes has a range of [8, 256]). In addition, I added a constraint function to avoid an arithmetic overflow by its maximum value. CR: https://bugs.openjdk.java.net/browse/JDK-8145312 Webrev: http://cr.openjdk.java.net/~sangheki/8145312/webrev.00/ Testing: JPRT, RBT for all platforms including embedded Thanks, Sangheon
- Previous message (by thread): RFR(s): 8145312: CMS: There is insufficient memory with CMSSamplingGrain=1
- Next message (by thread): RFR(s): 8145312: CMS: There is insufficient memory with CMSSamplingGrain=1
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]