RFR: 8161604: TestNewSizeFlags fails with RuntimeException: max new size != MaxNewSize value
Michail Chernov
michail.chernov at oracle.com
Thu Jul 28 13:24:03 UTC 2016
Hi Sangheon,
>> Thanks you for reviewing this. I'm no sure that explanations are
>> needed in whitebox.cpp. I added the throwing of RuntimeException if
>> we try to invoke Parallel GC specific methods when use not Parallel
>> GC. Exception is more clear than 0 that was returned from methods.
> I meant adding the explanation near "private static final long
> PS_VIRTUAL_SPACE_ALIGNMENT = WB.psVirtualSpaceAlignment();" in
> TestNewSizeFlags.java. Because someone would be strange as we are
> calling it without checking GC type. But you explained that there's no
> harm with that code.
>
> And I agree that adding something in whitebox.cpp is not necessary.
> Even the new exception. :)
>
I'd like to keep the new exceptions in code. We have several White Box
methods which can throw exceptions in similar cases (e.g.
WB_G1GetMixedGCInfo). It looks more clear than meaningless 0.
Thanks
Michail
More information about the hotspot-gc-dev
mailing list