Skip to content

Commit 83b7d5f

Browse files
committed
Added Oracle GraalVM for JDK 21
1 parent 8583fa1 commit 83b7d5f

File tree

2 files changed

+74
-34
lines changed

2 files changed

+74
-34
lines changed

oci-build-examples/oci_devops_build_with_graalenterprise/README.md

Lines changed: 73 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -233,54 +233,94 @@ The following instructions will help you to export the `executable app file` to
233233
```shell
234234
...
235235
EXEC: Installed:
236-
EXEC: graalvm22-ee-17-native-image.x86_64 0:22.1.0.1-1.el7
236+
EXEC: graalvm-21-native-image.x86_64 0:21.0.7-1.el7
237237
EXEC:
238238
EXEC: Dependency Installed:
239-
EXEC: glibc-static.x86_64 0:2.17-326.0.1.el7_9
240-
EXEC: graalvm22-ee-17-jdk.x86_64 0:22.1.0.1-1.el7
239+
EXEC: glibc-static.x86_64 0:2.17-326.0.9.el7_9.3
240+
EXEC: graalvm-21-jdk.x86_64 0:21.0.7-1.el7
241241
EXEC: libstdc++-static.x86_64 0:4.8.5-44.0.3.el7
242-
EXEC: zlib-static.x86_64 0:1.2.7-20.el7_9
242+
EXEC: zlib-static.x86_64 0:1.2.7-21.el7_9
243243
EXEC:
244-
EXEC: Complete!
244+
EXEC: Dependency Updated:
245+
EXEC: glibc.x86_64 0:2.17-326.0.9.el7_9.3
246+
EXEC: glibc-common.x86_64 0:2.17-326.0.9.el7_9.3
247+
EXEC: glibc-devel.x86_64 0:2.17-326.0.9.el7_9.3
248+
EXEC: glibc-headers.x86_64 0:2.17-326.0.9.el7_9.3
249+
EXEC:
250+
EXEC: Complete!
245251
...
246252
```
247253

248254
2. The native executable build log statements should be similar to:
249255

250256
```shell
251257
...
252-
EXEC: ==================================================================
258+
EXEC: ========================================================================================================================
253259
EXEC: GraalVM Native Image: Generating 'my-app' (executable)...
254-
EXEC: ==================================================================
255-
EXEC: [1/7] Initializing... (5.6s @ 0.11GB)
256-
EXEC: Version info: 'GraalVM 22.1.0.1 Java 17 EE'
260+
EXEC: ========================================================================================================================
261+
EXEC: For detailed information and explanations on the build output, visit:
262+
EXEC: https://github.com/oracle/graal/blob/master/docs/reference-manual/native-image/BuildOutput.md
263+
EXEC: ------------------------------------------------------------------------------------------------------------------------
264+
EXEC: [1/8] Initializing... (3.6s @ 0.09GB)
265+
EXEC: Java version: 21.0.7+8-LTS, vendor version: Oracle GraalVM 21.0.7+8.1
266+
EXEC: Graal compiler: optimization level: 2, target machine: x86-64-v3, PGO: ML-inferred
257267
EXEC: C compiler: gcc (redhat, x86_64, 4.8.5)
258-
EXEC: Garbage collector: Serial GC
259-
EXEC: [2/7] Performing analysis... [******] (9.5s @ 0.32GB)
260-
EXEC: 1,880 (62.46%) of 3,010 classes reachable
261-
EXEC: 1,684 (46.71%) of 3,605 fields reachable
262-
EXEC: 7,784 (36.98%) of 21,049 methods reachable
263-
EXEC: 21 classes, 0 fields, and 285 methods registered for reflection
264-
EXEC: 48 classes, 32 fields, and 47 methods registered for JNI access
265-
EXEC: [3/7] Building universe... (1.1s @ 0.45GB)
266-
EXEC: [4/7] Parsing methods... [*] (0.8s @ 0.58GB)
267-
EXEC: [5/7] Inlining methods... [****] (1.2s @ 0.97GB)
268-
EXEC: [6/7] Compiling methods... [*****] (21.2s @ 0.75GB)
269-
EXEC: [7/7] Creating image... (0.9s @ 0.92GB)
270-
EXEC: 2.62MB (46.31%) for code area: 3,708 compilation units
271-
EXEC: 2.45MB (43.34%) for image heap: 945 classes and 38,518 objects
272-
EXEC: 600.06KB (10.35%) for other data
273-
EXEC: 5.66MB in total
274-
EXEC: ------------------------------------------------------------------
275-
...
276-
EXEC: ------------------------------------------------------------------
277-
EXEC: 0.9s (2.1% of total time) in 18 GCs | Peak RSS: 2.44GB | CPU load: 3.41
278-
EXEC: ------------------------------------------------------------------
268+
EXEC: Garbage collector: Serial GC (max heap size: 80% of RAM)
269+
EXEC: 1 user-specific feature(s):
270+
EXEC: - com.oracle.svm.thirdparty.gson.GsonFeature
271+
EXEC: ------------------------------------------------------------------------------------------------------------------------
272+
EXEC: Build resources:
273+
EXEC: - 5.11GB of memory (75.6% of 6.76GB system memory, determined at start)
274+
EXEC: - 4 thread(s) (100.0% of 4 available processor(s), determined at start)
275+
EXEC: [2/8] Performing analysis... [*****] (8.5s @ 0.19GB)
276+
EXEC: 2,052 reachable types (60.0% of 3,421 total)
277+
EXEC: 1,935 reachable fields (45.3% of 4,272 total)
278+
EXEC: 8,767 reachable methods (36.2% of 24,223 total)
279+
EXEC: 741 types, 37 fields, and 332 methods registered for reflection
280+
EXEC: 49 types, 33 fields, and 48 methods registered for JNI access
281+
EXEC: 4 native libraries: dl, pthread, rt, z
282+
EXEC: [3/8] Building universe... (1.5s @ 0.23GB)
283+
EXEC: [4/8] Parsing methods... [**] (2.7s @ 0.23GB)
284+
EXEC: [5/8] Inlining methods... [***] (0.8s @ 0.24GB)
285+
EXEC: [6/8] Compiling methods... [****] (17.1s @ 0.27GB)
286+
EXEC: [7/8] Laying out methods... [*] (0.7s @ 0.26GB)
287+
EXEC: [8/8] Creating image... [*] (1.1s @ 0.23GB)
288+
EXEC: 2.82MB (42.58%) for code area: 3,945 compilation units
289+
EXEC: 3.18MB (48.04%) for image heap: 53,077 objects and 43 resources
290+
EXEC: 636.31kB ( 9.39%) for other data
291+
EXEC: 6.62MB in total
292+
EXEC: ------------------------------------------------------------------------------------------------------------------------
293+
EXEC: Top 10 origins of code area: Top 10 object types in image heap:
294+
EXEC: 1.41MB java.base 765.27kB byte[] for code metadata
295+
EXEC: 1.12MB svm.jar (Native Image) 693.88kB byte[] for java.lang.String
296+
EXEC: 84.35kB com.oracle.svm.svm_enterprise 363.73kB java.lang.String
297+
EXEC: 42.24kB jdk.proxy2 322.13kB java.lang.Class
298+
EXEC: 37.79kB jdk.proxy1 168.13kB java.util.HashMap$Node
299+
EXEC: 30.20kB org.graalvm.nativeimage.base 114.01kB char[]
300+
EXEC: 27.42kB org.graalvm.collections 94.77kB heap alignment
301+
EXEC: 21.20kB jdk.internal.vm.ci 81.83kB java.lang.Object[]
302+
EXEC: 16.79kB jdk.internal.vm.compiler 81.45kB byte[] for reflection metadata
303+
EXEC: 11.80kB jdk.proxy3 80.16kB com.oracle.svm.core.hub.DynamicHubCompanion
304+
EXEC: 389.00B for 1 more packages 490.66kB for 523 more object types
305+
EXEC: Use '-H:+BuildReport' to create a report with more details.
306+
EXEC: ------------------------------------------------------------------------------------------------------------------------
307+
EXEC: Security report:
308+
EXEC: - Binary does not include Java deserialization.
309+
EXEC: - Use '--enable-sbom' to embed a Software Bill of Materials (SBOM) in the binary.
310+
EXEC: ------------------------------------------------------------------------------------------------------------------------
311+
EXEC: Recommendations:
312+
EXEC: G1GC: Use the G1 GC ('--gc=G1') for improved latency and throughput.
313+
EXEC: PGO: Use Profile-Guided Optimizations ('--pgo') for improved throughput.
314+
EXEC: INIT: Adopt '--strict-image-heap' to prepare for the next GraalVM release.
315+
EXEC: HEAP: Set max heap for improved and more predictable memory usage.
316+
EXEC: CPU: Enable more CPU features with '-march=native' for improved performance.
317+
EXEC: ------------------------------------------------------------------------------------------------------------------------
318+
EXEC: 2.8s (7.5% of total time) in 262 GCs | Peak RSS: 0.79GB | CPU load: 3.27
319+
EXEC: ------------------------------------------------------------------------------------------------------------------------
279320
EXEC: Produced artifacts:
280321
EXEC: /workspace/gvmee-yum/target/my-app (executable)
281-
EXEC: /workspace/gvmee-yum/target/my-app.build_artifacts.txt
282-
EXEC: ==================================================================
283-
EXEC: Finished generating 'my-app' in 41.7s.
322+
EXEC: ========================================================================================================================
323+
EXEC: Finished generating 'my-app' in 36.7s.
284324
...
285325
```
286326

oci-build-examples/oci_devops_build_with_graalenterprise/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<maven.compiler.source>17</maven.compiler.source>
1818
<maven.compiler.target>17</maven.compiler.target>
1919
<maven-jar-plugin.version>3.2.2</maven-jar-plugin.version>
20-
<native.maven.plugin.version>0.9.13</native.maven.plugin.version>
20+
<native.maven.plugin.version>0.10.6</native.maven.plugin.version>
2121
</properties>
2222

2323
<dependencies>

0 commit comments

Comments
 (0)