Skip to content

Commit db151e9

Browse files
committed
[GR-48659] Remove the SpawnIsolate option from the documentation.
PullRequest: graal/15794
2 parents c8c30be + b73b5b5 commit db151e9

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

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

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ javac -cp apps/greeter/classes \
8787
--source-path apps/hello/src \
8888
-d apps/hello/classes org/my/hello/Hello.java
8989
native-image -g \
90-
-H:-SpawnIsolates \
9190
-H:DebugInfoSourceSearchPath=apps/hello/src \
9291
-H:DebugInfoSourceSearchPath=apps/greeter/src \
9392
-cp apps/hello/classes:apps/greeter/classes org.my.hello.Hello
@@ -113,7 +112,6 @@ As an example, the following variant of the previous command specifies an absolu
113112
```shell
114113
SOURCE_CACHE_ROOT=/tmp/$$/sources
115114
native-image -g \
116-
-H:-SpawnIsolates \
117115
-H:DebugInfoSourceCacheRoot=$SOURCE_CACHE_ROOT \
118116
-H:DebugInfoSourceSearchPath=apps/hello/target/hello-sources.jar,apps/greeter/target/greeter-sources.jar \
119117
-cp apps/target/hello.jar:apps/target/greeter.jar \
@@ -702,20 +700,20 @@ Windows support is still under development.
702700

703701
## Debugging with Isolates
704702

705-
Enabling the use of [isolates](https://medium.com/graalvm/isolates-and-compressed-references-more-flexible-and-efficient-memory-management-for-graalvm-a044cc50b67e), by passing command line option `-H:-SpawnIsolates` to the `native-image` builder, affects the way ordinary object pointers (oops) are encoded.
703+
The use of [isolates](https://medium.com/graalvm/isolates-and-compressed-references-more-flexible-and-efficient-memory-management-for-graalvm-a044cc50b67e) in native image affects the way ordinary object pointers (oops) are encoded.
706704
In turn, that means the debug info generator has to provide `gdb` with information about how to translate an encoded oop to the address in memory, where the object data is stored.
707705
This sometimes requires care when asking `gdb` to process encoded oops vs decoded raw addresses.
708706

709-
When isolates are disabled, oops are essentially raw addresses pointing directly at the object contents.
707+
If isolates were disabled, oops would essentially be raw addresses pointing directly at the object contents.
710708
This is generally the same whether the oop is embedded in a static/instance field or is referenced from a local or parameter variable located in a register or saved to the stack.
711709
It is not quite that simple because the bottom 3 bits of some oops may be used to hold "tags" that record certain transient properties of an object.
712710
However, the debug info provided to `gdb` means that it will remove these tag bits before dereferencing the oop as an address.
713711

714-
By contrast, when isolates are enabled, oops references stored in static or instance fields are actually relative addresses, offsets from a dedicated heap base register (r14 on x86_64, r29 on AArch64), rather than direct addresses (in a few special cases the offset may also have some low tag bits set).
712+
With the use of isolates, oops references stored in static or instance fields are actually relative addresses, offsets from a dedicated heap base register (r14 on x86_64, r29 on AArch64), rather than direct addresses (in a few special cases the offset may also have some low tag bits set).
715713
When an "indirect" oop of this kind gets loaded during execution, it is almost always immediately converted to a "raw" address by adding the offset to the heap base register value.
716714
So, oops which occur as the value of local or parameter vars are actually raw addresses.
717715

718-
> Note that on some operating systems enabling isolates causes problems with printing of objects when using a `gdb` release version 10 or earlier. It is currently recommended to disable use of isolates, by passing command line option `-H:-SpawnIsolates`, when generating debug info if your operating system includes one of these earlier releases. Alternatively, you may be able to upgrade your debugger to a later version.
716+
> Note that on some operating systems enabling isolates causes problems with printing of objects when using a `gdb` release version 10 or earlier. It is strongly recommended to upgrade your debugger to a later version.
719717
720718
The DWARF info encoded into the image, when isolates are enabled, tells `gdb` to rebase indirect oops whenever it tries to dereference them to access underlying object data.
721719
This is normally automatic and transparent, but it is visible in the underlying type model that `gdb` displays when you ask for the type of objects.
@@ -1002,4 +1000,4 @@ To make this work, the image needs to be built with `-g` (to generate debuginfo)
10021000

10031001
## Related Documentation
10041002

1005-
- [Debug Native Executables with GDB](guides/debug-native-executables-with-gdb.md)
1003+
- [Debug Native Executables with GDB](guides/debug-native-executables-with-gdb.md)

0 commit comments

Comments
 (0)