RFR: 8080106: Refactor setup of parallel GC threads

Stefan Karlsson stefan.karlsson at oracle.com
Mon May 18 11:20:31 UTC 2015



On 2015-05-14 19:03, Kim Barrett wrote:
> On May 13, 2015, at 11:01 PM, Kim Barrett <kim.barrett at oracle.com> wrote:
>> On May 13, 2015, at 9:17 AM, Stefan Karlsson <stefan.karlsson at oracle.com> 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:
>> Thanks for breaking this up into multiple webrevs.
>>
>> I'm only part way through; I haven't looked at the webrev for 8080113
>> yet.  Here's what I've got so far.
> And here are my 8080113 comments:
>
> ==============================================================================
> http://cr.openjdk.java.net/~stefank/8080113/webrev.00
> 8080113: Remove CollectedHeap::set_par_threads()
>
> ------------------------------------------------------------------------------
> src/share/vm/gc_implementation/g1/concurrentMark.cpp
> 2001   uint n_workers = _g1h->workers()->active_workers();
> ...
> 2042   G1ParNoteEndTask g1_par_note_end_task(g1h, &_cleanup_list, n_workers);
>
> With the various cleanups, the declaration of n_workers is now a long
> way from its first use.

Moved.

>
> ------------------------------------------------------------------------------
>
>> ==============================================================================
>> http://cr.openjdk.java.net/~stefank/8080112/webrev.00
>> 8080112: Replace and remove the last usages of CollectedHeap::n_par_threads()
>>
>> […]
>> ------------------------------------------------------------------------------
>> src/share/vm/gc_interface/collectedHeap.hpp
>> 294   virtual void set_par_threads(uint t) { (void)t; };
>>
>> The "standard" way to ignore a parameter is to not name it, e.g.
>>
>>   virtual void set_par_threads(uint /* t */) { }
>>
>> Pre-existing defect: The trailing semi-colon isn't needed.
> And none of this matters, since the offending function will be removed in 8080113.

Thanks!

StefanK
>




More information about the hotspot-gc-dev mailing list