RFR: 8221260: Initialize more class members on construction, remove some unused ones
Kim Barrett
kim.barrett at oracle.com
Thu Mar 21 22:48:32 UTC 2019
> 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...
------------------------------------------------------------------------------
More information about the hotspot-gc-dev
mailing list