RFR: 8259713: Fix comments and ResetNoHandleMark in deoptimization

Daniel D.Daugherty dcubed at openjdk.java.net
Wed Jan 13 21:47:05 UTC 2021


On Wed, 13 Jan 2021 21:12:34 GMT, Coleen Phillimore <coleenp 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.

Changes requested by dcubed (Reviewer).

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.

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.

-------------

PR: https://git.openjdk.java.net/jdk/pull/2069


More information about the hotspot-dev mailing list