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

Remove unnecessary dependency to jfrEvents.hpp

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 15
    • 15
    • hotspot
    • jfr
    • b24

      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

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

              Created:
              Updated:
              Resolved: