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

Reduce the inclusion of perfData.hpp

    XMLWordPrintable

    Details

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

      Description

      perfData.hpp is about 1000 lines long, and is included by 829 out of about 1000 HotSpot .o files.

      Several popular headers (such as synchronizer.hpp, objectMonitor.hpp, threadLocalAllocBuffer.hpp) include perfData.hpp. However, since these headers just declare pointers like

          PerfCounter* foo;

      There's no need to include perfData.hpp. A forward declaration of the PerfCount type would suffice.

      With forward declaration, we can remove perfData.hpp from these headers. This reduces the number of .o files that include perfData.hpp to 183. Build time of HotSpot is reduced by about 0.4%.

        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: