RFR: 8221260: Initialize more class members on construction, remove some unused ones

Leo Korinth leo.korinth at oracle.com
Fri Mar 22 19:09:57 UTC 2019


Thanks for your reviews Kim and Thomas,

I will fix your suggestions and push next week.

/Leo

On 22/03/2019 13:10, Thomas Schatzl wrote:
> On Thu, 2019-03-21 at 18:48 -0400, Kim Barrett wrote:
>>> On Mar 21, 2019, at 3:33 PM, Leo Korinth <leo.korinth at oracle.com>
>>> wrote:
>>>
>>> Hi,
>>>
>>> This is a code cleanup. This change removes some warnings when
>>> opening the files from within Eclipse.
>>>
>>> I try to:
>>> - Initialize more class members as soon as possible
>>> - Remove some (5) unused members, and one unused faulty constructor
>>> - Prefer to use initializer list instead of constructor body
>>>
>>> Enhancement:
>>> https://bugs.openjdk.java.net/browse/JDK-8221260
>>>
>>> Webrev:
>>> http://cr.openjdk.java.net/~lkorinth/8221260/00
>>>
>>> Testing:
>>> Mach5 tier1-3
>>>
>>> Thanks,
>>> Leo
>>
>> Having wasted way too many hours debugging unitialized data members,
>> I'm in favor of this sort of thing.  Looks good, other than a couple
>> minor things below for which I don't need a new webrev.
>>
>> Nice find: PSFileBackedVirtualSpace constructor.  I was trying to
>> figure out how this even compiled pre-C++11 delegating constructors,
>> and then realized that was a curly-brace and not a colon.
>>
>> -------------------------------------------------------------------
>> -----------
>> src/hotspot/share/gc/parallel/psMarkSweepDecorator.hpp
>> 59     _allowed_dead_ratio(allowed_dead_ratio){ }
>>
>> Add a space before the curly-brace.
>>
>> -------------------------------------------------------------------
>> -----------
>> src/hotspot/share/gc/parallel/psParallelCompact.cpp
>> 410 #ifdef  ASSERT
>> 411   _region_end(NULL),
>> 412 #endif  // #ifdef ASSERT
>>
>> This can be done more compactly as
>>
>>    DEBUG_ONLY(_region_end(NULL) COMMA)
>>
>> Your choice...
>>
>> -------------------------------------------------------------------
>> -----------
> 
>    looks good with Kim's suggestions.
> 
> Thomas
> 


More information about the hotspot-gc-dev mailing list