Quantcast

10 RFR: WhiteBox methods should throw an exception if used with inappropriate collector.

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

10 RFR: WhiteBox methods should throw an exception if used with inappropriate collector.

Michail Chernov
Hi,

Could I have a reviews for this change, please?

Whitebox.cpp has many methods which can cause to VM assertion failure
when they are used with inappropriate collector. For example -
WB_G1IsHumongous, WB_G1NumFreeRegions, etc.
There also several methods which throw RuntimeException when methods are
used with wrong collector (WB_PSHeapGenerationAlignment,
WB_PSVirtualSpaceAlignment).

This change adds checking of collector which is used and throwing
RuntimeException when the method is used with wrong collector.

http://cr.openjdk.java.net/~mchernov/8167196/webrev.00/
https://bugs.openjdk.java.net/browse/JDK-8167196

The change was tested - all gc tests pass with this change with
different collectors.

Thanks,
Michail
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 10 RFR: WhiteBox methods should throw an exception if used with inappropriate collector.

Aleksey Shipilev-4
On 03/03/2017 01:57 PM, Michail Chernov wrote:
> http://cr.openjdk.java.net/~mchernov/8167196/webrev.00/

Looks okay.

I guess throwing UnsupportedOperationException conveys the intent better than
raw RuntimeException.

-Aleksey


signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 10 RFR: WhiteBox methods should throw an exception if used with inappropriate collector.

Michail Chernov
Aleksey,

Thank you for reviewing.
This is updated version with your suggestion:

http://cr.openjdk.java.net/~mchernov/8167196/webrev.01/
http://cr.openjdk.java.net/~mchernov/8167196/webrev.01_to_00/


On 03/03/2017 16:00, Aleksey Shipilev wrote:
> On 03/03/2017 01:57 PM, Michail Chernov wrote:
>> http://cr.openjdk.java.net/~mchernov/8167196/webrev.00/
> Looks okay.
>
> I guess throwing UnsupportedOperationException conveys the intent better than
> raw RuntimeException.
>
> -Aleksey
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 10 RFR: WhiteBox methods should throw an exception if used with inappropriate collector.

Aleksey Shipilev-4
On 03/03/2017 02:40 PM, Michail Chernov wrote:
> Thank you for reviewing.
> This is updated version with your suggestion:
>
> http://cr.openjdk.java.net/~mchernov/8167196/webrev.01/
> http://cr.openjdk.java.net/~mchernov/8167196/webrev.01_to_00/

Looks good to me.

-Aleksey


signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 10 RFR: WhiteBox methods should throw an exception if used with inappropriate collector.

Dmitry Fazunenko
Looks good.

On 03.03.2017 16:42, Aleksey Shipilev wrote:

> On 03/03/2017 02:40 PM, Michail Chernov wrote:
>> Thank you for reviewing.
>> This is updated version with your suggestion:
>>
>> http://cr.openjdk.java.net/~mchernov/8167196/webrev.01/
>> http://cr.openjdk.java.net/~mchernov/8167196/webrev.01_to_00/
> Looks good to me.
>
> -Aleksey
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 10 RFR: WhiteBox methods should throw an exception if used with inappropriate collector.

Michail Chernov
Hi Dima, Aleksey,

Thank you for reviewing this.

Michail


On 03/03/2017 17:28, Dmitry Fazunenko wrote:

> Looks good.
>
> On 03.03.2017 16:42, Aleksey Shipilev wrote:
>> On 03/03/2017 02:40 PM, Michail Chernov wrote:
>>> Thank you for reviewing.
>>> This is updated version with your suggestion:
>>>
>>> http://cr.openjdk.java.net/~mchernov/8167196/webrev.01/
>>> http://cr.openjdk.java.net/~mchernov/8167196/webrev.01_to_00/
>> Looks good to me.
>>
>> -Aleksey
>>
>
>

Loading...