Integrated: 8260012: Reduce inclusion of collectedHeap.hpp and heapInspection.hpp
Ioi Lam
iklam at openjdk.java.net
Thu Feb 4 04:09:07 UTC 2021
On Tue, 2 Feb 2021 04:18:24 GMT, Ioi Lam <iklam at openjdk.org> wrote:
> collectedHeap.hpp is included by 477 out of 1000 .o files in HotSpot. This file in turn includes many other complex header files.
>
> In many cases, an object file only directly includes this file via:
>
> - memAllocator.hpp (which does not actually use collectedHeap.hpp)
> - oop.inline.hpp and compressedOops.inline.hpp (only use collectedHeap.hpp in asserts via `Universe::heap()->is_in()`).
>
> By refactoring the above 3 files, we can reduce the .o files that include collectedHeap.hpp to 242.
>
> This RFE also removes the unnecessary inclusion of heapInspection.hpp from collectedHeap.hpp.
>
> Build time of HotSpot is reduced for about 1%.
>
> Tested with mach5: tier1, builds-tier2, builds-tier3, builds-tier4 and builds-tier5. Also locally: aarch64, arm, ppc64, s390, x86, and zero.
This pull request has now been integrated.
Changeset: 82028e70
Author: Ioi Lam <iklam at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/82028e70
Stats: 110 lines in 60 files changed: 69 ins; 7 del; 34 mod
8260012: Reduce inclusion of collectedHeap.hpp and heapInspection.hpp
Reviewed-by: stefank, tschatzl
-------------
PR: https://git.openjdk.java.net/jdk/pull/2347
More information about the hotspot-gc-dev
mailing list