You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The number of methods marked for runtime compilation.
@@ -217,7 +219,7 @@ An origin is a group of Java sources and can be a JAR file, a package name, or a
217
219
The [`java.base` module](https://docs.oracle.com/en/java/javase/22/docs/api/java.base/module-summary.html), for example, contains base classes from the JDK.
218
220
The `svm.jar` file, the `org.graalvm.nativeimage.base` module, and similar origins contain internal sources for the Native Image runtime.
219
221
To reduce the size of the code area and with that, the total size of the native executable, re-evaluate the dependencies of your application based on the code area breakdown.
220
-
Some libraries and frameworks are better prepared for Native Image than others, and newer versions of a library or framework may improve (or worsen) their code footprint.
222
+
Some libraries and frameworks are better prepared for Native Image than others, and newer versions of a library or framework may improve (or worsen) their code footprint.
221
223
222
224
#### <aname="glossary-image-heap"></a>Image Heap
223
225
The heap contains reachable objects such as static application data, metadata, and `byte[]` for different purposes (see below).
@@ -267,19 +269,19 @@ This shows whether Java deserialization is included in the native executable or
267
269
If not included, the attack surface of the executable is reduced as the executable cannot be exploited with attacks based on Java deserialization.
268
270
269
271
#### <aname="glossary-sbom"></a><aname="glossary-embedded-sbom"></a>Software Bill of Material (SBOM)
270
-
This section indicates whether an SBOM was assembled and in what ways it was stored.
271
-
The storage formats include: `embed`, which embeds the SBOM in the binary; `classpath`, which saves the SBOM to the classpath; and `export`, which includes the SBOM as a JSON build artifact.
272
-
The SBOM feature is enabled by default and defaults to the `embed` option.
273
-
When embedded, the SBOM size is displayed.
274
-
The number of components is always displayed.
272
+
This section indicates whether a SBOM was assembled and in what ways it was stored.
273
+
The storage formats include: `embed`, which embeds the SBOM in the binary; `classpath`, which saves the SBOM to the classpath; and `export`, which includes the SBOM as a JSON build artifact.
274
+
The SBOM feature is enabled by default and defaults to the `embed` option.
275
+
When embedded, the SBOM size is displayed.
276
+
The number of components is always displayed.
275
277
The SBOM feature can be disabled with `--enable-sbom=false`.
276
278
277
279
Unassociated types are displayed when certain types (such as classes, interfaces, or annotations) cannot be linked to an SBOM component.
278
280
If these types contain vulnerabilities, SBOM scanning will not detect them.
279
281
To fix this, ensure that proper GAV coordinates (Group ID, Artifact ID, and Version) are defined in the project POM's properties or in _MANIFEST.MF_ using standard formats.
280
282
281
283
Use the [build report](BuildReport.md) to view included components, their dependencies, and any unassociated types.
282
-
For more information, see [Software Bill of Materials (SBOM) in Native Image](../../security/SBOM.md).
284
+
For more information, see [Software Bill of Materials](../../security/native-image.md).
This section indicates whether advanced obfuscation was applied.
@@ -296,11 +298,8 @@ Advanced obfuscation is applied to your application code and third-party depende
296
298
* Module and package names containing a class that loads a resource
297
299
* Names of annotations, lambdas, and proxies
298
300
299
-
To export a mapping from original to obfuscated names, use `-H:AdvancedObfuscation=export-mapping`.
300
-
Use the mapping file and the `native-image-configure deobfuscate` command to deobfuscate stack traces.
301
-
See the [build report](BuildReport.md) for summary statistics, such as the percentage of class and method names that were obfuscated.
302
-
303
-
For more information, see [Advanced Obfuscation in Native Image](../../security/Obfuscation.md).
301
+
To export a mapping from original to obfuscated names, use `-H:AdvancedObfuscation=export-mapping`.
302
+
See the [build report](BuildReport.md) for summary statistics, such as the percentage of class and method names that were obfuscated.
304
303
305
304
> Native Image obfuscates binaries by removing class files, applying aggressive optimizations, and eliminating dead code. The advanced obfuscation feature also obfuscates symbol names.
306
305
@@ -376,8 +375,8 @@ Note, however, that the overall peak throughput of the executable may be lower d
376
375
#### <aname="recommendation-init"></a>`INIT`: Use the Strict Image Heap Configuration
377
376
378
377
Start using `--strict-image-heap` to reduce the amount of configuration and prepare for future GraalVM releases where this will be the default.
379
-
This mode requires only the classes that are stored in the image heap to be marked with `--initialize-at-build-time`.
380
-
This effectively reduces the number of configuration entries necessary to achieve build-time initialization.
378
+
This mode requires only the classes that are stored in the image heap to be marked with `--initialize-at-build-time`.
379
+
This effectively reduces the number of configuration entries necessary to achieve build-time initialization.
381
380
When adopting the new mode it is best to start introducing build-time initialization from scratch.
382
381
During this process, it is best to select individual classes (as opposed to whole packages) for build time initialization.
383
382
Also, before migrating to the new flag make sure to update all framework dependencies to the latest versions as they might need to migrate too.
0 commit comments