G1YoungGenSizer ignores these values if they are not from the command line. Resulting in a different _sizer_kind than expected.
The NewSize and MaxNewSize are also not bounded by the Initial and Max heap size respectively (JDK-8370494).
I suggest we rewrite this logic using `!FLAG_IS_DEFAULT` to always get the correct behaviour. And only use `FLAG_IS_CMDLINE` for issuing warnings to the user when we ergonomically change or ignore these values to be compatible.
As well as adding the proper truncation for HeapSize incompatible values.
The NewSize and MaxNewSize are also not bounded by the Initial and Max heap size respectively (JDK-8370494).
I suggest we rewrite this logic using `!FLAG_IS_DEFAULT` to always get the correct behaviour. And only use `FLAG_IS_CMDLINE` for issuing warnings to the user when we ergonomically change or ignore these values to be compatible.
As well as adding the proper truncation for HeapSize incompatible values.
- relates to
-
JDK-8370494 G1: NewSize not bounded by InitialHeapSize or MaxHeapSize
-
- Open
-
- links to
-
Review(master)
openjdk/jdk/28255