-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[GR-60088] Add org.graalvm.nativeimage.libgraal module. #10380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a229752 to
aeed0d5
Compare
ffd8bc9 to
7542c2f
Compare
substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/RuntimeSupport.java
Outdated
Show resolved
Hide resolved
zapster
reviewed
Jan 10, 2025
compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/libgraal/LibGraalFeature.java
Outdated
Show resolved
Hide resolved
zapster
reviewed
Jan 10, 2025
compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/libgraal/LibGraalFeature.java
Outdated
Show resolved
Hide resolved
0f47855 to
46bf4bb
Compare
6fc1207 to
4a2fd51
Compare
Member
olpaw
previously approved these changes
Feb 10, 2025
01d7784 to
3eacb5c
Compare
4915c9c to
2db340b
Compare
2db340b to
0ae20bc
Compare
* renamed LibGraalLoader.getModuleMap to getClassModuleMap * replaced LibGraalLoader.getJavaHome with a protocol shared between HostedLibGraalClassLoader and LibGraalFeature * removed LibGraalLoader.getRuntimeClassLoader * remove LibGraalLoader.getServiceModules
0ae20bc to
0932112
Compare
0932112 to
7d5592a
Compare
3 tasks
This was referenced Feb 18, 2025
Closed
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds the
org.graalvm.nativeimage.libgraalmodule. This provides a stable API for use by libgraal that is an extension to the standard Native Image API (i.e., theorg.graalvm.nativeimage**packages here). Using this extended API,LibGraalFeature.javahas been moved intocompiler/, out ofsubstratevm/. It no longer depends on Native Image internals, allowing any GraalVM binary that supportsorg.graalvm.nativeimage.libgraalto be used as a tool for building libgraal. This is a step towards Project Galahad.Over time, some or all of
jdk.graal.nativeimagemay be moved intoorg.graalvm.nativeimage. This is a discussion to be had in follow-up PRs.The API changes can most easily been seen in:
sdk/src/org.graalvm.nativeimage/snapshot.sigtestsdk/src/org.graalvm.nativeimage.libgraal/snapshot.sigtestA large part of the code changes comes from the fact that
LibGraalFeatureitself is now loaded by the LibGraalClassLoader which is separate from the Native Image class loader. This means the use of method handles to communicate between the "hosted" parts of libgraal (those loaded by the Native Image class loader) and the "guest" parts of libgraal has been removed. This is a large code reduction and makes the logic much easier to follow. It also means no more need for@NativeImageReinitializeas the Graal classes loaded for compiling into libgraal are different from those loaded to do the compilation and thus no longer need re-initializing.Other changes of note:
-Djdk.graal.ShowConfiguration=infohas changed (and improved) slightly to also show the SVM GC algorithm used in libgraal.Before:
Using "Graal Enterprise compiler with Truffle extensions" loaded from a PGO optimized Native Image shared libraryAfter:
Using "Graal Enterprise compiler with Truffle extensions" loaded from a Native Image shared library (PGO optimized, gc=Serial GC)