common/autoconf/boot-jdk.m4
changeset 23171 56a45cb104d1
parent 22728 0a9d96bf2023
child 23982 12e7bb480a6b
equal deleted inserted replaced
23170:51e606ecede5 23171:56a45cb104d1
   348   [specify JVM arguments to be passed to all java invocations of boot JDK, overriding the default values,
   348   [specify JVM arguments to be passed to all java invocations of boot JDK, overriding the default values,
   349   e.g --with-boot-jdk-jvmargs="-Xmx8G -enableassertions"])])
   349   e.g --with-boot-jdk-jvmargs="-Xmx8G -enableassertions"])])
   350 
   350 
   351   AC_MSG_CHECKING([flags for boot jdk java command] )
   351   AC_MSG_CHECKING([flags for boot jdk java command] )
   352 
   352 
       
   353   # Disable special log output when a debug build is used as Boot JDK...
       
   354   ADD_JVM_ARG_IF_OK([-XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput],boot_jdk_jvmargs,[$JAVA])
       
   355 
       
   356   # Apply user provided options.
       
   357   ADD_JVM_ARG_IF_OK([$with_boot_jdk_jvmargs],boot_jdk_jvmargs,[$JAVA])
       
   358 
       
   359   AC_MSG_RESULT([$boot_jdk_jvmargs])
       
   360 
       
   361   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
       
   362   JAVA_FLAGS=$boot_jdk_jvmargs
       
   363   AC_SUBST(JAVA_FLAGS)
       
   364 
       
   365 
       
   366   AC_MSG_CHECKING([flags for boot jdk java command for big workloads])
       
   367 
   353   # Starting amount of heap memory.
   368   # Starting amount of heap memory.
   354   ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs,[$JAVA])
   369   ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs_big,[$JAVA])
   355 
   370 
   356   # Maximum amount of heap memory.
   371   # Maximum amount of heap memory.
   357   # Maximum stack size.
   372   # Maximum stack size.
   358   if test "x$BUILD_NUM_BITS" = x32; then
   373   if test "x$BUILD_NUM_BITS" = x32; then
   359     JVM_MAX_HEAP=1100M
   374     JVM_MAX_HEAP=1100M
   364     # space for the jvm. More specifically, when running javac to build huge
   379     # space for the jvm. More specifically, when running javac to build huge
   365     # jdk batch
   380     # jdk batch
   366     JVM_MAX_HEAP=1600M
   381     JVM_MAX_HEAP=1600M
   367     STACK_SIZE=1536
   382     STACK_SIZE=1536
   368   fi
   383   fi
   369   ADD_JVM_ARG_IF_OK([-Xmx$JVM_MAX_HEAP],boot_jdk_jvmargs,[$JAVA])
   384   ADD_JVM_ARG_IF_OK([-Xmx$JVM_MAX_HEAP],boot_jdk_jvmargs_big,[$JAVA])
   370   ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs,[$JAVA])
   385   ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs_big,[$JAVA])
   371 
   386 
   372   # Disable special log output when a debug build is used as Boot JDK...
   387   AC_MSG_RESULT([$boot_jdk_jvmargs_big])
   373   ADD_JVM_ARG_IF_OK([-XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput],boot_jdk_jvmargs,[$JAVA])
   388 
   374 
   389   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
   375   # Apply user provided options.
   390   AC_SUBST(JAVA_FLAGS_BIG)
   376   ADD_JVM_ARG_IF_OK([$with_boot_jdk_jvmargs],boot_jdk_jvmargs,[$JAVA])
   391 
   377 
   392 
   378   AC_MSG_RESULT([$boot_jdk_jvmargs])
   393   AC_MSG_CHECKING([flags for boot jdk java command for small workloads])
   379 
   394 
   380   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
   395   # Use serial gc for small short lived tools if possible
   381   JAVA_FLAGS=$boot_jdk_jvmargs
   396   ADD_JVM_ARG_IF_OK([-XX:+UseSerialGC],boot_jdk_jvmargs_small,[$JAVA])
   382 
   397   ADD_JVM_ARG_IF_OK([-Xms32M],boot_jdk_jvmargs_small,[$JAVA])
   383   AC_SUBST(BOOT_JDK_JVMARGS, $boot_jdk_jvmargs)
   398   ADD_JVM_ARG_IF_OK([-Xmx512M],boot_jdk_jvmargs_small,[$JAVA])
   384   AC_SUBST(JAVA_FLAGS, $JAVA_FLAGS)
   399 
   385 ])
   400   AC_MSG_RESULT([$boot_jdk_jvmargs_small])
       
   401 
       
   402   JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
       
   403   AC_SUBST(JAVA_FLAGS_SMALL)
       
   404 ])