RFR: 8328278: Serial: Compute tenuring threshold before GC
Guoxiong Li
gli at openjdk.org
Mon Mar 18 16:15:27 UTC 2024
On Mon, 18 Mar 2024 15:50:56 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
> Can you elaborate on this? As I understand the code, whether computing the threshold at the end of young-gc-pause or at the start of (next) young-gc-pause doesn't make any diff in the value of the threshold.
Just like the G1, the normal flow is:
- Compute the threshold according to the last age table
- Run GC and tenure according to the threshold
- Print the threshold and the age table
But in current serial GC, the flow is:
- Run GC and tenure according to the new threshold.
- **Compute the new threshold according to the last age table.**
- Print the threshold and the age table.
The last two steps of the serial GC are wrong. Because **the threshold we print is not the threshold we used during GC**.
> Also, why does this patch remove `age_table()->print_age_table..`?
I just moved it to the end of the GC. Notice the `adjust_desired_tenuring_threshold` is moved to the start of the GC.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/18329#issuecomment-2004348550
More information about the hotspot-gc-dev
mailing list