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
Copy file name to clipboardExpand all lines: docs/reference-manual/native-image/InspectTool.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ The Native Image Inspect Tool can extract the compressed SBOM using the optional
19
19
20
20
## Extracting Class-Level Metadata (Deprecated)
21
21
22
-
> The extraction of class-level metadata using `native-image-inspect` is deprecated. In GraalVM for JDK 24, a deprecation warning is printed to `stderr`, and this functionality will be removed in GraalVM for JDK 25. Please migrate to using [class-level SBOMs](../../security/native-image.md#including-class-level-metadata-in-the-sbom) instead by passing `--enable-sbom=class-level,export` to the `native-image` builder, which generates an SBOM containing the same kind of class-level metadata information.
22
+
> The extraction of class-level metadata using `native-image-inspect` is deprecated. In GraalVM for JDK 24, a deprecation warning is printed to `stderr`, and this functionality will be removed in GraalVM for JDK 25. Please migrate to using [class-level SBOMs](../../security/SBOM.md#including-class-level-metadata-in-the-sbom) instead by passing `--enable-sbom=class-level,export` to the `native-image` builder, which generates an SBOM containing the same kind of class-level metadata information.
23
23
24
24
Native Image provides the Inspect Tool to list all classes, fields, and methods included in a native executable or a native shared library.
25
25
Run the command `$JAVA_HOME/bin/native-image-inspect <path_to_binary>` to list classes, methods, fields, and constructors in the JSON format that validates against the JSON schema defined in [`native-image-inspect-schema-v0.2.0.json`](assets/native-image-inspect-schema-v0.2.0.json) (only available in Oracle GraalVM).
Copy file name to clipboardExpand all lines: docs/reference-manual/native-image/guides/include-resources.md
+7-5
Original file line number
Diff line number
Diff line change
@@ -95,12 +95,14 @@ To see which resources were included in your native executable, pass the option
95
95
It generates an HTML file that can be examined with a regular web browser.
96
96
The information about all included resources will be under the **Resources** tab.
97
97
98
-
Inthis demo the path to the resource file is straightforward, but it may be more complex in real-world use cases.
99
-
Resources are specified via globs.
100
-
For more advanced use-cases, you can register resources using the API methods (see [classRuntimeResourceAccess](https://www.graalvm.org/sdk/javadoc/org/graalvm/nativeimage/hosted/RuntimeResourceAccess.html)).
101
-
Learn more about specifying a resource path using a glob and some syntax rules to be observed in [Accessing Resources in Native Image](../ReachabilityMetadata.md#resources).
98
+
Inthis demo the path to the resource file is straightforward, but it may be more complex in a real-world use case.
99
+
A resource or resource bundle may come from a module.
100
+
Learn more how to specify it in [Resources in JavaModules](../ReachabilityMetadata.md#resources-in-java-modules).
101
+
102
+
For more advanced use-cases, you can register resources using the API methods (see [classRuntimeResourceAccess](https://www.graalvm.org/sdk/javadoc/org/graalvm/nativeimage/hosted/RuntimeResourceAccess.html)).
103
+
Learn more about specifying a resource path using a glob and some syntax rules to be observed from [Accessing Resources in Native Image](../ReachabilityMetadata.md#resources).
102
104
103
105
### Related Documentation
104
106
105
107
* [Accessing Resources in Native Image](../ReachabilityMetadata.md#resources)
106
-
* [Resource Metadata in JSON](../ReachabilityMetadata.md#resource-metadata-in-json)
108
+
* [Resource Metadata in JSON](../ReachabilityMetadata.md#resource-metadata-in-json)
* Disallows [host class loading](https://www.graalvm.org/sdk/javadoc/org/graalvm/polyglot/Context.Builder.html#allowHostClassLoading-boolean-).
61
-
* Disallows [to all public host classes and methods by default](https://www.graalvm.org/sdk/javadoc/org/graalvm/polyglot/HostAccess.Builder.html#allowPublicAccess-boolean-).
61
+
* Disallows [access to all public host classes and methods by default](https://www.graalvm.org/sdk/javadoc/org/graalvm/polyglot/HostAccess.Builder.html#allowPublicAccess-boolean-).
* Disallows implementation of arbitrary host [classes](https://www.graalvm.org/sdk/javadoc/org/graalvm/polyglot/HostAccess.Builder.html#allowAllClassImplementations-boolean-) and [interfaces](https://www.graalvm.org/sdk/javadoc/org/graalvm/polyglot/HostAccess.Builder.html#allowAllImplementations-boolean-).
64
64
* Disallows implementation of `java.lang.FunctionalInterface`.
@@ -109,7 +109,7 @@ Isolated versions of the languages can be downloaded from Maven using the follow
109
109
<dependency>
110
110
<groupId>org.graalvm.polyglot</groupId>
111
111
<artifactId>js-isolate</artifactId>
112
-
<version>${graalvm.version}</version>
112
+
<version>${graalvm.polyglot.version}</version>
113
113
<type>pom</type>
114
114
</dependency>
115
115
```
@@ -233,7 +233,7 @@ Certain limits can be [reset](#resetting-resource-limits) at any point of time d
233
233
234
234
The `sandbox.MaxCPUTime` option allows you to specify the maximum CPU time spent running guest code.
235
235
CPU time spent depends on the underlying hardware.
236
-
The maximum [CPU time](https://docs.oracle.com/en/java/javase/22/docs/api/java.management/java/lang/management/ThreadMXBean.html#getThreadCpuTime\(long\)) specifies how long a context can be active until it is automatically cancelled and the context is closed.
236
+
The maximum [CPU time](https://docs.oracle.com/en/java/javase/23/docs/api/java.management/java/lang/management/ThreadMXBean.html#getThreadCpuTime\(long\)) specifies how long a context can be active until it is automatically cancelled and the context is closed.
237
237
By default the time limit is checked every 10 milliseconds.
238
238
This can be customized using the `sandbox.MaxCPUTimeCheckInterval` option.
The limit is checked by retained size computation triggered either based on [allocated](https://docs.oracle.com/en/java/javase/22/docs/api/jdk.management/com/sun/management/ThreadMXBean.html#getThreadAllocatedBytes\(long\)) bytes or on [low memory notification](https://docs.oracle.com/en/java/javase/22/docs/api/java.management/java/lang/management/MemoryMXBean.html).
346
+
The limit is checked by retained size computation triggered either based on [allocated](https://docs.oracle.com/en/java/javase/23/docs/api/jdk.management/com/sun/management/ThreadMXBean.html#getThreadAllocatedBytes\(long\)) bytes or on [low memory notification](https://docs.oracle.com/en/java/javase/23/docs/api/java.management/java/lang/management/MemoryMXBean.html).
347
347
348
348
The allocated bytes are checked by a separate high-priority thread that will be woken regularly.
349
349
There is one such thread for each memory-limited context (one with `sandbox.MaxHeapMemory` set).
@@ -360,7 +360,7 @@ Retained size computation for a context can be customized using the expert optio
360
360
361
361
Retained size computation for a context is triggered when a retained bytes estimate exceeds a certain factor of specified `sandbox.MaxHeapMemory`.
362
362
The estimate is based on heap memory
363
-
[allocated](https://docs.oracle.com/en/java/javase/22/docs/api/jdk.management/com/sun/management/ThreadMXBean.html#getThreadAllocatedBytes\(long\)) by threads where the context has been active.
363
+
[allocated](https://docs.oracle.com/en/java/javase/23/docs/api/jdk.management/com/sun/management/ThreadMXBean.html#getThreadAllocatedBytes\(long\)) by threads where the context has been active.
364
364
More precisely, the estimate is the result of previous retained bytes computation, if available, plus bytes allocated since the start of the previous computation.
365
365
By default the factor of `sandbox.MaxHeapMemory` is 1.0 and it can be customized by the `sandbox.AllocatedBytesCheckFactor` option.
366
366
The factor must be positive.
@@ -377,7 +377,7 @@ This can be configured by the `sandbox.RetainedBytesCheckInterval` option. The i
377
377
The allocated bytes checking for a context can be disabled by the `sandbox.AllocatedBytesCheckEnabled` option.
378
378
By default it is enabled ("true"). If disabled ("false"), retained size checking for the context can be triggered only by the low memory trigger.
379
379
380
-
When the total number of bytes allocated in the heap for the whole host VM exceeds a certain factor of the total heap memory of the VM, [low memory notification](https://docs.oracle.com/en/java/javase/22/docs/api/java.management/java/lang/management/MemoryMXBean.html) is invoked and initiates the following process.
380
+
When the total number of bytes allocated in the heap for the whole host VM exceeds a certain factor of the total heap memory of the VM, [low memory notification](https://docs.oracle.com/en/java/javase/23/docs/api/java.management/java/lang/management/MemoryMXBean.html) is invoked and initiates the following process.
381
381
The execution pauses for all execution contexts where the `sandbox.MaxHeapMemory` option is set. The execution is resumed only when retained bytes in the heap for each memory-limited context are computed and contexts exceeding their limits are cancelled.
382
382
The default factor is 0.7. This can be configured by the `sandbox.RetainedBytesCheckFactor` option.
383
383
The factor must be between 0.0 and 1.0. All contexts using the `sandbox.MaxHeapMemory` option must use the same value for `sandbox.RetainedBytesCheckFactor`.
Copy file name to clipboardExpand all lines: docs/security/security-guide.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -58,7 +58,7 @@ In managed mode, all access to unmanaged code including the operating system is
58
58
* Regarding type safety, it is not possible to reinterpret a data pointer into a function pointer and execute arbitrary instructions (since these are distinct pointer types for LLVM runtime).
59
59
* System calls are intercepted and routed to the corresponding Truffle APIs. For example, file IO is mapped to the Truffle `FileSystem` API.
60
60
The set of currently supported system calls is very limited—only syscalls that can safely be mapped to the Truffle API level are available. Since LLVM Runtime in managed mode always runs bitcode compiled for Linux/x86, it only needs to implement system calls for this platform.
61
-
* All dependent libraries are executed in managed mode as well, removing all references to natively executed system libraries. This includes libraries that are provided by the LLVM Runtime, such as muslibc.
61
+
* All dependent libraries are executed in managed mode as well, removing all references to natively executed system libraries. This includes libraries that are provided by the LLVM Runtime, such as `muslibc`.
62
62
63
63
Managed mode can be selected when creating a context `(Context.create())` or when calling the `bin/lli` binary by specifying the `--llvm.managed` option. A "managed" context will adhere to any restrictions (for example, `allowIO`) passed during context creation and does not need the `allowNativeAccess` privilege.
0 commit comments