Integrated: 8318694: [JVMCI] disable can_call_java in most contexts for libjvmci compiler threads

Doug Simon dnsimon at openjdk.org
Wed Nov 1 16:30:15 UTC 2023


On Thu, 26 Oct 2023 17:39:46 GMT, Doug Simon <dnsimon at openjdk.org> wrote:

> This PR reduces the context in which a libjvmci CompilerThread can make a Java call. By default, a CompileThread for a JVMCI compiler can make Java calls (as jarjvmci only works that way). When libjvmci calls into the VM via a CompilerToVM native method, it enters a scope where Java calls are disabled until either the call returns or a nested scope is entered that re-enables Java calls. The latter is required for the Truffle use case described in [JDK-8318694](https://bugs.openjdk.org/browse/JDK-8318694) as well as for a few other VM entry points where libgraal currently still requires the ability to make Java calls (e.g. to load the Java classes used for boxing primitives). We may be able to eventually eliminate all need for libgraal to make Java calls but this PR is a first step in the right direction.

This pull request has now been integrated.

Changeset: d354141a
Author:    Doug Simon <dnsimon at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/d354141aa191c80b473dfeee27b51f1562ffeafd
Stats:     197 lines in 13 files changed: 109 ins; 65 del; 23 mod

8318694: [JVMCI] disable can_call_java in most contexts for libjvmci compiler threads

Reviewed-by: dholmes, never

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

PR: https://git.openjdk.org/jdk/pull/16383


More information about the graal-dev mailing list