RFR: 8282883: Use JVM_LEAF to avoid ThreadStateTransition for some simple JVM entries

Aleksey Shipilev shade at openjdk.java.net
Thu Mar 10 09:21:44 UTC 2022


On Wed, 9 Mar 2022 15:28:29 GMT, Yi Yang <yyang at openjdk.org> wrote:

> Some existing JVM_ENTRY routines are behavioral simple, they do not lock, GC or throw exceptions, we could use JVM_LEAF instead of JVM_ENTRY, to avoid ThreadStateTransition and safepoint checks.

I am a bit concerned about `JVM_Yield`, though. AFAICS, `JVM_LEAF` should not run for too long, because that would interfere with safepointing, and yielding the thread does look like an invitation to de-schedule the thread for unknown amount of time. @dholmes-ora -- you looked at it, have you figured this is okay?

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

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


More information about the hotspot-runtime-dev mailing list