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

Reduce inclusion of collectedHeap.hpp and heapInspection.hpp

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 17
    • Component/s: hotspot
    • Subcomponent:
      gc
    • Resolved In Build:
      b09

      Description

      collectedHeap.hpp is included by 477 out of 1000 .o files in HotSpot. This file in turn includes many other complex header files.

      In many cases, an object file only directly includes this file via:

      - memAllocator.hpp (which does not actually use collectedHeap.hpp)
      - oop.inline.hpp and compressedOops.inline.hpp (only uses collectedHeap.hpp) in asserts.

      By refactoring the above 3 files, we can reduce the .o files that include collectedHeap.hpp to 242.

      This RFE also removes the unnecessary inclusion of heapInspection.hpp from collectedHeap.hpp.

      Build time of HotSpot is reduced for about 1%.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: