JVM_IsStaticallyLinked is currently defined as JVM_ENTRY_NO_ENV, which requires accessing the current JavaThread. JVM_ENTRY_NO_ENV uses VM_ENTRY_BASE, which is used for entries that could lock, GC and throw exceptions. Calling JVM_IsStaticallyLinked from non JavaThread could crash. JVM_IsStaticallyLinked simply calls a trivial function, is_vm_statically_linked. is_vm_statically_linked returns true|false depending on if the current JDK is static or not. I think we can safely change JVM_IsStaticallyLinked to be a JVM_LEAF. It is possible that JVM_IsStaticallyLinked may be called from non-Java thread. It's also slightly more efficient as a JVM_LEAF entry.
- links to
-
Commit(master) openjdk/jdk/05c56788
-
Review(master) openjdk/jdk/22685