RFR: 8030815: Code roots are not accounted for in region prediction [v3]

Albert Mingkun Yang ayang at openjdk.org
Mon Sep 18 11:37:42 UTC 2023


On Thu, 14 Sep 2023 14:07:43 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

>> Hi all,
>> 
>>   please review this change that adds accounting of code root scan to G1.
>> 
>> Previously this has not been done because code root scan has been thought of being negligible in overhead. However some recent investigations showed that it can be of significant importance.
>> 
>> The general idea of how prediction of code roots works is the same as for the (card-based) remembered set - given statistics of cost per code roots, try to predict costs for n code roots per region.
>> 
>> With this change there is some reason for confusion in the naming - we use a plain `rs_` prefix for variables containing information about the card set based remembered set, and this adds `code_root_rs` (for code roots) so the meaning of the former may not be completely clear. There is the follow up [JDK-8315848](https://bugs.openjdk.org/browse/JDK-8315848) that fixes that (https://github.com/tschatzl/jdk/tree/submit/8315848-rename-rs-prefix-to-card-rs).
>> 
>> Testing: gha, performance testing
>> 
>> Thanks,
>>   Thomas
>
> Thomas Schatzl has updated the pull request incrementally with one additional commit since the last revision:
> 
>   ayang review

OK, could we reevaluate its effect once the situation is ready and decide whether to keep this heuristic or not?

>  I needed to start somewhere with changes.

Sure; however, given that the code-root duration can be quite erratic, wouldn't incorporating it into the heuristic potentially have some negative impact? It seems to me that resolving the surrounding issues should take precedence. Ofc, this is quite subjective. 

Approved; up to you how to move this forward.

-------------

Marked as reviewed by ayang (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/15632#pullrequestreview-1630831654


More information about the hotspot-gc-dev mailing list