Skip to content

Commit 84fc4d8

Browse files
committed
[GR-33811] Follow Github issues.
PullRequest: graal/9792
2 parents 6419956 + 3be82c3 commit 84fc4d8

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

docs/reference-manual/native-image/DynamicProxy.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ For the exceptional cases where the analysis cannot discover the interface array
9090

9191
## Manual Configuration
9292

93-
Dynamic proxy classes can be generated at native image build time by specifying the list of interfaces that they implement. Native Image provides two options for this purpose: `-H:DynamicProxyConfigurationFiles=<comma-separated-config-files>` and `-H:DynamicProxyConfigurationResources=<comma-separated-config-resources>`.
93+
Dynamic proxy classes can be generated at native image build time by specifying the list of interfaces that they implement.
94+
Native Image provides two options for that: `-H:DynamicProxyConfigurationFiles=<comma-separated-config-files>` and `-H:DynamicProxyConfigurationResources=<comma-separated-config-resources>`. These options accept JSON files whose structure is an array of arrays of fully qualified interface names. For example:
9495

95-
These options accept JSON files whose structure is an array of arrays of fully qualified interface names. For example:
9696
```json
9797
[
9898
["java.lang.AutoCloseable", "java.util.Comparator"],
@@ -101,6 +101,8 @@ These options accept JSON files whose structure is an array of arrays of fully q
101101
]
102102
```
103103

104+
Note that the order of the specified proxy interfaces is significant: two requests for a `Proxy` class with the same combination of interfaces but in a different order will result in two distinct behaviours (for more detailed information, refer to [`Proxy Class `javadoc](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/reflect/Proxy.html).
105+
104106
The `java.lang.reflect.Proxy` API also allows creation of a dynamic proxy that does not implement any user provided interfaces. Therefore the following is a valid configuration:
105107
```json
106108
[

docs/reference-manual/native-image/MemoryManagement.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Note: The maximum heap size is only the upper limit for the Java heap and not ne
4848

4949
The *Serial GC* is optimized for low footprint and small Java heap sizes.
5050
If no other GC is specified, the Serial GC will be used implicitly as the default on both GraalVM Community and Enterprise Edition.
51-
Since GraalVM 20.3, it is also possible to explicitly enable the Serial GC by passing the option `--gc=serial` to the native image builder.
51+
It is also possible to explicitly enable the Serial GC by passing the option `--gc=serial` to the native image builder.
5252

5353
```shell
5454
# Build a native image that uses the serial GC with default settings
@@ -75,6 +75,9 @@ Note that this is just the maximum value.
7575
Depending on the application, the amount of actually used Java heap memory can be much lower.
7676
To override this default behavior, either specify a value for `-XX:MaximumHeapSizePercent` or explicitly set the maximum [Java heap size](#java-heap-size).
7777

78+
Be mindful that the GC needs some extra memory when performing a garbage collection (2x of the maximum heap size is the worst case, usually, it is significantly less).
79+
Therefore, the resident set size, RSS, can increase temporarily during a garbage collection which can be an issue in any environment with memory constraints (such as a container).
80+
7881
### Performance Tuning
7982

8083
For tuning the GC performance and the memory footprint, the following options can be used:

0 commit comments

Comments
 (0)