RFR: 8300769: Remove G1CollectionSet::_inc_bytes_used_before [v3]
Albert Mingkun Yang
ayang at openjdk.org
Tue Jan 24 06:19:04 UTC 2023
On Mon, 23 Jan 2023 15:14:00 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
>> Hi all,
>>
>> please review this removal of `G1CollectionSet::_inc_bytes_used_before`; this variable holds the amount of bytes used in eden regions, updated during mutator time. At the start of gc its value is copied to `G1CollectionSet::_bytes_used_before`, and then never touched again. The `_bytes_used_before` is read at end of gc, and then reset.
>>
>> This change simply removes `_inc_bytes_used_before` and directly uses `_bytes_used_before` to accumulate eden region used bytes.
>>
>> Testing: gha
>>
>> Thanks,
>> Thomas
>
> Thomas Schatzl has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains three commits:
>
> - Merge branch 'master' into pull/12113
> - ayang review, remove redundant _bytes_used_before
> - initial version
Marked as reviewed by ayang (Reviewer).
src/hotspot/share/gc/g1/g1YoungGCPostEvacuateTasks.cpp line 468:
> 466: void report(G1CollectedHeap* g1h, G1EvacInfo* evacuation_info) {
> 467: evacuation_info->set_regions_freed(_regions_freed);
> 468: evacuation_info->set_collection_set_used_before(_after_used_bytes + _before_used_bytes);
The ordering, `before + after`, is more natural, IMO.
-------------
PR: https://git.openjdk.org/jdk/pull/12113
More information about the hotspot-gc-dev
mailing list