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

Remove unnecessary dependency to jfrEvents.hpp

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 15
    • Fix Version/s: 15
    • Component/s: hotspot
    • Subcomponent:
      jfr
    • Resolved In Build:
      b24

      Description

      jfrEvents.hpp depends on many header files. It's included (mostly indirectly) by 231 out of about 966 .o files:

      $ find hotspot/ -name \*.d -type f | wc
          966 966 49653
      $ find hotspot/ -name \*.d -type f | xargs cat | wc
       550940 1099952 39642808
      $ find hotspot/ -name \*.d -type f | xargs grep -l jfrEvents.hpp | wc
          231 231 11667

      Most of the dependencies are caused by these 3 header files, which just has minor dependencies in JFR

      http://hg.openjdk.java.net/jdk/jdk/file/0348e9be94d1/src/hotspot/share/opto/compile.hpp
      http://hg.openjdk.java.net/jdk/jdk/file/0348e9be94d1/src/hotspot/share/compiler/compilerEvent.hpp
      http://hg.openjdk.java.net/jdk/jdk/file/0348e9be94d1/src/hotspot/share/gc/g1/g1GCPhaseTimes.hpp

      By restructuring these 3 header files, we can siginficantly reduce the dependency and speed up build time of HotSpot:

      $ find hotspot/ -name \*.d -type f | xargs cat | wc
       528052 1054176 32731307
      $ find hotspot/ -name \*.d -type f | xargs grep -l jfrEvents.hpp | wc
           65 65 3262

      $ time make hotspot:

      before:
      real 2m19.280s
      user 57m15.940s
      sys 4m41.332s

      after:
      real 2m1.446s
      user 52m21.708s
      sys 3m52.544s

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: