Merge
authorduke
Wed, 05 Jul 2017 21:46:08 +0200
changeset 38590 d68c5446755e
parent 38589 2435017e82ff (current diff)
parent 38549 621f57997e82 (diff)
child 38592 858bcf5481e6
Merge
--- a/.hgtags-top-repo	Mon May 30 14:58:59 2016 +0900
+++ b/.hgtags-top-repo	Wed Jul 05 21:46:08 2017 +0200
@@ -362,3 +362,4 @@
 e882bcdbdac436523f3d5681611d3118a3804ea7 jdk-9+117
 047f95de8f918d8ff5e8cd2636a2abb5c3c8adb8 jdk-9+118
 3463a3f14f0f0e8a68f29ac6405454f2fa2f598a jdk-9+119
+647e0142a5a52749db572b5e6638d561def6479e jdk-9+120
--- a/common/autoconf/configure.ac	Mon May 30 14:58:59 2016 +0900
+++ b/common/autoconf/configure.ac	Wed Jul 05 21:46:08 2017 +0200
@@ -229,6 +229,7 @@
 
 JDKOPT_DETECT_INTREE_EC
 JDKOPT_ENABLE_DISABLE_FAILURE_HANDLER
+JDKOPT_ENABLE_DISABLE_GENERATE_CLASSLIST
 
 ###############################################################################
 #
--- a/common/autoconf/generated-configure.sh	Mon May 30 14:58:59 2016 +0900
+++ b/common/autoconf/generated-configure.sh	Wed Jul 05 21:46:08 2017 +0200
@@ -650,6 +650,7 @@
 JOBS
 MEMORY_SIZE
 NUM_CORES
+ENABLE_GENERATE_CLASSLIST
 BUILD_FAILURE_HANDLER
 ENABLE_INTREE_EC
 STLPORT_LIB
@@ -1226,6 +1227,7 @@
 with_dxsdk_lib
 with_dxsdk_include
 enable_jtreg_failure_handler
+enable_generate_classlist
 with_num_cores
 with_memory_size
 with_jobs
@@ -2005,6 +2007,10 @@
                           Default is auto, where the failure handler is built
                           if all dependencies are present and otherwise just
                           disabled.
+  --disable-generate-classlist
+                          forces enabling or disabling of the generation of a
+                          CDS classlist at build time. Default is to generate
+                          it when either the server or client JVMs are built.
   --enable-sjavac         use sjavac to do fast incremental compiles
                           [disabled]
   --disable-javac-server  disable javac server [enabled]
@@ -4391,6 +4397,12 @@
 #
 
 
+################################################################################
+#
+# Enable or disable generation of the classlist at build time
+#
+
+
 #
 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -5080,7 +5092,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1463732692
+DATE_WHEN_GENERATED=1464173584
 
 ###############################################################################
 #
@@ -64812,6 +64824,51 @@
 
 
 
+  # Check whether --enable-generate-classlist was given.
+if test "${enable_generate_classlist+set}" = set; then :
+  enableval=$enable_generate_classlist;
+fi
+
+
+  # Check if it's likely that it's possible to generate the classlist. Depending
+  # on exact jvm configuration it could be possible anyway.
+  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
+    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
+  else
+    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
+  fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
+$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
+  if test "x$enable_generate_classlist" = "xyes"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
+$as_echo "yes, forced" >&6; }
+    ENABLE_GENERATE_CLASSLIST="true"
+    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
+$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
+    fi
+  elif test "x$enable_generate_classlist" = "xno"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
+$as_echo "no, forced" >&6; }
+    ENABLE_GENERATE_CLASSLIST="false"
+  elif test "x$enable_generate_classlist" = "x"; then
+    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+      ENABLE_GENERATE_CLASSLIST="true"
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+      ENABLE_GENERATE_CLASSLIST="false"
+    fi
+  else
+    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
+  fi
+
+
+
+
 ###############################################################################
 #
 # Configure parts of the build that only affect the build performance,
--- a/common/autoconf/jdk-options.m4	Mon May 30 14:58:59 2016 +0900
+++ b/common/autoconf/jdk-options.m4	Wed Jul 05 21:46:08 2017 +0200
@@ -491,3 +491,46 @@
 
   AC_SUBST(BUILD_FAILURE_HANDLER)
 ])
+
+################################################################################
+#
+# Enable or disable generation of the classlist at build time
+#
+AC_DEFUN_ONCE([JDKOPT_ENABLE_DISABLE_GENERATE_CLASSLIST],
+[
+  AC_ARG_ENABLE([generate-classlist], [AS_HELP_STRING([--disable-generate-classlist],
+      [forces enabling or disabling of the generation of a CDS classlist at build time.
+      Default is to generate it when either the server or client JVMs are built.])])
+
+  # Check if it's likely that it's possible to generate the classlist. Depending
+  # on exact jvm configuration it could be possible anyway.
+  if HOTSPOT_CHECK_JVM_VARIANT(server) || HOTSPOT_CHECK_JVM_VARIANT(client); then
+    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
+  else
+    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
+  fi
+
+  AC_MSG_CHECKING([if the CDS classlist generation should be enabled])
+  if test "x$enable_generate_classlist" = "xyes"; then
+    AC_MSG_RESULT([yes, forced])
+    ENABLE_GENERATE_CLASSLIST="true"
+    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
+      AC_MSG_WARN([Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS])
+    fi
+  elif test "x$enable_generate_classlist" = "xno"; then
+    AC_MSG_RESULT([no, forced])
+    ENABLE_GENERATE_CLASSLIST="false"
+  elif test "x$enable_generate_classlist" = "x"; then
+    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
+      AC_MSG_RESULT([yes])
+      ENABLE_GENERATE_CLASSLIST="true"
+    else
+      AC_MSG_RESULT([no])
+      ENABLE_GENERATE_CLASSLIST="false"
+    fi
+  else
+    AC_MSG_ERROR([Invalid value for --enable-generate-classlist: $enable_generate_classlist])
+  fi
+
+  AC_SUBST([ENABLE_GENERATE_CLASSLIST])
+])
--- a/common/autoconf/spec.gmk.in	Mon May 30 14:58:59 2016 +0900
+++ b/common/autoconf/spec.gmk.in	Wed Jul 05 21:46:08 2017 +0200
@@ -285,6 +285,8 @@
 
 BUILD_FAILURE_HANDLER := @BUILD_FAILURE_HANDLER@
 
+ENABLE_GENERATE_CLASSLIST := @ENABLE_GENERATE_CLASSLIST@
+
 # The boot jdk to use. This is overridden in bootcycle-spec.gmk. Make sure to keep
 # it in sync.
 BOOT_JDK:=@BOOT_JDK@
--- a/hotspot/.hgtags	Mon May 30 14:58:59 2016 +0900
+++ b/hotspot/.hgtags	Wed Jul 05 21:46:08 2017 +0200
@@ -522,3 +522,4 @@
 88170d3642905b9e6cac03e8efcc976885a7e6da jdk-9+117
 9b1075cac08dc836ec32e7b368415cbe3aceaf8c jdk-9+118
 15f3fe264872766bcb205696198f0c1502420e17 jdk-9+119
+0be6f4f5d18671184e62583668cb1d783dffa128 jdk-9+120
--- a/make/Images.gmk	Mon May 30 14:58:59 2016 +0900
+++ b/make/Images.gmk	Wed Jul 05 21:46:08 2017 +0200
@@ -115,9 +115,12 @@
 # Use this file inside the image as target for make rule
 JIMAGE_TARGET_FILE := bin/java$(EXE_SUFFIX)
 
-JLINK_ORDER_RESOURCES := \
-    *module-info.class* \
-    @$(SUPPORT_OUTPUTDIR)/classlist/classlist,/java.base/java/* \
+JLINK_ORDER_RESOURCES := *module-info.class*
+ifeq ($(ENABLE_GENERATE_CLASSLIST), true)
+  JLINK_ORDER_RESOURCES += @$(SUPPORT_OUTPUTDIR)/classlist/classlist
+endif
+JLINK_ORDER_RESOURCES += \
+    /java.base/java/* \
     /java.base/jdk/* \
     /java.base/sun/* \
     /java.base/com/* \
@@ -125,9 +128,10 @@
     #
 
 JLINK_TOOL := $(JLINK) --modulepath $(IMAGES_OUTPUTDIR)/jmods \
-              --endian $(OPENJDK_BUILD_CPU_ENDIAN) \
-              --order-resources=$(call CommaList, $(JLINK_ORDER_RESOURCES)) \
-              --release-info $(BASE_RELEASE_FILE)
+    --endian $(OPENJDK_BUILD_CPU_ENDIAN) \
+    --release-info $(BASE_RELEASE_FILE) \
+    --order-resources=$(call CommaList, $(JLINK_ORDER_RESOURCES)) \
+    #
 
 ifeq ($(JLINK_KEEP_PACKAGED_MODULES), true)
   JLINK_EXTRA_OPTS := --keep-packaged-modules $(JDK_IMAGE_DIR)/jmods
@@ -369,19 +373,21 @@
 ################################################################################
 # classlist
 
-$(eval $(call SetupCopyFiles, JDK_COPY_CLASSLIST, \
-    FILES := $(SUPPORT_OUTPUTDIR)/classlist/classlist, \
-    DEST := $(JDK_IMAGE_DIR)/lib, \
-))
+ifeq ($(ENABLE_GENERATE_CLASSLIST), true)
+  $(eval $(call SetupCopyFiles, JDK_COPY_CLASSLIST, \
+      FILES := $(SUPPORT_OUTPUTDIR)/classlist/classlist, \
+      DEST := $(JDK_IMAGE_DIR)/lib, \
+  ))
 
-JDK_TARGETS += $(JDK_COPY_CLASSLIST)
+  JDK_TARGETS += $(JDK_COPY_CLASSLIST)
 
-$(eval $(call SetupCopyFiles, JRE_COPY_CLASSLIST, \
-    FILES := $(SUPPORT_OUTPUTDIR)/classlist/classlist, \
-    DEST := $(JRE_IMAGE_DIR)/lib, \
-))
+  $(eval $(call SetupCopyFiles, JRE_COPY_CLASSLIST, \
+      FILES := $(SUPPORT_OUTPUTDIR)/classlist/classlist, \
+      DEST := $(JRE_IMAGE_DIR)/lib, \
+  ))
 
-JRE_TARGETS += $(JRE_COPY_CLASSLIST)
+  JRE_TARGETS += $(JRE_COPY_CLASSLIST)
+endif
 
 ################################################################################
 # /demo dir
--- a/make/Main.gmk	Mon May 30 14:58:59 2016 +0900
+++ b/make/Main.gmk	Wed Jul 05 21:46:08 2017 +0200
@@ -373,8 +373,10 @@
 interim-image:
 	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f InterimImage.gmk)
 
-generate-classlist:
+ifeq ($(ENABLE_GENERATE_CLASSLIST), true)
+  generate-classlist:
 	+($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f GenerateClasslist.gmk)
+endif
 
 ALL_TARGETS += interim-image generate-classlist
 
@@ -640,18 +642,22 @@
 
   jrtfs-jar: interim-langtools
 
-  ifeq ($(CREATE_BUILDJDK), true)
-    # If creating a buildjdk, the interim image needs to be based on that.
-    generate-classlist: create-buildjdk
-  else ifeq ($(EXTERNAL_BUILDJDK), false)
-    # If an external buildjdk has been provided, we skip generating an
-    # interim-image and just use the external buildjdk for generating
-    # classlist.
-    generate-classlist: interim-image
+  ifeq ($(ENABLE_GENERATE_CLASSLIST), true)
+    ifeq ($(CREATE_BUILDJDK), true)
+      # If creating a buildjdk, the interim image needs to be based on that.
+      generate-classlist: create-buildjdk
+    else ifeq ($(EXTERNAL_BUILDJDK), false)
+      # If an external buildjdk has been provided, we skip generating an
+      # interim-image and just use the external buildjdk for generating
+      # classlist.
+      generate-classlist: interim-image
+    endif
+    generate-classlist: buildtools-jdk
+
+    jimages: generate-classlist
   endif
-  generate-classlist: buildtools-jdk
 
-  jimages: jmods zip-source source-tips demos samples jrtfs-jar generate-classlist
+  jimages: jmods zip-source source-tips demos samples jrtfs-jar
 
   profiles: jmods zip-source source-tips jrtfs-jar