RFR: 8367848: Parallel: Use NMethodToOopClosure during Young GC [v2]

Albert Mingkun Yang ayang at openjdk.org
Wed Sep 17 15:54:45 UTC 2025


On Wed, 17 Sep 2025 15:05:16 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:

>> Albert Mingkun Yang has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   review
>
> src/hotspot/share/gc/parallel/psScavenge.cpp line 237:
> 
>> 235: 
>> 236: class ScavengeRootsTask : public WorkerTask {
>> 237:   Threads::ThreadsClaimTokenScope _threads_claim_token_scope; // needed for Threads::possibly_parallel_threads_do
> 
> I wonder if this class could just be named ClaimTokenScope so that we don't need to see the word Threads twice?
> 
> Threads::ThreadsClaimTokenScope
> 
> vs
> 
> Threads::ClaimTokenScope
> 
> OTOH, the function is named `change_thread_claim_token`. Maybe the second reviewer could weigh in on this.

`ThreadsClaimTokenScope` should only be used by GC code, so I can put it in GC-shared code instead of `threads`.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27336#discussion_r2355992008


More information about the hotspot-runtime-dev mailing list