RFR: 8274927: Remove unnecessary G1ArchiveAllocator code

Thomas Schatzl tschatzl at openjdk.java.net
Mon Oct 11 11:50:17 UTC 2021


On Fri, 8 Oct 2021 12:53:49 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> Hi all,
>> 
>>   can I have reviews for this change that removes code that is fairly trivially recognizable as useless?
>> 
>> The `_archive_allocator` is always freed after use (see `HeapShared::copy_closed/open_objects`), so it must always be `nullptr` when it's accessed outside the CDS dump code.
>> I kept the asserts in the original places, but idk if that is really necessary.
>> 
>> Testing: tier1-5
>
> The change looks good. Since `_archive_allocator` is often null, I wonder if this means the field should be moved to another place.

Thanks @albertnetymk @kimbarrett for your reviews

-------------

PR: https://git.openjdk.java.net/jdk/pull/5861



More information about the hotspot-gc-dev mailing list