RFR: 8138920: Refactor the sampling thread from ConcurrentG1RefineThread
Per Liden
per.liden at oracle.com
Wed Oct 21 10:58:33 UTC 2015
Hi,
On 2015-10-21 12:45, Thomas Schatzl wrote:
> Hi,
>
> On Wed, 2015-10-21 at 12:42 +0200, Per Liden wrote:
>> Hi Derek,
>>
>> On 2015-10-20 21:56, Derek White wrote:
>>> 4th Webrev for review please:
>>>
>>> This version includes the cleanups suggested by Per.
>>>
>>> RFE: JDK-8138920 <https://bugs.openjdk.java.net/browse/JDK-8138920>
>>> Refactor the sampling thread from ConcurrentG1RefineThread
>>>
>>> Webrev: http://cr.openjdk.java.net/~drwhite/8138920/webrev.04/
>>
>>
>> Looks good over all. Just a few minor things I noticed.
>>
>> concurrentG1Refine.cpp
>> ----------------------
>>
>> 92 vm_shutdown_during_initialization("Could not create
>> ConcurrentSampleThread");
>>
>> Should be "G1YoungListSampleThread" now.
>>
>> 160 void ConcurrentG1Refine::print_worker_threads_on(outputStream* st)
>> const {
>> 161 for (uint i = 0; i < _n_worker_threads; ++i) {
>> 162 _threads[i]->print_on(st);
>> 163 st->cr();
>> 164 }
>> 165 _sample_thread->print_on(st);
>> 166 st->cr();
>>
>> You didn't introduce this, but shouldn't there be a if (_threads !=
>> NULL) here around this, similar to the other functions which access
>> _threads?
>
> Actually I think all the _threads != NULL checks could go away. We
> terminate the VM if we cannot initialize any threads.
Good point Thomas. Removing all the if:s would be even better.
/Per
More information about the hotspot-gc-dev
mailing list