RFR: 8332448: Make SpaceMangler inherit AllStatic
Kim Barrett
kbarrett at openjdk.org
Mon May 20 20:58:02 UTC 2024
On Fri, 17 May 2024 09:29:07 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
> Extract the state for `top` out of `SpaceMangler`. Users (Serial and Parallel GC) already tracks the top before/after GC. The "real" change in this PR are only two places: `serialFullGC.cpp` and `PSParallelCompact::post_compact`.
>
> Test: tier1-5
Changes requested by kbarrett (Reviewer).
src/hotspot/share/gc/serial/serialFullGC.cpp line 370:
> 368: HeapWord* new_top = get_compaction_top(i);
> 369: // Reset top and unused memory
> 370: space->set_top(new_top);
I'd rather the new_top variable declaration was after the comment rather than before.
src/hotspot/share/gc/shared/spaceDecorator.cpp line 32:
> 30:
> 31: // Simply mangle the MemRegion mr.
> 32: void SpaceMangler::mangle_region(MemRegion mr) {
SpaceMangler::mangle_region should be debug-only rather than not-product, both conceptually, and
because it has no effect in non-debug builds.
-------------
PR Review: https://git.openjdk.org/jdk/pull/19279#pullrequestreview-2067015569
PR Review Comment: https://git.openjdk.org/jdk/pull/19279#discussion_r1607265118
PR Review Comment: https://git.openjdk.org/jdk/pull/19279#discussion_r1607273088
More information about the hotspot-gc-dev
mailing list