RFR: 8288537: Refactor hotspot/share/memory/iterator.hpp
Stefan Karlsson
stefank at openjdk.java.net
Thu Jun 16 08:15:08 UTC 2022
On Thu, 16 Jun 2022 02:14:37 GMT, Ioi Lam <iklam at openjdk.org> wrote:
> HotSpot build time has regressed quite a bit since JDK 17 (1m46s vs 2m20s on my machine). Now it's time to do some header file cleanup.
>
> iterator.hpp contains a hodge-podge of unrelated classes. Some of these classes have dependencies on other headers (e.g., `Devirtualizer` depends on bitMap.hpp) that slow down C++ compilation.
>
> This patch moves two infrequently used classes, `Devirtualizer` and `SerializeClosure`, to their own header files. This reduces the total number of C++ lines compiled for libjvm.so for about 1%.
Even though the name sounds generic, the Devirtualizer class was written to support the oop_iterate / OopIterateClosure devirtualization. (Maybe a hint that this should be renamed)
This patch splits the implementation of this devirtualization into two different files. I think that's unfortunate. I'd rather see that we kept that code together. Maybe move all the code into a new oopIterateClosure.inline.hpp file.
However, if you do so, you'll find that we would almost move all the code out of iterator.inline.hpp. To me that makes it unclear how much the move of the Devirtualizer contributed to the fixed compilation time.
Since this patch moves two completely separate closures, could you repurpose this PR to only move the SerializeClosure, so that we can evaluate the move of the OopIterateClosure separately?
-------------
Changes requested by stefank (Reviewer).
PR: https://git.openjdk.org/jdk/pull/9176
More information about the shenandoah-dev
mailing list