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

Remove FileMapHeader::_heap_obj_roots

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 19
    • 19
    • hotspot
    • b05

      FileMapHeader::_heap_obj_roots is an narrowOop that's used to remember the objArray that stores all the roots of archived heap objects. Reading/writing of this field requires some ad-hoc code in many places.

      There's already a standard way of reading/writing oops in the CDS archive -- SerializeClosure::do_oop().

      See here for an example:

      https://github.com/iklam/jdk/blame/ad1dc9c2ae5463363aff20072a3f2ca4ea23acd2/src/hotspot/share/memory/universe.cpp#L243

      We should use the same pattern in HeapShared.seralize() to write/restore HeapShared::_roots. That way we can remove FileMapHeader::_heap_obj_roots and the associated ad-hoc code.

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

              Created:
              Updated:
              Resolved: