RFR: 8080879: Remove AbstractGangTask::set_for_termination

Stefan Karlsson stefan.karlsson at oracle.com
Mon May 25 08:47:05 UTC 2015


On 25/05/15 10:40, Per Liden wrote:
> On 2015-05-22 16:19, Stefan Karlsson wrote:
>> Hi all,
>>
>> AbstractGangTask::set_for_termination(uint active_workers) is a virtual
>> function that sub-classes can override to run setup code before the task
>> is started. The active_workers parameter tells the task how many workers
>> are going to execute the task.
>>
>> Only a few tasks use this infrastructure and most tasks run the setup
>> code in the constructor or before the task is constructed. There is no
>> place where we construct a FlexibleGangTask task, change the number of
>> active workers, and then start the task. The tasks are always started
>> near the construction site. So, I propose that we get rid of
>> AbstractGangTask::set_for_termination to shrink the AbstractGangTask 
>> API.
>>
>> I didn't want to change how the CMS worker threads are started, so I
>> moved AbstractGangTask::set_for_termination to YieldingFlexibleGangTask.
>>
>> http://cr.openjdk.java.net/~stefank/8080879/webrev.00/
>> https://bugs.openjdk.java.net/browse/JDK-8080879
>
> Looks good. 

Thanks.

> Just one thing, could we move the reset() call out of 
> ParScanThreadStateSet::ParScanThreadStateSet() and call it explicitly, 
> when ParNewGenTask is used? I.e. similar to how it's done when 
> ParNewRefProcTaskProxy is used.

Yes, sounds good to me.

StefanK

>
> /Per
>
>>
>> Thanks,
>> StefanK



More information about the hotspot-gc-dev mailing list