RFR: 8297209: Serial: Refactor GenCollectedHeap::full_process_roots
Thomas Schatzl
tschatzl at openjdk.org
Fri Nov 25 11:27:10 UTC 2022
On Thu, 17 Nov 2022 14:04:39 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
> Simple change of replacing `MarkingCodeBlobClosure` with `CodeBlobToOopClosure` in the adjust-phase of Full GC.
>
> Test: tier1-5
Changes requested by tschatzl (Reviewer).
src/hotspot/share/gc/shared/genCollectedHeap.cpp line 799:
> 797: const bool is_marking_phase = !is_adjust_phase;
> 798:
> 799: if (is_marking_phase) {
I do not think it is useful to explicitly create a local variable of the inverse of a parameter for its single use. That looks like the parameter is wrong.
I recommend either using `is_adjust_phase` directly here (potentially swapping the branches) or change the parameter of the method and the callers if you prefer to have `is_marking_phase` here.
-------------
PR: https://git.openjdk.org/jdk/pull/11210
More information about the hotspot-gc-dev
mailing list