Many of the objects in the CDS archive heap have no non-null oop fields. (E.g., type arrays, or an object whose oop fields are all null).
With the attached patch, we can see that more than 60% of the spaces used by the archived heap don't need to be marked by the oopmap.
We should reorder the archived heap to segregate the objects that don't need marking. This will save space in the archive and improve start-up time (see alsoJDK-8251322)
calculate_oopmap: objects = 15262 (507904 bytes, 332752 bytes don't need marking), embedded oops = 8408, nulls = 54
Oopmap = 15872 bytes
calculate_oopmap: objects = 4590 (335872 bytes, 178120 bytes don't need marking), embedded oops = 46487, nulls = 29019
Oopmap = 10496 bytes
(332752 + 178120) / (507904 + 335872.0) = 0.6054592688106796
With the attached patch, we can see that more than 60% of the spaces used by the archived heap don't need to be marked by the oopmap.
We should reorder the archived heap to segregate the objects that don't need marking. This will save space in the archive and improve start-up time (see also
calculate_oopmap: objects = 15262 (507904 bytes, 332752 bytes don't need marking), embedded oops = 8408, nulls = 54
Oopmap = 15872 bytes
calculate_oopmap: objects = 4590 (335872 bytes, 178120 bytes don't need marking), embedded oops = 46487, nulls = 29019
Oopmap = 10496 bytes
(332752 + 178120) / (507904 + 335872.0) = 0.6054592688106796
- duplicates
-
JDK-8312187 C++ compiler warnings when trying to print ArchiveHeapTestClass
- Closed
- relates to
-
JDK-8313272 Reduce CDS core region relocation
- Resolved
-
JDK-8310823 CDS archived object streaming
- Closed
-
JDK-8251322 Improve BitMap::iterate
- Resolved
-
JDK-8296344 Remove dependency on G1 for writing the CDS archive heap
- Resolved
(2 links to)