On 2022-07-14 20:02, Ioi Lam wrote:
My windows build is very slow, and it spends the first few minutes compiling test_xxx.obj files.

Is it possible to build the HotSpot VM .obj files first?

This is on my long list of "nice to have" enhancement: https://bugs.openjdk.org/browse/JDK-8217726

I actually started trying to fix it a few months ago, but ran into some unexpected snags. I honestly do not remember what the problems were right now. The work, as far as I got, is available here: https://github.com/magicus/jdk/tree/move-gtest-to-test

Unfortunately this will cause a slight performance penalty when building the entire image from scratch (like in our CI systems) due to missed opportunities of parallelisation (and because make is stupid enough to not utilize the fact that the hotspot dll is done earlier), but it will make pure "make hotspot" builds much faster.

If anyone feels like continuing the work, it's all up for grabs. Otherwise I'll get around to it when I get around to it... :-(

/Magnus



Thanks
- Ioi

$ time make hotspot LOG=info
Generating main target list
Running make as 'make LOG=info hotspot'
Building target 'hotspot' in configuration 'windows-x64-slowdebug'
Building JVM variant 'server' with features 'cds compiler1 compiler2 epsilongc g1gc jfr jni-check jvmci jvmti management oracle-src parallelgc serialgc services vm-structs zgc'
Updating support/modules_libs/java.base/server/jvm.dll due to 6 file(s)
Compiling BUILD_GTEST_LIBJVM_pch.cpp (for jvm.dll)
Compiling BUILD_LIBJVM_pch.cpp (for jvm.dll)
Compiling gtestMain.cpp (for jvm.dll)
Compiling logTestFixture.cpp (for jvm.dll)
Compiling metaspaceGtestCommon.cpp (for jvm.dll)
Compiling metaspaceGtestContexts.cpp (for jvm.dll)
Compiling test_AltHashing.cpp (for jvm.dll)
Compiling test_ThreadsListHandle.cpp (for jvm.dll)
Compiling test_adaptiveSampler.cpp (for jvm.dll)
Compiling test_align.cpp (for jvm.dll)
Compiling test_allocationGuard.cpp (for jvm.dll)
Compiling test_arena.cpp (for jvm.dll)
Compiling test_arenagrowthpolicy.cpp (for jvm.dll)

Reply via email to