RFR: 8231672: Simplify the reference processing parallelization framework [v5]

Leo Korinth lkorinth at openjdk.java.net
Tue Apr 27 12:28:45 UTC 2021


On Sat, 24 Apr 2021 09:30:17 GMT, Albert Mingkun Yang <ayang 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 seven commits:
>> 
>>  - make RefProcTask a StackObj
>>  - Merge branch 'master' into _8231672
>>  - using proxies instead of ClosureContexts
>>  - remove maybe prefix, change in one place to nullable
>>  - Merge branch 'master' into _8231672
>>  - Changes after first review
>>  - 8231672: Simplify the reference processing parallelization framework
>
> src/hotspot/share/gc/shared/referenceProcessor.cpp line 786:
> 
>> 784: 
>> 785:   proxy_task.prepare_run_task(task, num_queues(), processing_is_mt() ? RefProcThreadModel::Multi : RefProcThreadModel::Single, marks_oops_alive);
>> 786:   if (gang != NULL && processing_is_mt()) {
> 
> Since `gang` is only used in thin branch, moving it inside `if` might be better. Besides, the assertion on L779 could be replaced by the code below, IMO.
> 
> if (processing_is_mt()) {
>   WorkGang* gang = Universe::heap()->safepoint_workers();
>   assert(gang != nullptr, "...");
>   ...
> }

Yes!

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

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



More information about the hotspot-gc-dev mailing list