RFR: 8367993: G1: Speed up ConcurrentMark initialization [v3]

Leo Korinth lkorinth at openjdk.org
Fri Jan 9 15:37:53 UTC 2026


On Fri, 9 Jan 2026 08:22:40 GMT, Stefan Johansson <sjohanss at openjdk.org> wrote:

>> Leo Korinth has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 564 commits:
>> 
>>  - Merge branch '8373253' into 8367993
>>  - Merge branch 'master' into _8373253
>>  - Merge branch 'master' into _8367993
>>  - 8366058: Outdated comment in WinCAPISeedGenerator
>>    
>>    Reviewed-by: mullan
>>  - 8357258: x86: Improve receiver type profiling reliability
>>    
>>    Reviewed-by: kvn, vlivanov
>>  - 8373704: Improve "SocketException: Protocol family unavailable" message
>>    
>>    Reviewed-by: lucy, jpai
>>  - 8373722: [TESTBUG] compiler/vectorapi/TestVectorOperationsWithPartialSize.java fails intermittently
>>    
>>    Reviewed-by: jiefu, jbhateja, erfang, qamai
>>  - 8343809: Add requires tag to mark tests that are incompatible with exploded image
>>    
>>    Reviewed-by: alanb, dholmes
>>  - 8374465: Spurious dot in documentation for JVMTI ClassLoad
>>    
>>    Reviewed-by: kbarrett
>>  - 8374317: Change GCM IV size to 12 bytes when encrypting/decrypting TLS session ticket
>>    
>>    Reviewed-by: djelinski, mpowers, ascarpino
>>  - ... and 554 more: https://git.openjdk.org/jdk/compare/2aa8aa4b...28ccbb68
>
> src/hotspot/share/gc/g1/g1CollectedHeap.cpp line 2427:
> 
>> 2425:   if (_cm->is_fully_initialized()) {
>> 2426:     tc->do_thread(_cm->cm_thread());
>> 2427:   }
> 
> Since the _cm_thread is now in `G1ConcurrentMark` this should be handled in `G1ConcurrentMark::threads_do()`

I agree that looks better

> src/hotspot/share/gc/g1/g1CollectedHeap.cpp line 2549:
> 
>> 2547: void G1CollectedHeap::start_concurrent_cycle(bool concurrent_operation_is_full_mark) {
>> 2548:   assert(!_cm->in_progress(), "Can not start concurrent operation while in progress");
>> 2549:   assert(_cm->is_fully_initialized(), "sanity");
> 
> Not sure this sanity assert is needed `_cm->in_progress()` will always return `false` if not fully initialized, so the above assert will cover this. If we still want it, I think it should be moved above the `in_progress()` assert.

Will move it before.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28723#discussion_r2676638153
PR Review Comment: https://git.openjdk.org/jdk/pull/28723#discussion_r2676644693


More information about the hotspot-gc-dev mailing list