RFR: 8259713: Fix comments and ResetNoHandleMark in deoptimization
Coleen Phillimore
coleenp at openjdk.java.net
Wed Jan 13 22:24:06 UTC 2021
On Wed, 13 Jan 2021 21:43:40 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:
>> This is a small part of the withdrawn change for https://github.com/openjdk/jdk/pull/1990 to fix the out-of-date comments in deoptimization.cpp.
>> Tested with tier1-3.
>
> src/hotspot/share/runtime/deoptimization.cpp line 691:
>
>> 689: // do in debug mode to get around the NoHandleMark code in the JRT_LEAF macro
>> 690: // Beware though because allocating Handles must have a HandleMark or else the
>> 691: // Handles will be leaked.
>
> This comment is confusing because there is HandleMark on L693.
My point of this comment is that you should make sure you have a HandleMark if you've used ResetNoHandleMark in JRT_LEAF.
> src/hotspot/share/runtime/deoptimization.cpp line 692:
>
>> 690: // Beware though because allocating Handles must have a HandleMark or else the
>> 691: // Handles will be leaked.
>> 692: ResetNoHandleMark rnhm;
>
> So I'm confused. The bug description says:
>
>> the ResetNoHandleMark is unneeded
>
> but it is still here.
This one is needed because it's in a JRT_LEAF. The one above in the JRT_BLOCK_ENTRY is unneeded (along with the comment that matched the one in this unpack_frames() function.)
-------------
PR: https://git.openjdk.java.net/jdk/pull/2069
More information about the hotspot-dev
mailing list