RFR: 8285710: miscalculation of G1CardSetAllocator wasted memory size [v2]
tqxia
duke at openjdk.java.net
Fri May 6 02:31:11 UTC 2022
> when calculating the wasted memory size of G1CardSetAllocator, the code erroneously substracted both _segmented_array.num_allocated_slots() and _free_slots_list.pending_count() from _segmented_array.num_available_slots().
>
> The correct formula should be: num_wasted_slots = _segmented_array.num_available_slots() - (_segmented_array.num_allocated_slots() - (uint)_free_slots_list.pending_count()).
>
> This can potentially leads to an arithmetic overflow and misleading information will be displayed when G1SummarizeRSetStatsPeriod is set.
tqxia has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains one commit:
8285710: miscalculation of G1CardSetAllocator wasted memory size
-------------
Changes: https://git.openjdk.java.net/jdk/pull/8424/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8424&range=01
Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
Patch: https://git.openjdk.java.net/jdk/pull/8424.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/8424/head:pull/8424
PR: https://git.openjdk.java.net/jdk/pull/8424
More information about the hotspot-gc-dev
mailing list