Integrated: 8285710: Miscalculation of G1CardSetAllocator unused memory size
tqxia
duke at openjdk.java.net
Tue May 10 13:47:58 UTC 2022
On Wed, 27 Apr 2022 11:03:18 GMT, tqxia <duke at openjdk.java.net> wrote:
> 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.
This pull request has now been integrated.
Changeset: 9835678a
Author: dev-tianqixia <txiadev at gmail.com>
Committer: Thomas Schatzl <tschatzl at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/9835678a8658110cd2dac489cf55ab3d9074ea6d
Stats: 3 lines in 1 file changed: 0 ins; 1 del; 2 mod
8285710: Miscalculation of G1CardSetAllocator unused memory size
Reviewed-by: tschatzl, ayang
-------------
PR: https://git.openjdk.java.net/jdk/pull/8424
More information about the hotspot-gc-dev
mailing list