RFR: 8138920: Refactor the sampling thread from ConcurrentG1RefineThread
Derek White
derek.white at oracle.com
Wed Oct 21 16:37:10 UTC 2015
Hi Thomas,
On 10/21/15 6:45 AM, 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.
I thought about that, but I was concerned that
vm_shutdown_during_initialization() might eventually call back to
ConcurrentG1Refine::stop(). But after looking at it that looks impossible.
- Derek
More information about the hotspot-gc-dev
mailing list