During startup, before `is_init_completed` returns true, GC can't occur.
For example, in `VM_GC_Operation::doit_prologue`:
if (!is_init_completed()) {
vm_exit_during_initialization(
err_msg("GC triggered before VM initialization completed. Try increasing "
"NewSize, current value %zu%s.",
byte_size_in_proper_unit(NewSize),
proper_unit_for_byte_size(NewSize)));
}
To better handle the scenario of the initial heap being too small or too much allocation during startup, one can expand heap depending on `is_init_completed`.
For example, in `VM_GC_Operation::doit_prologue`:
if (!is_init_completed()) {
vm_exit_during_initialization(
err_msg("GC triggered before VM initialization completed. Try increasing "
"NewSize, current value %zu%s.",
byte_size_in_proper_unit(NewSize),
proper_unit_for_byte_size(NewSize)));
}
To better handle the scenario of the initial heap being too small or too much allocation during startup, one can expand heap depending on `is_init_completed`.
- relates to
-
JDK-8365932 Implementation of JEP 516: Ahead-of-Time Object Caching with Any GC
-
- Open
-
-
JDK-8371019 G1: Support heap expansion during startup
-
- Open
-
- links to
-
Commit(master)
openjdk/jdk/67a81c47
-
Review(master)
openjdk/jdk/28059