The following two tables are used to remember the "scratch" copies of different types of Java heap objects.
https://github.com/openjdk/jdk/blob/99fb350bf65f9469c8097ddebcc6742255435a88/src/hotspot/share/cds/heapShared.cpp#L144-L145
MetaspaceObjToOopHandleTable* HeapShared::_scratch_java_mirror_table = nullptr;
MetaspaceObjToOopHandleTable* HeapShared::_scratch_references_table = nullptr;
However, an object cannot be in both tables. So we can just combine the two tables into one.
https://github.com/openjdk/jdk/blob/99fb350bf65f9469c8097ddebcc6742255435a88/src/hotspot/share/cds/heapShared.cpp#L144-L145
MetaspaceObjToOopHandleTable* HeapShared::_scratch_java_mirror_table = nullptr;
MetaspaceObjToOopHandleTable* HeapShared::_scratch_references_table = nullptr;
However, an object cannot be in both tables. So we can just combine the two tables into one.
- links to
-
Commit(master) openjdk/jdk/b6e2d66c
-
Review(master) openjdk/jdk/23876