RFR: 8260574: Remove parallel constructs in GenCollectedHeap::process_roots [v2]

Albert Mingkun Yang ayang at openjdk.java.net
Fri Jan 29 10:58:54 UTC 2021


On Fri, 29 Jan 2021 10:00:54 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

>> Albert Mingkun Yang has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   statically known sequential
>
> src/hotspot/share/gc/serial/genMarkSweep.cpp line 188:
> 
>> 186: 
>> 187:     gch->full_process_roots(&srs,
>> 188:                             false, // not the adjust phase
> 
> The `srs` parameter is also only used to get the number of threads in the callees.
> It might be better to remove this parameter similar to the other comment in `serialHeap.cpp` as all that and related code is only used in Serial GC and all the parallel paths here can be removed since CMS is no more.

I only removed its usage in the body, but forgot it in the argument list. Good catch.

> src/hotspot/share/gc/serial/serialHeap.cpp line 101:
> 
>> 99: 
>> 100:   rem_set()->at_younger_refs_iterate();
>> 101:   old_gen()->younger_refs_iterate(old_gen_closure, 0);
> 
> A more complete fix of this issue (failures when setting `StrongRootsScope::n_threads == 1`) would probably be ripping out this second parameter and see what it ripples down to. This extends quite a bit through to `CardGeneration` and `CardTableRS` since serial gc is the only user of this after CMS removal and the parallel code can be removed.
> Feel free to create another CR for this though.

I think it's best to deal with that in another PR.

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

PR: https://git.openjdk.java.net/jdk/pull/2280



More information about the hotspot-gc-dev mailing list