RFR: JDK-8245168 jlink should not be treated as a "small" tool
Magnus Ihse Bursie
magnus.ihse.bursie at oracle.com
Mon May 18 10:12:53 UTC 2020
The linking of the JDK image using the jlink tool takes a considerable
amount of time. However, the jlink tool is classified as a "small java"
tool in the build script. This should only be used on quick small tools
where a long startup time has a measurable performance impact. Clearly
this does not apply to jlink.
The effect of removing the small tool flags are most pronounced when
running a slowdebug build. Robbin Ehn, which made me aware of this,
reduced the running time of jlink from 36 to 21 seconds on his machine
by removing the "small" flags. On a release build, the effect is much
less noticeable, but it's still worth fixing.
Bug: https://bugs.openjdk.java.net/browse/JDK-8245168
Patch inline:
diff --git a/make/autoconf/spec.gmk.in b/make/autoconf/spec.gmk.in
--- a/make/autoconf/spec.gmk.in
+++ b/make/autoconf/spec.gmk.in
@@ -642,7 +642,7 @@
JAVAC=@FIXPATH@ $(JAVAC_CMD)
JAVADOC=@FIXPATH@ $(JAVADOC_CMD)
JAR=@FIXPATH@ $(JAR_CMD)
-JLINK = @FIXPATH@ $(JLINK_CMD) $(JAVA_TOOL_FLAGS_SMALL)
+JLINK = @FIXPATH@ $(JLINK_CMD)
JMOD = @FIXPATH@ $(JMOD_CMD) $(JAVA_TOOL_FLAGS_SMALL)
JARSIGNER=@FIXPATH@ $(JARSIGNER_CMD)
JJS=@FIXPATH@ $(JJS_CMD) $(JAVA_TOOL_FLAGS_SMALL)
/Magnus
More information about the build-dev
mailing list