RFR 8213708: Different #ifdef guards cause incorrect use of Monitor::check_block_state()
Patricio Chilano
patricio.chilano.mateo at oracle.com
Tue Nov 13 22:47:56 UTC 2018
Thanks David!
Patricio
On 11/13/18 5:40 PM, David Holmes wrote:
> Looks fine. Thanks for fixing this!
>
> David
>
> On 14/11/2018 7:24 am, Patricio Chilano wrote:
>> Hi all,
>>
>> Could you review this small fix to the Monitor class?
>> Executing method check_block_state() was causing incorrect warnings
>> to be printed out in optimized builds due to variable _allow_vm_block
>> being incorrectly initialized in the constructor. The fix involved
>> wrapping the call to check_block_state() under the DEBUG_ONLY macro.
>> Built an optimized image with and without the fix, run a couple of
>> tests and checked the warning messages appear before the fix but not
>> after it. Also built in debug and release modes to check those build
>> okay too.
>>
>> Since the fix had to do with using the DEBUG_ONLY macro I also
>> changed in those files instances of debug_only to DEBUG_ONLY and
>> changed some instances of DEBUG_ONLY(code); to DEBUG_ONLY(code;) to
>> make the usage consistent.
>>
>> Webrev URL:
>> http://cr.openjdk.java.net/~pchilanomate/8213708.01/webrev
>> Bug URL:
>> https://bugs.openjdk.java.net/browse/JDK-8213708
>>
>> Thanks,
>> Patricio
More information about the hotspot-runtime-dev
mailing list