< prev index next >

make/autoconf/hotspot.m4

Print this page
rev 52710 : Upstream/backport Shenandoah to JDK11u


   8 # particular file as subject to the "Classpath" exception as provided
   9 # by Oracle in the LICENSE file that accompanied this code.
  10 #
  11 # This code is distributed in the hope that it will be useful, but WITHOUT
  12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14 # version 2 for more details (a copy is included in the LICENSE file that
  15 # accompanied this code).
  16 #
  17 # You should have received a copy of the GNU General Public License version
  18 # 2 along with this work; if not, write to the Free Software Foundation,
  19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20 #
  21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22 # or visit www.oracle.com if you need additional information or have any
  23 # questions.
  24 #
  25 
  26 # All valid JVM features, regardless of platform
  27 VALID_JVM_FEATURES="compiler1 compiler2 zero minimal dtrace jvmti jvmci \
  28     graal vm-structs jni-check services management cmsgc epsilongc g1gc parallelgc serialgc zgc nmt cds \
  29     static-build link-time-opt aot jfr"
  30 
  31 # Deprecated JVM features (these are ignored, but with a warning)
  32 DEPRECATED_JVM_FEATURES="trace"
  33 
  34 # All valid JVM variants
  35 VALID_JVM_VARIANTS="server client minimal core zero custom"
  36 
  37 ###############################################################################
  38 # Check if the specified JVM variant should be built. To be used in shell if
  39 # constructs, like this:
  40 # if HOTSPOT_CHECK_JVM_VARIANT(server); then
  41 #
  42 # Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
  43 
  44 # Definition kept in one line to allow inlining in if statements.
  45 # Additional [] needed to keep m4 from mangling shell constructs.
  46 AC_DEFUN([HOTSPOT_CHECK_JVM_VARIANT],
  47 [ [ [[ " $JVM_VARIANTS " =~ " $1 " ]] ] ])
  48 


 321     AC_MSG_ERROR([Specified JVM feature 'management' requires feature 'nmt'])
 322   fi
 323 
 324   if HOTSPOT_CHECK_JVM_FEATURE(jvmci) && ! (HOTSPOT_CHECK_JVM_FEATURE(compiler1) || HOTSPOT_CHECK_JVM_FEATURE(compiler2)); then
 325     AC_MSG_ERROR([Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'])
 326   fi
 327 
 328   if HOTSPOT_CHECK_JVM_FEATURE(cmsgc) && ! HOTSPOT_CHECK_JVM_FEATURE(serialgc); then
 329     AC_MSG_ERROR([Specified JVM feature 'cmsgc' requires feature 'serialgc'])
 330   fi
 331 
 332   # Enable JFR by default, except for Zero, linux-sparcv9 and on minimal.
 333   if ! HOTSPOT_CHECK_JVM_VARIANT(zero); then
 334     if test "x$OPENJDK_TARGET_OS" != xaix; then
 335       if test "x$OPENJDK_TARGET_OS" != xlinux || test "x$OPENJDK_TARGET_CPU" != xsparcv9; then
 336         NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jfr"
 337       fi
 338     fi
 339   fi
 340 









 341   # Only enable ZGC on supported platforms
 342   AC_MSG_CHECKING([if zgc can be built])
 343   if test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
 344     AC_MSG_RESULT([yes])
 345   else
 346     DISABLED_JVM_FEATURES="$DISABLED_JVM_FEATURES zgc"
 347     AC_MSG_RESULT([no, platform not supported])
 348   fi
 349 
 350   # Disable unsupported GCs for Zero
 351   if HOTSPOT_CHECK_JVM_VARIANT(zero); then
 352     DISABLED_JVM_FEATURES="$DISABLED_JVM_FEATURES epsilongc g1gc zgc"
 353   fi
 354 
 355   # Turn on additional features based on other parts of configure
 356   if test "x$INCLUDE_DTRACE" = "xtrue"; then
 357     JVM_FEATURES="$JVM_FEATURES dtrace"
 358   else
 359     if HOTSPOT_CHECK_JVM_FEATURE(dtrace); then
 360       AC_MSG_ERROR([To enable dtrace, you must use --enable-dtrace])
 361     fi
 362   fi
 363 
 364   if test "x$STATIC_BUILD" = "xtrue"; then
 365     JVM_FEATURES="$JVM_FEATURES static-build"
 366   else
 367     if HOTSPOT_CHECK_JVM_FEATURE(static-build); then
 368       AC_MSG_ERROR([To enable static-build, you must use --enable-static-build])
 369     fi
 370   fi
 371 
 372   if ! HOTSPOT_CHECK_JVM_VARIANT(zero); then


 466       AC_MSG_RESULT([no, forced])
 467     else
 468       AC_MSG_RESULT([no])
 469     fi
 470     JVM_FEATURES_aot=""
 471     if HOTSPOT_CHECK_JVM_FEATURE(aot); then
 472       AC_MSG_ERROR([To enable aot, you must use --enable-aot])
 473     fi
 474   fi
 475 
 476   AC_SUBST(ENABLE_AOT)
 477 
 478   if test "x$OPENJDK_TARGET_CPU" = xarm ; then
 479     # Default to use link time optimizations on minimal on arm
 480     JVM_FEATURES_link_time_opt="link-time-opt"
 481   else
 482     JVM_FEATURES_link_time_opt=""
 483   fi
 484 
 485   # All variants but minimal (and custom) get these features
 486   NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES cmsgc g1gc parallelgc serialgc epsilongc jni-check jvmti management nmt services vm-structs zgc"
 487 
 488   AC_MSG_CHECKING([if cds should be enabled])
 489   if test "x$ENABLE_CDS" = "xtrue"; then
 490     if test "x$enable_cds" = "xyes"; then
 491       AC_MSG_RESULT([yes, forced])
 492     else
 493       AC_MSG_RESULT([yes])
 494     fi
 495     NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES cds"
 496   else
 497     if test "x$enable_cds" = "xno"; then
 498       AC_MSG_RESULT([no, forced])
 499     else
 500       AC_MSG_RESULT([no])
 501     fi
 502   fi
 503 
 504   # Enable features depending on variant.
 505   JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
 506   JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES"




   8 # particular file as subject to the "Classpath" exception as provided
   9 # by Oracle in the LICENSE file that accompanied this code.
  10 #
  11 # This code is distributed in the hope that it will be useful, but WITHOUT
  12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14 # version 2 for more details (a copy is included in the LICENSE file that
  15 # accompanied this code).
  16 #
  17 # You should have received a copy of the GNU General Public License version
  18 # 2 along with this work; if not, write to the Free Software Foundation,
  19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20 #
  21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22 # or visit www.oracle.com if you need additional information or have any
  23 # questions.
  24 #
  25 
  26 # All valid JVM features, regardless of platform
  27 VALID_JVM_FEATURES="compiler1 compiler2 zero minimal dtrace jvmti jvmci \
  28     graal vm-structs jni-check services management cmsgc epsilongc g1gc parallelgc serialgc shenandoahgc zgc nmt cds \
  29     static-build link-time-opt aot jfr"
  30 
  31 # Deprecated JVM features (these are ignored, but with a warning)
  32 DEPRECATED_JVM_FEATURES="trace"
  33 
  34 # All valid JVM variants
  35 VALID_JVM_VARIANTS="server client minimal core zero custom"
  36 
  37 ###############################################################################
  38 # Check if the specified JVM variant should be built. To be used in shell if
  39 # constructs, like this:
  40 # if HOTSPOT_CHECK_JVM_VARIANT(server); then
  41 #
  42 # Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
  43 
  44 # Definition kept in one line to allow inlining in if statements.
  45 # Additional [] needed to keep m4 from mangling shell constructs.
  46 AC_DEFUN([HOTSPOT_CHECK_JVM_VARIANT],
  47 [ [ [[ " $JVM_VARIANTS " =~ " $1 " ]] ] ])
  48 


 321     AC_MSG_ERROR([Specified JVM feature 'management' requires feature 'nmt'])
 322   fi
 323 
 324   if HOTSPOT_CHECK_JVM_FEATURE(jvmci) && ! (HOTSPOT_CHECK_JVM_FEATURE(compiler1) || HOTSPOT_CHECK_JVM_FEATURE(compiler2)); then
 325     AC_MSG_ERROR([Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'])
 326   fi
 327 
 328   if HOTSPOT_CHECK_JVM_FEATURE(cmsgc) && ! HOTSPOT_CHECK_JVM_FEATURE(serialgc); then
 329     AC_MSG_ERROR([Specified JVM feature 'cmsgc' requires feature 'serialgc'])
 330   fi
 331 
 332   # Enable JFR by default, except for Zero, linux-sparcv9 and on minimal.
 333   if ! HOTSPOT_CHECK_JVM_VARIANT(zero); then
 334     if test "x$OPENJDK_TARGET_OS" != xaix; then
 335       if test "x$OPENJDK_TARGET_OS" != xlinux || test "x$OPENJDK_TARGET_CPU" != xsparcv9; then
 336         NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jfr"
 337       fi
 338     fi
 339   fi
 340 
 341   # Only enable Shenandoah on supported arches
 342   AC_MSG_CHECKING([if shenandoah can be built])
 343   if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86" || test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
 344     AC_MSG_RESULT([yes])
 345   else
 346     DISABLED_JVM_FEATURES="$DISABLED_JVM_FEATURES shenandoahgc"
 347     AC_MSG_RESULT([no, platform not supported])
 348   fi
 349 
 350   # Only enable ZGC on supported platforms
 351   AC_MSG_CHECKING([if zgc can be built])
 352   if test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
 353     AC_MSG_RESULT([yes])
 354   else
 355     DISABLED_JVM_FEATURES="$DISABLED_JVM_FEATURES zgc"
 356     AC_MSG_RESULT([no, platform not supported])
 357   fi
 358 
 359   # Disable unsupported GCs for Zero
 360   if HOTSPOT_CHECK_JVM_VARIANT(zero); then
 361     DISABLED_JVM_FEATURES="$DISABLED_JVM_FEATURES epsilongc g1gc shenandoahgc zgc"
 362   fi
 363 
 364   # Turn on additional features based on other parts of configure
 365   if test "x$INCLUDE_DTRACE" = "xtrue"; then
 366     JVM_FEATURES="$JVM_FEATURES dtrace"
 367   else
 368     if HOTSPOT_CHECK_JVM_FEATURE(dtrace); then
 369       AC_MSG_ERROR([To enable dtrace, you must use --enable-dtrace])
 370     fi
 371   fi
 372 
 373   if test "x$STATIC_BUILD" = "xtrue"; then
 374     JVM_FEATURES="$JVM_FEATURES static-build"
 375   else
 376     if HOTSPOT_CHECK_JVM_FEATURE(static-build); then
 377       AC_MSG_ERROR([To enable static-build, you must use --enable-static-build])
 378     fi
 379   fi
 380 
 381   if ! HOTSPOT_CHECK_JVM_VARIANT(zero); then


 475       AC_MSG_RESULT([no, forced])
 476     else
 477       AC_MSG_RESULT([no])
 478     fi
 479     JVM_FEATURES_aot=""
 480     if HOTSPOT_CHECK_JVM_FEATURE(aot); then
 481       AC_MSG_ERROR([To enable aot, you must use --enable-aot])
 482     fi
 483   fi
 484 
 485   AC_SUBST(ENABLE_AOT)
 486 
 487   if test "x$OPENJDK_TARGET_CPU" = xarm ; then
 488     # Default to use link time optimizations on minimal on arm
 489     JVM_FEATURES_link_time_opt="link-time-opt"
 490   else
 491     JVM_FEATURES_link_time_opt=""
 492   fi
 493 
 494   # All variants but minimal (and custom) get these features
 495   NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES cmsgc g1gc parallelgc serialgc epsilongc shenandoahgc jni-check jvmti management nmt services vm-structs zgc"
 496 
 497   AC_MSG_CHECKING([if cds should be enabled])
 498   if test "x$ENABLE_CDS" = "xtrue"; then
 499     if test "x$enable_cds" = "xyes"; then
 500       AC_MSG_RESULT([yes, forced])
 501     else
 502       AC_MSG_RESULT([yes])
 503     fi
 504     NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES cds"
 505   else
 506     if test "x$enable_cds" = "xno"; then
 507       AC_MSG_RESULT([no, forced])
 508     else
 509       AC_MSG_RESULT([no])
 510     fi
 511   fi
 512 
 513   # Enable features depending on variant.
 514   JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
 515   JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES"


< prev index next >