With AOTMappedHeapLoader, the interned strings are stored inside a cached ObjArray. Because cached ObjArrays cannot be larger than 256KB, we need to split this ObjArray into two levels when there are a lot of interned strings
https://github.com/openjdk/jdk/blob/fa1b1d677ac492dfdd3110b9303a4c2b009046c8/src/hotspot/share/classfile/stringTable.cpp#L81-L93
However, we already have a similar mechanism for storing heap roots in multiple ObjArrays that are smaller than 256KB:
https://github.com/openjdk/jdk/blob/fa1b1d677ac492dfdd3110b9303a4c2b009046c8/src/hotspot/share/cds/aotMappedHeapLoader.cpp#L403-L409
By storing the interned strings inside the heap roots array, we can get rid of the two-level ObjArray manipulation code in stringTables.cpp.
Also, this RFE is a prerequisite forJDK-8375569. The function StringTable::allocate_shared_strings_array() requires that the JVM runs only a single Java thread:
https://github.com/openjdk/jdk/blob/fa1b1d677ac492dfdd3110b9303a4c2b009046c8/src/hotspot/share/classfile/stringTable.cpp#L971-L980
However, when creating the AOT configuration in the AOT training run, the program can have multiple Java threads, so StringTable::allocate_shared_strings_array() is not going to work. After this RFE is implemented, this function is removed.
https://github.com/openjdk/jdk/blob/fa1b1d677ac492dfdd3110b9303a4c2b009046c8/src/hotspot/share/classfile/stringTable.cpp#L81-L93
However, we already have a similar mechanism for storing heap roots in multiple ObjArrays that are smaller than 256KB:
https://github.com/openjdk/jdk/blob/fa1b1d677ac492dfdd3110b9303a4c2b009046c8/src/hotspot/share/cds/aotMappedHeapLoader.cpp#L403-L409
By storing the interned strings inside the heap roots array, we can get rid of the two-level ObjArray manipulation code in stringTables.cpp.
Also, this RFE is a prerequisite for
https://github.com/openjdk/jdk/blob/fa1b1d677ac492dfdd3110b9303a4c2b009046c8/src/hotspot/share/classfile/stringTable.cpp#L971-L980
However, when creating the AOT configuration in the AOT training run, the program can have multiple Java threads, so StringTable::allocate_shared_strings_array() is not going to work. After this RFE is implemented, this function is removed.
- blocks
-
JDK-8375569 Store Java mirrors in AOT configuration file
-
- Resolved
-
- links to
-
Commit(master)
openjdk/jdk/a54ff1bf
-
Review(master)
openjdk/jdk/29459