RFR: 8340420: ZGC: Should call `vm_shutdown_during_initialization` if initialization fails [v2]
Axel Boldt-Christmas
aboldtch at openjdk.org
Mon Sep 30 07:42:48 UTC 2024
> ZGC does not call `vm_shutdown_during_initialization` if initialization fails during the setup of the CollectedHeap, in contrast to the other GC.
>
> I propose we add a `ZInitialize::error` which we can use during initialisation to record errors. The first error recored is also stored and used as the error message when shutting down the VM.
>
> Initially used malloc to allocate the error (ed9ba5dd6805291a6b1b56566c933424230d3b4a) but feels like it is just better to have static storage for the string and not have to care about malloc potentially failing to allocate.
Axel Boldt-Christmas has updated the pull request incrementally with two additional commits since the last revision:
- Update src/hotspot/share/gc/z/zInitialize.hpp
Co-authored-by: Stefan Karlsson <stefan.karlsson at oracle.com>
- Update src/hotspot/share/gc/z/zInitialize.cpp
Co-authored-by: Stefan Karlsson <stefan.karlsson at oracle.com>
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/21254/files
- new: https://git.openjdk.org/jdk/pull/21254/files/ed9ba5dd..d54b3eba
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=21254&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=21254&range=00-01
Stats: 4 lines in 2 files changed: 1 ins; 0 del; 3 mod
Patch: https://git.openjdk.org/jdk/pull/21254.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/21254/head:pull/21254
PR: https://git.openjdk.org/jdk/pull/21254
More information about the hotspot-dev
mailing list