RFR: Loom compile times

Stefan Karlsson stefank at openjdk.java.net
Wed Mar 16 11:00:24 UTC 2022

It takes almost double the time to compile HotSpot in the Loom repository compared to the mainline. One source of this regression is the include of the *CollectedHeap.inline.hpp files in the *BarrierSet.inline.hpp files, needed to inline the requires_barriers call all the way down to the GC implementations. 

This patch removes the inlining and calls the virtual calls instead. This recuperate most of the lost compilation speed, but not quite all (still about a 20% regression). I've verified with a small micro that this doesn't increase the freeze/thaw times. In fact, it increased the performance slightly. Comparing the generated code, I see that the inlined code had two branches and made a jump to the fast path (and not the expected slow path). With the non-inlined call there's only one branch and the fast-path is right after the check.

The two patches on top of the fix just removes infrastructure that isn't needed when this has been removed.


Commit messages:
 - Remove ConfigT
 - Remove BarrierSet template parameter
 - Stop inlining BS requires_barriers

Changes: https://git.openjdk.java.net/loom/pull/104/files
 Webrev: https://webrevs.openjdk.java.net/?repo=loom&pr=104&range=00
  Stats: 177 lines in 13 files changed: 25 ins; 122 del; 30 mod
  Patch: https://git.openjdk.java.net/loom/pull/104.diff
  Fetch: git fetch https://git.openjdk.java.net/loom pull/104/head:pull/104

PR: https://git.openjdk.java.net/loom/pull/104

More information about the loom-dev mailing list