Request for Review (M) - 8150994: UseParallelGC fails with UseDynamicNumberOfGCThreads with specjbb2005

Jon Masamitsu jon.masamitsu at oracle.com
Fri Apr 29 22:49:02 UTC 2016


Kim,

Thanks for the review.

On 4/29/2016 2:41 PM, Kim Barrett wrote:
>> On Apr 12, 2016, at 11:50 PM, Jon Masamitsu <jon.masamitsu at oracle.com> wrote:
>>
>> The ParallelGC collector compacts by moving live objects from source
>> regions to destination regions.  The destination regions are regions that have
>> been emptied of live objects and the source regions are regions that hold
>> the original locations of the live objects.  When a source region is emptied,
>> it becomes a destination region.  At the start of the compaction the
>> destination regions are distributed to per thread lists processed by the GC
>> workers.   The original implementation had tasks that drain the initial
>> destination lists and tasks that steal destination regions from other
>> GC workers.  The draining tasks and stealing tasks shared the per thread
>> lists of destination regions.  The bug was that the sharing was not
>> synchronized correctly.
>>
>> See [1] for more details.
>>
>> The fix is to combine the draining tasks and stealing tasks so that
>> sharing of the destination lists is not needed.
>>
>> [1] https://bugs.openjdk.java.net/browse/JDK-8150994
>>
>> [2] http://cr.openjdk.java.net/~jmasa/8150994/webrev.00/
>>
>> Thanks.
>>
>> Jon
> Looks good.
>
> ------------------------------------------------------------------------------
> src/share/vm/gc/parallel/psParallelCompact.cpp
> 2248         if (++which == parallel_gc_threads) {
> 2249           assert(which <= parallel_gc_threads,
>
> The comparison on 2248 was changed from task_count (which no longer
> exists) to parallel_gc_threads, thereby guaranteeing the asserted
> condition.
>
> ------------------------------------------------------------------------------
Yes, I shall delete the assertion.  Thanks for catching that. Leaving 
the assertion there
would be terribly misleading.

Jon





More information about the hotspot-gc-dev mailing list