[PATCH] JDK-8176571: Fine bitmaps should be allocated as belonging to mtGC

Thomas Schatzl thomas.schatzl at oracle.com
Fri Jun 16 10:23:54 UTC 2017


On Wed, 2017-06-14 at 13:48 -0400, Kim Barrett wrote:
> > 
> > On Jun 14, 2017, at 9:59 AM, Milan Mimica <Milan.Mimica at infobip.com
> > > wrote:
> > > 
> > > I also uploaded a webrev for JDK-8176571 based on the above to
> > > http://cr.openjdk.java.net/~tschatzl/8176571/webrev
> > > 
> > > Looks good to me too, but is there a reason to not use default
> > > parameters for the CHeapBitmap constructors?
> > I'd rather somehow make the argument mandatory, to force people to
> > choose a memory category.
> I would support making the argument mandatory.  All non-test callers
> are presently in g1, and are already being touched to change them to
> explicitly use mtGC, so would not be affected by such a change.  But
> there are some callers in test_bitMap and test_bitMap_search native
> tests that would need to be fixed.

I would not block such an idea. The user of the bitmap should know what
it is going to be used for :)

However the tests heavily use templates to test all types of bitmaps,
so they expect the constructors to be the same. The best I could come
up to make this would be having a test private wrapper class for
CHeapBitmap that adds mtInternal to the constructor automatically - and
use that one for CHeapBitmap tests.

I am sure you C++ wizards immediately find something better though :)

Not sure if it is worth the effort, but feel free to convince me with a
changeset :)

Otherwise I just recommend using a default mtInternal value for the
MEMFLAGS parameter instead of the manual constructor duplication.

Note that we still have some time, as Milan's name does not show up on
the OCA signatory list yet (http://www.oracle.com/technetwork/community


More information about the hotspot-gc-dev mailing list