RFR: 8080106: Refactor setup of parallel GC threads

Stefan Karlsson stefan.karlsson at oracle.com
Mon May 18 12:05:17 UTC 2015


On 2015-05-15 16:51, Jon Masamitsu wrote:
>
>
> On 5/13/2015 6:17 AM, Stefan Karlsson wrote:
>> Hi all,
>>
>> Please review these patches to unify the ways we specify the number 
>> of used worker threads. The main goal for these patches is to get rid 
>> of CollectedHeap::set_par_threads() and CollectedHeap::n_par_threads().
>>
>> The RFE has been split into multiple sub-tasks:
>>  8080109: Use single-threaded code in 
>> Threads::possibly_parallel_oops_do when running with only one worker 
>> thread
>>  8080110: Remove usage of CollectedHeap::n_par_threads() from root 
>> processing
>>  8080111: Remove SubTaskDone::_n_threads
>>  8080112: Replace and remove the last usages of 
>> CollectedHeap::n_par_threads()
>>  8080113: Remove CollectedHeap::set_par_threads()
>>
>> See the description below for each individual patch:
>>
>> ---
>> [...]
>> ---
>> http://cr.openjdk.java.net/~stefank/8080111/webrev.00
>> 8080111: Remove SubTaskDone::_n_threads
>>
>> Remove the need to keep track of the number of worker threads 
>> currently executing in the sub-tasks of the root processing. Instead 
>> use the information that is already stored in StrongRootsScope.
>
> Looks good.
>
> You did remove set_num_workers().

Thanks.

>
>>
>> ---
>> http://cr.openjdk.java.net/~stefank/8080112/webrev.00
>> 8080112: Replace and remove the last usages of 
>> CollectedHeap::n_par_threads()
>>
>> Replace and remove the last usages of CollectedHeap::n_par_threads().
>>
>> The number of used threads are passed down as arguments to the 
>> functions that need to know how many threads are currently executing 
>> in parallel.
> http://cr.openjdk.java.net/~stefank/8080112/webrev.00/src/share/vm/memory/cardTableModRefBS.cpp.udiff.html 
>
>
> Maybe worth adding a comment about the "false" being passed in?
>
> +      DirtyCardToOopClosure* dcto_cl = sp->new_dcto_cl(cl, 
> precision(), cl->gen_boundary(), false);
>
> new_dcto_cl(cl, precision(), cl->gen_boundary(), false /* parallel */)
>
> +      ClearNoncleanCardWrapper clear_cl(dcto_cl, ct, false);
>
> clear_cl(dcto_cl, ct, false /* parallel */)

Fixed.

>
> Otherwise, looks good.

Thanks.

>
>
>>
>> ---
>> http://cr.openjdk.java.net/~stefank/8080113/webrev.00
>> 8080113: Remove CollectedHeap::set_par_threads()
>>
>> Remove all the calls to the set_par_threads() functions.
>
> This one is the best.

:)

>
> Looks good.

Thanks,
StefanK
>
> Jon
>
>> ---
>>
>> The combined webrev can be found at:
>> http://cr.openjdk.java.net/~stefank/8080106/webrev.00/
>>
>> Tested with JPRT and gc-test-suite
>>
>> Thanks,
>> StefanK
>




More information about the hotspot-gc-dev mailing list