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

Remove unnecessary inclusion of oopMap.hpp

    XMLWordPrintable

Details

    • Enhancement
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • 17
    • 17
    • hotspot
    • b18

    Description

      oopMap.hpp is included by about 585 out of about 1000 .o files in HotSpot. In turn, it pulls in other complex headers such as vmreg.hpp, register.hpp and their cpu-dependent headers.

      There are only 4 header files that include oopMap.hpp. All of these can be replaced for forward declarations.

      According to https://github.com/iklam/tools/tree/main/headers

      [before]

      /jdk/src/hotspot$ whoincludes oopMap.hpp
      scanning 585 oopMap.hpp
         2 found 553 method.hpp
         3 found 407 codeBlob.hpp
         4 found 262 debugInfoRec.hpp
         5 found 232 ciEnv.hpp
      /jdk/src/hotspot$ whoincludes vmreg.hpp
      scanning 597 vmreg.hpp
         2 found 585 oopMap.hpp
         3 found 281 location.hpp
         4 found 118 regmask.hpp
         5 found 109 registerMap.hpp
         ...
      /jdk/src/hotspot$ whoincludes register.hpp
      scanning 611 register.hpp
         2 found 611 register_x86.hpp
         3 found 597 vmreg.hpp
         4 found 364 assembler.hpp
         5 found 364 assembler_x86.hpp
         ...

      [after]

      /jdk/src/hotspot$ whoincludes oopMap.hpp
      scanning 39 oopMap.hpp
         2 found 6 c1_LinearScan.hpp
      /jdk/src/hotspot$ whoincludes vmreg.hpp
      scanning 333 vmreg.hpp
         2 found 281 location.hpp
         3 found 181 sharedRuntime.hpp
         4 found 118 regmask.hpp
         5 found 109 registerMap.hpp
         ...
      /jdk/src/hotspot$ whoincludes register.hpp
      scanning 386 register.hpp
         2 found 386 register_x86.hpp
         3 found 364 assembler.hpp
         4 found 364 assembler_x86.hpp
         5 found 333 vmreg.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: