RFR: 8315503: G1: Code root scan causes long GC pauses due to imbalanced iteration [v5]

Thomas Schatzl tschatzl at openjdk.org
Tue Sep 26 14:14:19 UTC 2023


On Tue, 26 Sep 2023 11:55:13 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> Thomas Schatzl has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   unregister-nmethod still called during nmethod::flush
>
> src/hotspot/share/gc/g1/g1CollectedHeap.cpp line 3041:
> 
>> 3039:              p2i(_nm), HR_FORMAT_PARAMS(hr), HR_FORMAT_PARAMS(hr->humongous_start_region()));
>> 3040: 
>> 3041:       // HeapRegion::add_code_root() avoids adding duplicate entries.
> 
> Obsolete comment.

The comment is still current. https://bugs.openjdk.org/browse/JDK-8316212 is going to remove the extra check for `add()` to require the caller to make sure that nothing is added while iterating.

I will remove the comment anyway because it does not add anything (and the important thing really is that no entries are added during iteration, not the duplicate thing).

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15811#discussion_r1337279894


More information about the hotspot-gc-dev mailing list