Integrated: 8340733: Add scope for relaxing constraint on JavaCalls from CompilerThread

Tomáš Zezula duke at openjdk.org
Fri Nov 1 13:39:36 UTC 2024


On Tue, 1 Oct 2024 10:57:58 GMT, Tomáš Zezula <duke at openjdk.org> wrote:

> [JDK-8318694](https://bugs.openjdk.org/browse/JDK-8318694) limited the ability for JVMCI CompilerThreads to make Java upcalls. This is to mitigate against deadlock when an upcall does class loading. Class loading can easily create deadlock situations in -Xcomp or -Xbatch mode.
> 
> However, for Truffle, upcalls are unavoidable if Truffle partial evaluation occurs as part of JIT compilation inlining. This occurs when the Graal inliner sees a constant Truffle AST node which allows a Truffle-specific inlining extension to perform Truffle partial evaluation (PE) on the constant. Such PE involves upcalls to the Truffle runtime (running in Java).
> 
> This PR provides the escape hatch such that Truffle specific logic can put a compiler thread into "allow Java upcall" mode during the scope of the Truffle logic.

This pull request has now been integrated.

Changeset: 751a914b
Author:    Tomas Zezula <tzezula at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/751a914b0a377d4e1dd30d2501f0ab4e327dea34
Stats:     124 lines in 6 files changed: 108 ins; 4 del; 12 mod

8340733: Add scope for relaxing constraint on JavaCalls from CompilerThread

Reviewed-by: dnsimon, kvn

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

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


More information about the hotspot-compiler-dev mailing list