This simple patch doubles the compile-speed of the hotspot repo on Windows

Kelly O'Hair kelly.ohair at oracle.com
Sat Feb 2 00:42:15 UTC 2013


Great stuff.  Have you filed an issue on this? Or shall I?


-kto

On Feb 1, 2013, at 4:58 AM, Fredrik Öhrström wrote:

> ie. use /MP on the cl.exe command line.
> 
> On the build machine (Windows Server 2007, Visual Studio 2010, 32 HT
> cores, 64GB ram) configuring with:
> 
> sh configure --enable-sjavac
> --with-freetype=/cygdrive/d/tools/freetype-amd64
> --with-boot-jdk=/cygdrive/d/java/jdk-7-fcs-bin-b147/
> 
> (You need to patch
> src/share/classes/com/sun/tools/sjavac/server/CompilerThread.java
> line 256, change equals("windows)" to startswith("windows), this fix
> is going into tl soon.)
> 
> Without MP
> ----- Build times -------
> Start 2013-02-01 12:23:50
> End   2013-02-01 12:35:20
> 00:00:32 corba
> 00:04:43 hotspot
> 00:00:15 jaxp
> 00:00:24 jaxws
> 00:04:49 jdk
> 00:00:46 langtools
> 00:11:30 TOTAL
> -------------------------
> 
> With MP
> ----- Build times -------
> Start 2013-02-01 12:54:54
> End   2013-02-01 13:03:56
> 00:00:31 corba
> 00:02:20 hotspot
> 00:00:14 jaxp
> 00:00:22 jaxws
> 00:04:44 jdk
> 00:00:46 langtools
> 00:09:02 TOTAL
> -------------------------
> 
> For such a simple patch it is a nice speedup. Please test and see if
> it improves the speed on your multi core machines.
> 
> //Fredrik
> 
> Oh, and for reference this is the speed without sjavac but with /MP.
> 
> ----- Build times -------
> Start 2013-02-01 13:39:38
> End   2013-02-01 13:51:46
> 00:00:35 corba
> 00:02:24 hotspot
> 00:00:28 jaxp
> 00:00:36 jaxws
> 00:07:11 jdk
> 00:00:48 langtools
> 00:12:08 TOTAL
> -------------------------
> 
> $ hg diff
> diff -r 67498c863813 make/windows/makefiles/compile.make
> --- a/make/windows/makefiles/compile.make       Thu Jan 17 12:16:06 2013 +0100
> +++ b/make/windows/makefiles/compile.make       Fri Feb 01 13:05:08 2013 +0100
> @@ -44,6 +44,7 @@
> #   /GS       Inserts security stack checks in some functions (VS2005 default)
> #   /Oi       Use intrinsics (in /O2)
> #   /Od       Disable all optimizations
> +#   /MP       Use multiple cores for compilation
> #
> # NOTE: Normally following any of the above with a '-' will turn off that flag
> #
> @@ -52,7 +53,7 @@
> # improving the quality of crash log stack traces involving jvm.dll.
> 
> # These are always used in all compiles
> -CXX_FLAGS=/nologo /W3 /WX
> +CXX_FLAGS=/nologo /W3 /WX /MP
> 
> # Let's add debug information when Full Debug Symbols is enabled
> !if "$(ENABLE_FULL_DEBUG_SYMBOLS)" == "1"
> diff -r 67498c863813 make/windows/makefiles/sa.make
> --- a/make/windows/makefiles/sa.make    Thu Jan 17 12:16:06 2013 +0100
> +++ b/make/windows/makefiles/sa.make    Fri Feb 01 13:05:08 2013 +0100
> @@ -108,6 +108,8 @@
> SA_LFLAGS = $(SA_LFLAGS) -map -debug
> !endif
> 
> +SA_CFLAGS = $(SA_CFLAGS) -MP
> +
> # Note that we do not keep sawindbj.obj around as it would then
> # get included in the dumpbin command in build_vm_def.sh




More information about the build-dev mailing list