RFR: 8260307: Do not include method.hpp in frame.hpp

Lois Foltan lfoltan at openjdk.java.net
Fri Jan 22 20:20:45 UTC 2021


On Fri, 22 Jan 2021 18:50:48 GMT, Ioi Lam <iklam at openjdk.org> wrote:

> frame.hpp is a popular header file (included by 876 out of 1000 HotSpot.o file). It includes method.hpp, which in turn pulls in all the class metadata types such as instanceKlass.hpp, constantPool.hpp, etc.
> 
> We can replace the inclusion of method.hpp with a forward declaration of the Method class.
> 
> This reduces the number of .o files that include method.hpp from 882 to 586.
> 
> HotSpot build time is reduced by more than 2%.
> 
> Tested with mach5: tier1, builds-tier2, builds-tier3, builds-tier4 and builds-tier5. Also locally: aarch64, arm, ppc64, s390, x86, and zero.

Looks good.
Lois

-------------

Marked as reviewed by lfoltan (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/2201


More information about the hotspot-dev mailing list