8037298: Export HotSpots 'optimized' (i.e. not-product) configuration in the top-level configure/makefile
authorsimonis
Mon, 24 Mar 2014 10:15:52 +0100
changeset 23424 65039fb99fda
parent 23423 153d4b6b1124
child 23425 f4c75b6d7e44
8037298: Export HotSpots 'optimized' (i.e. not-product) configuration in the top-level configure/makefile Reviewed-by: ihse
common/autoconf/generated-configure.sh
common/autoconf/help.m4
common/autoconf/jdk-options.m4
--- a/common/autoconf/generated-configure.sh	Fri Mar 21 09:35:43 2014 +0100
+++ b/common/autoconf/generated-configure.sh	Mon Mar 24 10:15:52 2014 +0100
@@ -1861,8 +1861,8 @@
   --with-jvm-variants     JVM variants (separated by commas) to build (server,
                           client, minimal1, kernel, zero, zeroshark, core)
                           [server]
-  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
-                          [release]
+  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
+                          optimized (HotSpot build only)) [release]
   --with-conf-name        use this as the name of the configuration [generated
                           from important configuration options]
   --with-builddeps-conf   use this configuration file for the builddeps
@@ -4233,7 +4233,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1395236071
+DATE_WHEN_GENERATED=1395652496
 
 ###############################################################################
 #
@@ -14648,6 +14648,7 @@
   #
   # Set the debug level
   #    release: no debug information, all optimizations, no asserts.
+  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
   #    fastdebug: debug information (-g), all optimizations, all asserts
   #    slowdebug: debug information (-g), no optimizations, all asserts
   #
@@ -14680,6 +14681,7 @@
 $as_echo "$DEBUG_LEVEL" >&6; }
 
   if test "x$DEBUG_LEVEL" != xrelease && \
+      test "x$DEBUG_LEVEL" != xoptimized && \
       test "x$DEBUG_LEVEL" != xfastdebug && \
       test "x$DEBUG_LEVEL" != xslowdebug; then
     as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
@@ -14716,8 +14718,30 @@
       HOTSPOT_DEBUG_LEVEL="jvmg"
       HOTSPOT_EXPORT="debug"
       ;;
+    optimized )
+      VARIANT="OPT"
+      FASTDEBUG="false"
+      DEBUG_CLASSFILES="false"
+      BUILD_VARIANT_RELEASE="-optimized"
+      HOTSPOT_DEBUG_LEVEL="optimized"
+      HOTSPOT_EXPORT="optimized"
+      ;;
   esac
 
+  # The debug level 'optimized' is a little special because it is currently only
+  # applicable to the HotSpot build where it means to build a completely
+  # optimized version of the VM without any debugging code (like for the
+  # 'release' debug level which is called 'product' in the HotSpot build) but
+  # with the exception that it can contain additional code which is otherwise
+  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
+  # test new and/or experimental features which are not intended for customer
+  # shipment. Because these new features need to be tested and benchmarked in
+  # real world scenarios, we want to build the containing JDK at the 'release'
+  # debug level.
+  if test "x$DEBUG_LEVEL" = xoptimized; then
+    DEBUG_LEVEL="release"
+  fi
+
   #####
   # Generate the legacy makefile targets for hotspot.
   # The hotspot api for selecting the build artifacts, really, needs to be improved.
@@ -42005,8 +42029,6 @@
       ;;
   esac
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: warnings are errors: $CFLAGS_WARNINGS_ARE_ERRORS" >&5
-$as_echo "warnings are errors: $CFLAGS_WARNINGS_ARE_ERRORS" >&6; }
 
 
 # Setup debug symbols (need objcopy from the toolchain for that)
@@ -50222,6 +50244,7 @@
   printf "\n"
   printf "Configuration summary:\n"
   printf "* Debug level:    $DEBUG_LEVEL\n"
+  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
   printf "* JDK variant:    $JDK_VARIANT\n"
   printf "* JVM variants:   $with_jvm_variants\n"
   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
--- a/common/autoconf/help.m4	Fri Mar 21 09:35:43 2014 +0100
+++ b/common/autoconf/help.m4	Mon Mar 24 10:15:52 2014 +0100
@@ -200,6 +200,7 @@
   printf "\n"
   printf "Configuration summary:\n"
   printf "* Debug level:    $DEBUG_LEVEL\n"
+  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
   printf "* JDK variant:    $JDK_VARIANT\n"
   printf "* JVM variants:   $with_jvm_variants\n"
   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
--- a/common/autoconf/jdk-options.m4	Fri Mar 21 09:35:43 2014 +0100
+++ b/common/autoconf/jdk-options.m4	Mon Mar 24 10:15:52 2014 +0100
@@ -176,6 +176,7 @@
   #
   # Set the debug level
   #    release: no debug information, all optimizations, no asserts.
+  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
   #    fastdebug: debug information (-g), all optimizations, all asserts
   #    slowdebug: debug information (-g), no optimizations, all asserts
   #
@@ -189,7 +190,7 @@
       ], [ENABLE_DEBUG="no"])
 
   AC_ARG_WITH([debug-level], [AS_HELP_STRING([--with-debug-level],
-      [set the debug level (release, fastdebug, slowdebug) @<:@release@:>@])],
+      [set the debug level (release, fastdebug, slowdebug, optimized (HotSpot build only)) @<:@release@:>@])],
       [
         DEBUG_LEVEL="${withval}"
         if test "x$ENABLE_DEBUG" = xyes; then
@@ -199,6 +200,7 @@
   AC_MSG_RESULT([$DEBUG_LEVEL])
 
   if test "x$DEBUG_LEVEL" != xrelease && \
+      test "x$DEBUG_LEVEL" != xoptimized && \
       test "x$DEBUG_LEVEL" != xfastdebug && \
       test "x$DEBUG_LEVEL" != xslowdebug; then
     AC_MSG_ERROR([Allowed debug levels are: release, fastdebug and slowdebug])
@@ -235,8 +237,30 @@
       HOTSPOT_DEBUG_LEVEL="jvmg"
       HOTSPOT_EXPORT="debug"
       ;;
+    optimized )
+      VARIANT="OPT"
+      FASTDEBUG="false"
+      DEBUG_CLASSFILES="false"
+      BUILD_VARIANT_RELEASE="-optimized"
+      HOTSPOT_DEBUG_LEVEL="optimized"
+      HOTSPOT_EXPORT="optimized"
+      ;;
   esac
 
+  # The debug level 'optimized' is a little special because it is currently only
+  # applicable to the HotSpot build where it means to build a completely
+  # optimized version of the VM without any debugging code (like for the
+  # 'release' debug level which is called 'product' in the HotSpot build) but
+  # with the exception that it can contain additional code which is otherwise
+  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
+  # test new and/or experimental features which are not intended for customer
+  # shipment. Because these new features need to be tested and benchmarked in
+  # real world scenarios, we want to build the containing JDK at the 'release'
+  # debug level.
+  if test "x$DEBUG_LEVEL" = xoptimized; then
+    DEBUG_LEVEL="release"
+  fi
+
   #####
   # Generate the legacy makefile targets for hotspot.
   # The hotspot api for selecting the build artifacts, really, needs to be improved.