RFR: 8298099: [JVMCI] decouple libgraal from JVMCI module at runtime [v2]

Doug Simon dnsimon at openjdk.org
Mon Dec 5 13:55:51 UTC 2022


On Mon, 5 Dec 2022 13:49:28 GMT, Doug Simon <dnsimon at openjdk.org> wrote:

>> Libgraal is compiled ahead of time and should not need any JVMCI Java code to be dynamically loaded at runtime. Prior to this PR, this is not the case due to:
>> 
>> * Code to copy system properties from the HotSpot heap into the libgraal heap. This is in `jdk.vm.ci.services.Services.initializeSavedProperties(byte[])` and `jdk.vm.ci.services.Services.serializeSavedProperties()`. This code should be moved to `java.base/jdk.internal.vm.VMSupport`.
>> * Code to translate exceptions from the HotSpot heap into the libgraal heap and vice versa. This code should be moved from `jdk.internal.vm.ci//jdk.vm.ci.hotspot.TranslatedException` to `java.base/jdk.internal.vm.VMSupport`.
>> 
>> This PR makes the above changes. As a result, it's possible to build a JDK image that includes (and uses) libgraal but does not include `jdk.internal.vm.ci` or `jdk.internal.vm.compiler`. This both reduces footprint and better isolates the JAVMCI and the Graal compiler as accessing these components from Java code is now impossible.
>
> Doug Simon has updated the pull request incrementally with one additional commit since the last revision:
> 
>   generalized ClassLoader::has_jvmci_module to is_module_resolvable

src/hotspot/share/classfile/classLoader.hpp line 378:

> 376: 
> 377:   // Determines if the `module_name` module is resolvable.
> 378:   static bool is_module_resolvable(const char* module_name);

Is "resolvable" the right concept here? Or should it be something like "findable" instead?

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

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


More information about the core-libs-dev mailing list