RFR: 8253540: InterpreterRuntime::monitorexit should be a JRT_LEAF function [v2]
Daniel D.Daugherty
dcubed at openjdk.java.net
Thu Sep 24 15:58:25 UTC 2020
On Thu, 24 Sep 2020 12:16:24 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.
>
> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>
> 8253540: InterpreterRuntime::monitorexit should be a JRT_LEAF function
src/hotspot/share/interpreter/interpreterRuntime.cpp line 741:
> 739: #endif
> 740: oop obj = elem->obj();
> 741: assert(Universe::heap()->is_in(obj), "must an object");
typo: s/must an/must be an/
src/hotspot/share/interpreter/interpreterRuntime.cpp line 743:
> 741: assert(Universe::heap()->is_in(obj), "must an object");
> 742: // The object could become unlocked through a JNI call, which we have no other checks for.
> 743: // Give a message if CheckJNICalls but ignore.
That comment is a bit misleading. Perhaps:
// Give a fatal message if CheckJNICalls. Otherwise we ignore it.
src/hotspot/share/runtime/sharedRuntime.cpp line 2106:
> 2104: JRT_LEAF(void, SharedRuntime::complete_monitor_unlocking_C(oopDesc* obj, BasicLock* lock, JavaThread* thread))
> 2105: // The object could become unlocked through a JNI call, which we have no other checks for.
> 2106: // Give a message if CheckJNICalls but ignore.
That comment is a bit misleading. Perhaps:
// Give a fatal message if CheckJNICalls. Otherwise we ignore it.
-------------
PR: https://git.openjdk.java.net/jdk/pull/320
More information about the hotspot-dev
mailing list