RFR: 8301106 allow cds interned strings to be moved by gc [v2]
Ioi Lam
iklam at openjdk.org
Sat Feb 18 04:59:25 UTC 2023
On Fri, 17 Feb 2023 06:34:42 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Ioi Lam has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - renamed obsolete functions to ArchiveHeapLoader::is_in_use()
>> - fixed typos in comment
>
> src/hotspot/share/cds/archiveHeapLoader.hpp line 68:
>
>> 66: }
>> 67:
>> 68: static bool are_archived_strings_available() {
>
> The functions don't seem to carry their weight any more. Perhaps we can just rename `is_fully_available` to `is_archive_available` and always call it directly?
We use to allow the archive to be partially loaded. This is no longer true anymore. I renamed the three functions `are_archived_strings_available`, `are_archived_mirrors_available` and `is_fully_available` to `is_in_use()`. The name corresponds to the `ArchiveHeapLoader::can_use()` function.
(It's a pity that the archive can be "used" either by "mapping" or "loading" -- see comments at the top of archiveHeapLoader.hpp. Eventually we will support only mapping. At that time, `is_in_use()` will be renamed to `is_mapped()` ...)
> src/hotspot/share/cds/heapShared.cpp line 426:
>
>> 424: oop shared_strings_array = StringTable::init_shared_table(_dumped_interned_strings);
>> 425: bool success = archive_reachable_objects_from(1, _default_subgraph_info, shared_strings_array, /*is_closed_archive=*/ false);
>> 426: guarantee(success, "shared strings array should not point to any unachivable objects");
>
> typo: unachivable
Fixed.
> src/hotspot/share/cds/heapShared.cpp line 592:
>
>> 590: assert(HeapShared::can_write(), "must be");
>> 591:
>> 592: {
>
> Why do you need a new scope here?
I used the scope to mark that the two archiving operations must be done within the scope of
{
init_seen_objects_table();
....
delete_seen_objects_table();
}
And the `delete_seen_objects_table()` must be called before the rest of the function can proceed.
-------------
PR: https://git.openjdk.org/jdk/pull/12607
More information about the hotspot-runtime-dev
mailing list