-
Notifications
You must be signed in to change notification settings - Fork 77
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
GraalVM Native Image #103
Comments
Hi, @Kevin-ox. Could you provide more details of your configuration? Here is my flow: I recently updated to the latest version of tb-edge on Ubuntu by installing the .deb package from the site. To leverage the capabilities of JVMCI (JVM Compiler Interface), which is supported in Java 11, I made some adjustments to the tb-edge.conf configuration file. Specifically, I appended the following JAVA_OPTS to enable JVMCI and specify GraalVM as the compiler, including an option to display the compiler configuration information:
As a result, it enabled me to use GraalVM as a compiler with a specific log:
Regarding the status of tb-edge, running service tb-edge status might display some errors, but it's important to note that these don't impact the functioning of Edge, and it operates as expected. |
I am closing this issue due to inactivity. Please feel free to reopen it if you have any more questions. |
I wanted to release a native image (instead of a. jar file) to greatly improve performance, but was unsuccessful. |
Is it possible to support compiling Native Images with GraalVM? I have encountered reflection issues. If it can be compiled into binary files, it will be a great success for low performance machines!
========================================================================================================================
GraalVM Native Image: Generating 'tb-edge-3.5.1.1EDGE-boot' (executable)...
[1/7] Initializing... (7.3s @ 0.23GB)
Version info: 'GraalVM 22.3.5 Java 11 EE'
Java version info: '11.0.22+9-LTS-jvmci-22.3-b32'
C compiler: gcc (linux, x86_64, 9.4.0)
Garbage collector: Serial GC
[2/7] Performing analysis... [******] (25.2s @ 1.11GB)
3,547 (75.12%) of 4,722 classes reachable
4,613 (55.13%) of 8,368 fields reachable
17,333 (48.80%) of 35,519 methods reachable
147 classes, 0 fields, and 475 methods registered for reflection
59 classes, 59 fields, and 52 methods registered for JNI access
4 native libraries: dl, pthread, rt, z
[3/7] Building universe... (2.6s @ 1.70GB)
Warning: Reflection method java.lang.Class.forName invoked at org.springframework.boot.loader.PropertiesLauncher.wrapWithCustomClassLoader(PropertiesLauncher.java:368)
Warning: Reflection method java.lang.Class.forName invoked at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:46)
Warning: Reflection method java.lang.Class.getMethod invoked at org.springframework.boot.loader.jar.JarFileEntries.(JarFileEntries.java:66)
Warning: Reflection method java.lang.Class.getDeclaredMethod invoked at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:47)
Warning: Reflection method java.lang.Class.getDeclaredConstructor invoked at org.springframework.boot.loader.PropertiesLauncher.newClassLoader(PropertiesLauncher.java:385)
Warning: Reflection method java.lang.Class.getDeclaredConstructor invoked at org.springframework.boot.loader.jar.Handler.getFallbackHandler(Handler.java:200)
Warning: Aborting stand-alone image build due to reflection use without configuration.
Warning: Use -H:+ReportExceptionStackTraces to print stacktrace of underlying exception
========================================================================================================================
Failed generating 'tb-edge-3.5.1.1EDGE-boot' after 35.5s.
Generating fallback image...
Warning: Image 'tb-edge-3.5.1.1EDGE-boot' is a fallback image that requires a JDK for execution (use --no-fallback to suppress fallback image generation and to print more detailed information why a fallback image was necessary).
The text was updated successfully, but these errors were encountered: