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

Ioi Lam iklam at openjdk.org
Sat Feb 25 13:09:04 UTC 2023


On Tue, 21 Feb 2023 23:38:34 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   @ashu-mehra and @dholmes-ora review -- better assert and error checking for large objects; added StringTable::verify_secondary_array_index_bits()
>
> src/hotspot/share/classfile/stringTable.cpp line 800:
> 
>> 798:       // but bail out for safety.
>> 799:       log_error(cds)("Too many strings to be archived: " SIZE_FORMAT, _items_count);
>> 800:       os::_exit(1);
> 
> Hmm I hadn't really noticed that the CDS code has introduced its own direct exit path using `os::_exit` in a number of places. Why does it do this instead of using the existing VM exit paths?

The reason is explained in metaspaceShared.cpp, but perhaps we should consolidate all these direct exit calls (in a separate PR) to an utility function so it's easy to track (and explain) all the calls.


  // There may be pending VM operations. We have changed some global states
  // (such as vmClasses::_klasses) that may cause these VM operations
  // to fail. For safety, forget these operations and exit the VM directly.
  os::_exit(0);

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

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


More information about the hotspot-runtime-dev mailing list