RFR: 8259870: zBarrier.inline.hpp should not include javaClasses.hpp
Ioi Lam
iklam at openjdk.java.net
Mon Jan 18 05:56:48 UTC 2021
zBarrier.inline.hpp is a popular header file (it's included by about 430 out of ~1000 hotspot .o files). It includes javaClasses.hpp only for the inline function verify_on_weak(), which is used only for assert purposes in debug builds.
javaClasses.hpp is large and in turn pulls in other large header files. If we move verify_on_weak() into zBarrier.cpp and stop including javaClasses.hpp in zBarrier.inline.hpp, building hotspot is about 0.5% faster. The number of .o files that include javaClasses.hpp is reduced from 459 to 175.
Testing:
Tested with mach5: tier1, builds-tier2, builds-tier3, builds-tier4 and builds-tier5. Also locally: aarch64, arm, ppc64, s390, x86, and zero.
-------------
Commit messages:
- 8259870: zBarrier.inline.hpp should not include javaClasses.hpp
Changes: https://git.openjdk.java.net/jdk/pull/2120/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=2120&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8259870
Stats: 33 lines in 3 files changed: 17 ins; 13 del; 3 mod
Patch: https://git.openjdk.java.net/jdk/pull/2120.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/2120/head:pull/2120
PR: https://git.openjdk.java.net/jdk/pull/2120
More information about the hotspot-gc-dev
mailing list