RFR: 8328278: Serial: Compute tenuring threshold before GC
Albert Mingkun Yang
ayang at openjdk.org
Mon Mar 18 16:40:26 UTC 2024
On Fri, 15 Mar 2024 15:59:58 GMT, Guoxiong Li <gli at openjdk.org> wrote:
> Hi all,
>
> This patch places the SerialGC code that computes tenuring threshold before per GC instead of after per GC, so that the method `AgeTable::print_on` prints the right tenuring threshold. Just like the current G1 implementation.
>
> Thanks for taking the time to review.
>
> Best Regards,
> -- Guoxiong
Thanks for the explanation.
> Print the threshold and the age table.
I think there are two possible interpretations re the printed value here:
1. the printed threshold and age-table are directly related -- the threshold is calculated from the age-table.
2. the printed threshold and age-table are corresponding to the just finished gc-pause (since printing is at the end of gc-pause). IOW, threshold is used during scavenging and age-table is populated during scavenging.
I think what you have in mind is 2 (right?), and that is what G1 does.
It's not obvious that one is more "correct" than the other. (My first impression is 1, since `AgeTable` has a method to calculate the threshold.)
-------------
PR Comment: https://git.openjdk.org/jdk/pull/18329#issuecomment-2004408424
More information about the hotspot-gc-dev
mailing list