RFR: 8301106 allow cds interned strings to be moved by gc [v2]

Ioi Lam iklam at openjdk.org
Tue Feb 21 04:10:49 UTC 2023


On Tue, 21 Feb 2023 01:04:14 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/classfile/stringTable.cpp line 76:
> 
>> 74: 
>> 75: #if INCLUDE_CDS_JAVA_HEAP
>> 76: bool StringTable::_two_dimensional_shared_strings_array = false;
> 
> Suggestion: `_is_two_dimensional`

Renamed to `_two_dimensional_shared_strings_array`.

> src/hotspot/share/classfile/stringTable.cpp line 788:
> 
>> 786:     objArrayOop array = oopFactory::new_objArray(vmClasses::Object_klass(), total, CHECK);
>> 787:     _shared_strings_array = OopHandle(Universe::vm_global(), array);
>> 788:     _two_dimensional_shared_strings_array = false;
> 
> It was initialized to false.

Removed.

> src/hotspot/share/classfile/stringTable.hpp line 128:
> 
>> 126:   //     ArchiveHeapWriter::is_too_large_to_archive(). In this case, the index is splited into two
>> 127:   //     parts using the follow bit-opts. Each the shared string is stored as
>> 128:   //     _shared_strings_array[upper][lower]
> 
> upper/lower don't match use of primary/secondary. I'm still unclear how the 32-bit index is split in the two dimensional case.

I reworded the comments and use the same terminology as in the actual code (primary_index, secondary_index).

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

PR: https://git.openjdk.org/jdk/pull/12607


More information about the hotspot-runtime-dev mailing list