RFR: 8138920: Refactor the sampling thread from ConcurrentG1RefineThread

Derek White derek.white at oracle.com
Wed Oct 21 16:53:18 UTC 2015


FYI,

Pre rev 1111, there used to be a G1ConcRefine flag that enabled/disable 
concurrent refinement. If disabled, the ConcurrentG1Refine object was 
created but _threads was NULL.

So that explains that.

Now maybe we want to resurrect the G1ConcRefine flag :-)

  - Derek

On 10/21/15 12:37 PM, Derek White wrote:
> 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:
>>> ...
>>>    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