Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8351087

Combine scratch object tables in heapShared.cpp

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 25
    • None
    • hotspot
    • b13

      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.

            iklam Ioi Lam
            iklam Ioi Lam
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: