Skip to content

Commit 545c9ef

Browse files
committed
[GR-60094] Test and review Native Image guides with JDK 24-EA. Part 3
PullRequest: graal/19631
2 parents 9fbe4bd + 9011cf4 commit 545c9ef

File tree

3 files changed

+18
-9
lines changed

3 files changed

+18
-9
lines changed

docs/getting-started/oci/code-editor.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,5 @@ The Code Editor allows you to accomplish quick coding tasks and run applications
133133

134134
- [Java Hello World with Oracle GraalVM in OCI Code Editor](https://github.com/oracle-devrel/oci-code-editor-samples/tree/main/java-samples/graalvmee-java-hello-world)
135135
- [Micronaut Hello World REST App with Oracle GraalVM in OCI Code Editor](https://github.com/oracle-devrel/oci-code-editor-samples/tree/main/java-samples/graalvmee-java-micronaut-hello-rest)
136-
- [Spring Boot Microservice with Oracle GraalVM in OCI Code Editor](https://github.com/graalvm/graalvm-demos/blob/master/spring-native-image/README-Code-Editor.md)
137136
- [Working with Code Editor](https://docs.oracle.com/en-us/iaas/Content/API/Concepts/code_editor_intro.htm)
138137
- [Oracle GraalVM in OCI Cloud Shell](cloud-shell.md)

docs/reference-manual/native-image/guides/containerise-native-executable-with-docker.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ You will use a GraalVM container image with Native Image to compile a Java appli
2020

2121
## Download a Sample Application
2222

23-
This guide uses the [Spring Boot 3 Native Image Microservice example](https://github.com/graalvm/graalvm-demos/tree/master/native-image/containerize/src/main/java/com/example/benchmarks/jibber).
23+
This guide uses the [Spring Boot 3 Native Image Microservice example](https://github.com/graalvm/graalvm-demos/tree/master/native-image/containerize/spring-boot-microservice-jibber/src/main/java/com/example/benchmarks/jibber).
2424
The example is a minimal REST-based API application, built on top of Spring Boot 3.
2525
If you call the HTTP endpoint `/jibber`, it will return some nonsense verse generated in the style of the Jabberwocky poem, by Lewis Carroll.
2626

@@ -38,7 +38,7 @@ For other installation options, visit the [Downloads section](https://www.graalv
3838

3939
3. Change directory to _native-image/containerize/_:
4040
```shell
41-
cd graalvm-demos/native-image/containerize
41+
cd graalvm-demos/native-image/containerize/spring-boot-microservice-jibber
4242
```
4343

4444
## Build and Run as a Native Executable
@@ -115,4 +115,4 @@ With GraalVM Native Image you can also [build fully static native executables](b
115115

116116
* [Build a Native Executable from a Spring Boot Application](build-spring-boot-application-aot.md)
117117
* <a href="https://docs.oracle.com/en/graalvm/jdk/23/docs/getting-started/container-images/" target="_blank">Oracle GraalVM Container Images</a>
118-
* <a href="https://luna.oracle.com/lab/fdfd090d-e52c-4481-a8de-dccecdca7d68" target="_blank">Hands-on Lab: GraalVM Native Image, Spring and Containerisation</a>
118+
* <a href="https://luna.oracle.com/lab/fdfd090d-e52c-4481-a8de-dccecdca7d68" target="_blank">Hands-on Lab: GraalVM Native Image, Spring and Containerisation</a>

docs/reference-manual/native-image/guides/create-heap-dump-from-native-executable.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ For example:
4242

4343
```shell
4444
./mem-leak-example -XX:+HeapDumpOnOutOfMemoryError
45+
```
46+
You should see a similar output:
47+
```
4548
Dumping heap to svm-heapdump-67799-OOME.hprof ...
4649
Heap dump file created [10046752 bytes in 0.49 secs]
4750
Exception in thread "main" java.lang.OutOfMemoryError: Garbage-collected heap size exceeded.
@@ -54,11 +57,14 @@ This can be useful to identify which objects the Native Image build process allo
5457
For a HelloWorld example, use the option as follows:
5558

5659
```shell
57-
$JAVA_HOME/bin/native-image HelloWorld --enable-monitoring=heapdump
60+
native-image HelloWorld --enable-monitoring=heapdump
61+
```
62+
```shell
5863
./helloworld -XX:+DumpHeapAndExit
59-
Heap dump created at '/path/to/helloworld.hprof'.
6064
```
6165

66+
The heap dump is created at _path/to/helloworld.hprof_.
67+
6268
## Create a Heap Dump with SIGUSR1 (Linux/macOS only)
6369

6470
> Note: This requires the `Signal` API, which is enabled by default except when building shared libraries.
@@ -176,6 +182,9 @@ For other installation options, visit the [Downloads section](https://www.graalv
176182
Run the application:
177183
```shell
178184
./svmheapdump
185+
```
186+
You should see a similar output:
187+
```
179188
17 May 2022, 16:38:13: Hello GraalVM native image developer!
180189
The PID of this process is: 57509
181190
Send it a signal: 'kill -SIGUSR1 57509'
@@ -285,11 +294,12 @@ The condition to create a heap dump is provided as an option on the command line
285294
```
286295
When the command completes, the _svmheapdumpapi_ native executable is created in the current directory.
287296

288-
3. Run the application and check the heap dump
289-
290-
Now you can run your native executable and create a heap dump from it with output similar to the following:
297+
3. Run the application and create a heap dump:
291298
```shell
292299
./svmheapdumpapi --heapdump
300+
```
301+
You should see a similar output:
302+
```
293303
Sep 15, 2020, 4:06:36 PM: Hello GraalVM native image developer.
294304
Your command line options are: --heapdump
295305
Heap dump created /var/folders/hw/s9d78jts67gdc8cfyq5fjcdm0000gp/T/SVMHeapDump-6437252222863577987.hprof, size: 8051959

0 commit comments

Comments
 (0)