RFR: JDK-8221762: Improve Main.gmk/FindTests.gmk bootstrap time

Erik Joelsson erik.joelsson at oracle.com
Mon Apr 1 16:54:11 UTC 2019


With the new run-test test running framework, we introduced 
FindTests.gmk, which among other things, parses all the jtreg 
TEST.groups files to generate make targets for each group. While this is 
very nice, the current implementation in FindTests.gmk adds significant 
time to a simple "do nothing" make execution.

I have experimented with a different implementation, based on caching 
the expensive calculations in a makefile that automatically gets 
re-generated if any of the inputs change.

On my Linux workstation, running the very early make target 
"buildtools-langtools" with the old and new implementation gives the 
following times (real time as reported by the time command):

Old: 460-470ms
New (warm cache): 280-285ms
New (cold cache): 370-380ms

So, even with the cache cold, the new implementation is faster, and with 
the warm cache, 180ms is quite a lot. It can definitely be felt when 
running interactively in the shell.

The new implementation also removes the need for the workaround in 
InitSupport.gmk introduced in JDK-8213736, so I'm removing that.

Bug: https://bugs.openjdk.java.net/browse/JDK-8221762

Webrev: http://cr.openjdk.java.net/~erikj/8221762/webrev.01/index.html

/Erik



More information about the build-dev mailing list