C2: Clean up include statements to speed up compilation when touching type.hpp

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 25
    • Affects Version/s: 25
    • Component/s: hotspot
    • b03

      I've noticed that after touching type.hpp in Valhalla, it requires more than 7 minutes to build hotspot. I would have suspected that we mostly recompile C2/opto source files. But that is far from the truth: A lot of unrelated source files must be recompiled, including, for example, C1, JFR, or runtime files.

      In mainline, the impact is not that severe. But it still requires around 1 minute to build hotspot again on my machine after touching type.hpp. I've had a look at the include chains and removed quite a lot of unused includes and moved some code around where one include pulled in a lot of unnecessary code. The mainline patch could also be applied to the current Valhalla repository (with some small tweaks).

      The results were quite promising. I could bring the compilation time significantly down in mainline and especially in Valhalla:
      - Mainline: ~1min -> ~40s (1.5 times faster)
      - Valhalla: ~7min -> ~40s (10.5 times faster)

      I've only focused on type.hpp here but I guess other includes in the JIT compiler area or other parts of hotspot could also be improved to speed up recompilation after touching some header files.

            Assignee:
            Christian Hagedorn
            Reporter:
            Christian Hagedorn
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: