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

Kim Barrett kbarrett at openjdk.java.net
Sat Jan 30 00:21:46 UTC 2021


On Fri, 29 Jan 2021 10:58:53 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> This PR is broken into two commits for easier reviewing, one for removing the usage of `SubTasksDone` in `GenCollectedHeap`, and the other for removing `StrongRootsScope` in the call chain of `GenCollectedHeap::process_roots`.
>> 
>> Tested: hotspot_gc
>
> Albert Mingkun Yang has updated the pull request incrementally with one additional commit since the last revision:
> 
>   remove srs argument

Other than the now extraneous block scopes, this looks good.

src/hotspot/share/gc/shared/genCollectedHeap.cpp line 803:

> 801:   assert(code_roots != NULL, "code root closure should always be set");
> 802: 
> 803:   {

I'd prefer these unneeded scoping brackets were removed too.

src/hotspot/share/gc/shared/strongRootsScope.cpp line 44:

> 42:   // cases, so they expect the thread claim token to be updated.
> 43:   if (_n_threads != 0) {
> 44:     Threads::change_thread_claim_token();

I wonder if we want SerialGC code to deal with StrongRootsScope at all.  But that's beyond the scope of this change.

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

Marked as reviewed by kbarrett (Reviewer).

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



More information about the hotspot-gc-dev mailing list