RFR: 8253540: InterpreterRuntime::monitorexit should be a JRT_LEAF function

Martin Doerr mdoerr at openjdk.java.net
Wed Sep 23 16:07:17 UTC 2020


On Wed, 23 Sep 2020 14:32:21 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

> That the monitor has already been unlocked, or is a null stacklock monitor has been already checked in the caller, so
> the code that makes it a JRT_ENTRY_NO_ASYNC is unnecessary.
> Making it a JRT_LEAF like the compiled method entries makes it safer. We know it can never safepoint and
> unintentionally install a async exception.
> Tested with tier1-6.

Hi Coleen, looks like a nice cleanup.
Shouldn't we use call_VM_leaf at the call sites?

src/hotspot/share/interpreter/interpreterRuntime.cpp line 742:

> 740:   oop obj = elem->obj();
> 741:   assert(!obj->is_unlocked(), "caller checked these conditions");
> 742:   assert(Universe::heap()->is_in_or_null(obj), "must be NULL or an object");

obj can't be null at this point

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

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


More information about the hotspot-runtime-dev mailing list