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

Reduce inclusion of metaspace.hpp

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 17
    • 17
    • hotspot
    • b12

    Description

      metaspace.hpp is included by about 770 out of 1000 HotSpot .o files. Most of these are transitively included via array.hpp and classLoaderData.hpp.

      classLoaderData.hpp doesn't actually need metaspace.hpp. array.hpp can be refactored to put functions that depend on metaspace.hpp into array.inline.hpp

      Doing the above reduces the number of .o files that include metaspace.hpp to 343. Since this is still a significant number, we should split out the rarely used parts (such as MetaspaceGC, MetaspaceUtils) into a new header file (metaspaceUtils.hpp, which is included only 30 times).

      Also, these 3 includes can now be removed from metaspace.hpp.

      #include "memory/memRegion.hpp"
      #include "memory/metaspaceChunkFreeListSummary.hpp"
      #include "memory/virtualspace.hpp"


      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: