# HG changeset patch # User duke # Date 1499279603 -7200 # Node ID 9cabd4ebd12be4d4dd09fa66912cfc8ec9f38e10 # Parent 9c04ed826c93576085db9c2a2d4d66946310a269# Parent 9c16a2d26332f701671a37c994b47e47b4ff67af Merge diff -r 9c04ed826c93 -r 9cabd4ebd12b .hgtags-top-repo --- a/.hgtags-top-repo Thu May 14 20:15:26 2015 -0700 +++ b/.hgtags-top-repo Wed Jul 05 20:33:23 2017 +0200 @@ -306,3 +306,4 @@ ea38728b4f4bdd8fd0d7a89b18069f521cf05013 jdk9-b61 105d045a69174d870b69bfe471b3f2d05a9f8ecc jdk9-b62 0b32ed628fa60e4ab99fb0b5866d648e16231f17 jdk9-b63 +82cf9aab9a83e41c8194ba01af9666afdb856cbe jdk9-b64 diff -r 9c04ed826c93 -r 9cabd4ebd12b common/autoconf/basics.m4 --- a/common/autoconf/basics.m4 Thu May 14 20:15:26 2015 -0700 +++ b/common/autoconf/basics.m4 Wed Jul 05 20:33:23 2017 +0200 @@ -705,9 +705,9 @@ # is performed. filtered_files=`$ECHO "$files_present" \ | $SED -e 's/config.log//g' \ - -e 's/confdefs.h//g' \ - -e 's/fixpath.exe//g' \ - -e 's/ //g' \ + -e 's/configure.log//g' \ + -e 's/confdefs.h//g' \ + -e 's/ //g' \ | $TR -d '\n'` if test "x$filtered_files" != x; then AC_MSG_NOTICE([Current directory is $CURDIR.]) @@ -1054,3 +1054,29 @@ AC_SUBST(BASH_ARGS) ]) + +# Code to run after AC_OUTPUT +AC_DEFUN_ONCE([BASIC_POST_CONFIG_OUTPUT], +[ + # Try to move config.log (generated by autoconf) to the configure-support directory. + if test -e ./config.log; then + $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null + fi + + # Rotate our log file (configure.log) + if test -e "$OUTPUT_ROOT/configure.log.old"; then + $RM -f "$OUTPUT_ROOT/configure.log.old" + fi + if test -e "$OUTPUT_ROOT/configure.log"; then + $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null + fi + + # Move configure.log from current directory to the build output root + if test -e ./configure.log; then + echo found it + $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null + fi + + # Make the compare script executable + $CHMOD +x $OUTPUT_ROOT/compare.sh +]) diff -r 9c04ed826c93 -r 9cabd4ebd12b common/autoconf/configure --- a/common/autoconf/configure Thu May 14 20:15:26 2015 -0700 +++ b/common/autoconf/configure Wed Jul 05 20:33:23 2017 +0200 @@ -255,13 +255,10 @@ set -x fi -if test "x$conf_debug_configure" = xtrue; then - # Turn on logging, but don't turn on twice when called recursive - conf_debug_logfile=./debug-configure.log - (exec 3>&1 ; (. $conf_script_to_run "${conf_processed_arguments[@]}" 2>&1 1>&3 ) | tee -a $conf_debug_logfile 1>&2 ; exec 3>&-) | tee -a $conf_debug_logfile -else - ( . $conf_script_to_run "${conf_processed_arguments[@]}" ) -fi +# Now transfer control to the script generated by autoconf. This is where the +# main work is done. +conf_logfile=./configure.log +(exec 3>&1 ; (. $conf_script_to_run "${conf_processed_arguments[@]}" 2>&1 1>&3 ) | tee -a $conf_logfile 1>&2 ; exec 3>&-) | tee -a $conf_logfile conf_result_code=$? ### diff -r 9c04ed826c93 -r 9cabd4ebd12b common/autoconf/configure.ac --- a/common/autoconf/configure.ac Thu May 14 20:15:26 2015 -0700 +++ b/common/autoconf/configure.ac Wed Jul 05 20:33:23 2017 +0200 @@ -265,15 +265,10 @@ # Create the actual output files. Now the main work of configure is done. AC_OUTPUT + +# After AC_OUTPUT, we need to do final work CUSTOM_CONFIG_OUTPUT_GENERATED_HOOK - -# Try to move the config.log file to the output directory. -if test -e ./config.log; then - $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null -fi - -# Make the compare script executable -$CHMOD +x $OUTPUT_ROOT/compare.sh +BASIC_POST_CONFIG_OUTPUT # Finally output some useful information to the user HELP_PRINT_SUMMARY_AND_WARNINGS diff -r 9c04ed826c93 -r 9cabd4ebd12b common/autoconf/flags.m4 --- a/common/autoconf/flags.m4 Thu May 14 20:15:26 2015 -0700 +++ b/common/autoconf/flags.m4 Wed Jul 05 20:33:23 2017 +0200 @@ -231,7 +231,6 @@ AC_SUBST(C_FLAG_REORDER) AC_SUBST(CXX_FLAG_REORDER) - AC_SUBST(SHARED_LIBRARY_FLAGS) AC_SUBST(SET_EXECUTABLE_ORIGIN) AC_SUBST(SET_SHARED_LIBRARY_ORIGIN) AC_SUBST(SET_SHARED_LIBRARY_NAME) @@ -524,6 +523,10 @@ # CXXFLAGS_JDK - C++ Compiler flags # COMMON_CCXXFLAGS_JDK - common to C and C++ if test "x$TOOLCHAIN_TYPE" = xgcc; then + if test "x$OPENJDK_TARGET_CPU" = xx86; then + # Force compatibility with i586 on 32 bit intel platforms. + COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586" + fi COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \ -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE" case $OPENJDK_TARGET_CPU_ARCH in @@ -900,6 +903,24 @@ [COMPILER_SUPPORTS_TARGET_BITS_FLAG=false]) AC_SUBST(COMPILER_SUPPORTS_TARGET_BITS_FLAG) + AC_ARG_ENABLE([warnings-as-errors], [AS_HELP_STRING([--disable-warnings-as-errors], + [do not consider native warnings to be an error @<:@enabled@:>@])]) + + AC_MSG_CHECKING([if native warnings are errors]) + if test "x$enable_warnings_as_errors" = "xyes"; then + AC_MSG_RESULT([yes (explicitely set)]) + WARNINGS_AS_ERRORS=true + elif test "x$enable_warnings_as_errors" = "xno"; then + AC_MSG_RESULT([no]) + WARNINGS_AS_ERRORS=false + elif test "x$enable_warnings_as_errors" = "x"; then + AC_MSG_RESULT([yes (default)]) + WARNINGS_AS_ERRORS=true + else + AC_MSG_ERROR([--enable-warnings-as-errors accepts no argument]) + fi + AC_SUBST(WARNINGS_AS_ERRORS) + case "${TOOLCHAIN_TYPE}" in microsoft) DISABLE_WARNING_PREFIX="-wd" diff -r 9c04ed826c93 -r 9cabd4ebd12b common/autoconf/generated-configure.sh --- a/common/autoconf/generated-configure.sh Thu May 14 20:15:26 2015 -0700 +++ b/common/autoconf/generated-configure.sh Wed Jul 05 20:33:23 2017 +0200 @@ -684,6 +684,7 @@ ENABLE_DEBUG_SYMBOLS CFLAGS_WARNINGS_ARE_ERRORS DISABLE_WARNING_PREFIX +WARNINGS_AS_ERRORS COMPILER_SUPPORTS_TARGET_BITS_FLAG ZERO_ARCHFLAG LDFLAGS_TESTEXE_SUFFIX @@ -727,7 +728,6 @@ SET_SHARED_LIBRARY_NAME SET_SHARED_LIBRARY_ORIGIN SET_EXECUTABLE_ORIGIN -SHARED_LIBRARY_FLAGS CXX_FLAG_REORDER C_FLAG_REORDER SYSROOT_LDFLAGS @@ -1086,6 +1086,7 @@ with_extra_cflags with_extra_cxxflags with_extra_ldflags +enable_warnings_as_errors enable_debug_symbols enable_zip_debug_info enable_native_coverage @@ -1852,6 +1853,9 @@ --enable-rmiconnector-iiop enable the JMX RMIConnector iiop transport [disabled] + --disable-warnings-as-errors + do not consider native warnings to be an error + [enabled] --disable-debug-symbols disable generation of debug symbols [enabled] --disable-zip-debug-info disable zipping of debug-info files [enabled] @@ -3496,6 +3500,9 @@ # Check for support for specific options in bash +# Code to run after AC_OUTPUT + + # # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -4359,7 +4366,7 @@ #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1430918902 +DATE_WHEN_GENERATED=1431429776 ############################################################################### # @@ -15335,9 +15342,9 @@ # is performed. filtered_files=`$ECHO "$files_present" \ | $SED -e 's/config.log//g' \ - -e 's/confdefs.h//g' \ - -e 's/fixpath.exe//g' \ - -e 's/ //g' \ + -e 's/configure.log//g' \ + -e 's/confdefs.h//g' \ + -e 's/ //g' \ | $TR -d '\n'` if test "x$filtered_files" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5 @@ -41761,7 +41768,6 @@ - if test "x$OPENJDK_TARGET_OS" = xsolaris; then CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__" CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__" @@ -42029,6 +42035,10 @@ # CXXFLAGS_JDK - C++ Compiler flags # COMMON_CCXXFLAGS_JDK - common to C and C++ if test "x$TOOLCHAIN_TYPE" = xgcc; then + if test "x$OPENJDK_TARGET_CPU" = xx86; then + # Force compatibility with i586 on 32 bit intel platforms. + COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586" + fi COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \ -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE" case $OPENJDK_TARGET_CPU_ARCH in @@ -42471,6 +42481,31 @@ + # Check whether --enable-warnings-as-errors was given. +if test "${enable_warnings_as_errors+set}" = set; then : + enableval=$enable_warnings_as_errors; +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5 +$as_echo_n "checking if native warnings are errors... " >&6; } + if test "x$enable_warnings_as_errors" = "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5 +$as_echo "yes (explicitely set)" >&6; } + WARNINGS_AS_ERRORS=true + elif test "x$enable_warnings_as_errors" = "xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + WARNINGS_AS_ERRORS=false + elif test "x$enable_warnings_as_errors" = "x"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5 +$as_echo "yes (default)" >&6; } + WARNINGS_AS_ERRORS=true + else + as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5 + fi + + case "${TOOLCHAIN_TYPE}" in microsoft) DISABLE_WARNING_PREFIX="-wd" @@ -54179,14 +54214,31 @@ fi - -# Try to move the config.log file to the output directory. -if test -e ./config.log; then - $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null -fi - -# Make the compare script executable -$CHMOD +x $OUTPUT_ROOT/compare.sh +# After AC_OUTPUT, we need to do final work + + + # Try to move config.log (generated by autoconf) to the configure-support directory. + if test -e ./config.log; then + $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null + fi + + # Rotate our log file (configure.log) + if test -e "$OUTPUT_ROOT/configure.log.old"; then + $RM -f "$OUTPUT_ROOT/configure.log.old" + fi + if test -e "$OUTPUT_ROOT/configure.log"; then + $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null + fi + + # Move configure.log from current directory to the build output root + if test -e ./configure.log; then + echo found it + $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null + fi + + # Make the compare script executable + $CHMOD +x $OUTPUT_ROOT/compare.sh + # Finally output some useful information to the user @@ -54280,14 +54332,20 @@ -if test -e "$OUTPUT_ROOT/config.log"; then - $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" > /dev/null 2>&1 - if test $? -eq 0; then - printf "The following warnings were produced. Repeated here for convenience:\n" - # We must quote sed expression (using []) to stop m4 from eating the []. - $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" | $SED -e 's/^configure:[0-9]*: //' - printf "\n" - fi -fi - - + # Locate config.log. + if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then + CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR" + elif test -e "./config.log"; then + CONFIG_LOG_PATH="." + fi + + if test -e "$CONFIG_LOG_PATH/config.log"; then + $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1 + if test $? -eq 0; then + printf "The following warnings were produced. Repeated here for convenience:\n" + # We must quote sed expression (using []) to stop m4 from eating the []. + $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e 's/^configure:[0-9]*: //' + printf "\n" + fi + fi + diff -r 9c04ed826c93 -r 9cabd4ebd12b common/autoconf/help.m4 --- a/common/autoconf/help.m4 Thu May 14 20:15:26 2015 -0700 +++ b/common/autoconf/help.m4 Wed Jul 05 20:33:23 2017 +0200 @@ -212,7 +212,7 @@ if test "x$TOOLCHAIN_VERSION" != "x"; then print_version=" $TOOLCHAIN_VERSION" fi - printf "* Toolchain: $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n" + printf "* Toolchain: $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n" printf "* C Compiler: Version $CC_VERSION_NUMBER (at $CC)\n" printf "* C++ Compiler: Version $CXX_VERSION_NUMBER (at $CXX)\n" @@ -263,14 +263,20 @@ AC_DEFUN_ONCE([HELP_REPEAT_WARNINGS], [ -if test -e "$OUTPUT_ROOT/config.log"; then - $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" > /dev/null 2>&1 - if test $? -eq 0; then - printf "The following warnings were produced. Repeated here for convenience:\n" - # We must quote sed expression (using []) to stop m4 from eating the []. - $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" | $SED -e [ 's/^configure:[0-9]*: //' ] - printf "\n" + # Locate config.log. + if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then + CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR" + elif test -e "./config.log"; then + CONFIG_LOG_PATH="." fi -fi + if test -e "$CONFIG_LOG_PATH/config.log"; then + $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1 + if test $? -eq 0; then + printf "The following warnings were produced. Repeated here for convenience:\n" + # We must quote sed expression (using []) to stop m4 from eating the []. + $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e [ 's/^configure:[0-9]*: //' ] + printf "\n" + fi + fi ]) diff -r 9c04ed826c93 -r 9cabd4ebd12b common/autoconf/spec.gmk.in --- a/common/autoconf/spec.gmk.in Thu May 14 20:15:26 2015 -0700 +++ b/common/autoconf/spec.gmk.in Wed Jul 05 20:33:23 2017 +0200 @@ -321,6 +321,9 @@ DISABLE_WARNING_PREFIX := @DISABLE_WARNING_PREFIX@ CFLAGS_WARNINGS_ARE_ERRORS:=@CFLAGS_WARNINGS_ARE_ERRORS@ +# A global flag (true or false) determining if native warnings are considered errors. +WARNINGS_AS_ERRORS := @WARNINGS_AS_ERRORS@ + CFLAGS_CCACHE:=@CFLAGS_CCACHE@ # Tools that potentially need to be cross compilation aware. @@ -394,9 +397,6 @@ LIPO:=@LIPO@ -# Command to create a shared library -SHARED_LIBRARY_FLAGS:=@SHARED_LIBRARY_FLAGS@ - # Options to linker to specify a mapfile. # (Note absence of := assignment, because we do not want to evaluate the macro body here) SET_SHARED_LIBRARY_MAPFILE=@SET_SHARED_LIBRARY_MAPFILE@ diff -r 9c04ed826c93 -r 9cabd4ebd12b hotspot/.hgtags --- a/hotspot/.hgtags Thu May 14 20:15:26 2015 -0700 +++ b/hotspot/.hgtags Wed Jul 05 20:33:23 2017 +0200 @@ -466,3 +466,4 @@ 715d2da5801c410746e92f08066d53bde1496286 jdk9-b61 1eab877142cce6ca06e556e2ad0af688f993f00b jdk9-b62 2ac9b6b36689b50d1562627067c92d51781b5684 jdk9-b63 +bf92b8db249cdfa5651ef954b6c0743a7e0ea4cd jdk9-b64 diff -r 9c04ed826c93 -r 9cabd4ebd12b hotspot/src/cpu/aarch64/vm/aarch64.ad --- a/hotspot/src/cpu/aarch64/vm/aarch64.ad Thu May 14 20:15:26 2015 -0700 +++ b/hotspot/src/cpu/aarch64/vm/aarch64.ad Wed Jul 05 20:33:23 2017 +0200 @@ -810,9 +810,6 @@ bool unnecessary_volatile(const Node *barrier); bool needs_releasing_store(const Node *store); - // Use barrier instructions rather than load acquire / store - // release. - const bool UseBarriersForVolatile = false; // Use barrier instructions for unsafe volatile gets rather than // trying to identify an exact signature for them const bool UseBarriersForUnsafeVolatileGet = false; diff -r 9c04ed826c93 -r 9cabd4ebd12b hotspot/src/cpu/aarch64/vm/globals_aarch64.hpp --- a/hotspot/src/cpu/aarch64/vm/globals_aarch64.hpp Thu May 14 20:15:26 2015 -0700 +++ b/hotspot/src/cpu/aarch64/vm/globals_aarch64.hpp Wed Jul 05 20:33:23 2017 +0200 @@ -98,8 +98,8 @@ product(bool, NearCpool, true, \ "constant pool is close to instructions") \ \ - notproduct(bool, UseAcqRelForVolatileFields, false, \ - "Use acquire and release insns for volatile fields") \ + product(bool, UseBarriersForVolatile, false, \ + "Use memory barriers to implement volatile accesses") \ \ product(bool, UseCRC32, false, \ "Use CRC32 instructions for CRC32 computation") \ @@ -117,8 +117,8 @@ product(bool, NearCpool, true, \ "constant pool is close to instructions") \ \ - notproduct(bool, UseAcqRelForVolatileFields, false, \ - "Use acquire and release insns for volatile fields") \ + product(bool, UseBarriersForVolatile, false, \ + "Use memory barriers to implement volatile accesses") \ product(bool, UseNeon, false, \ "Use Neon for CRC32 computation") \ product(bool, UseCRC32, false, \ diff -r 9c04ed826c93 -r 9cabd4ebd12b hotspot/src/cpu/aarch64/vm/interp_masm_aarch64.cpp --- a/hotspot/src/cpu/aarch64/vm/interp_masm_aarch64.cpp Thu May 14 20:15:26 2015 -0700 +++ b/hotspot/src/cpu/aarch64/vm/interp_masm_aarch64.cpp Wed Jul 05 20:33:23 2017 +0200 @@ -1314,7 +1314,7 @@ // case_array_offset_in_bytes() movw(reg2, in_bytes(MultiBranchData::per_case_size())); movw(rscratch1, in_bytes(MultiBranchData::case_array_offset())); - maddw(index, index, reg2, rscratch1); + Assembler::maddw(index, index, reg2, rscratch1); // Update the case count increment_mdp_data_at(mdp, diff -r 9c04ed826c93 -r 9cabd4ebd12b hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp --- a/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp Thu May 14 20:15:26 2015 -0700 +++ b/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp Wed Jul 05 20:33:23 2017 +0200 @@ -1625,7 +1625,7 @@ sdivw(result, ra, rb); } else { sdivw(scratch, ra, rb); - msubw(result, scratch, rb, ra); + Assembler::msubw(result, scratch, rb, ra); } return idivl_offset; @@ -1655,7 +1655,7 @@ sdiv(result, ra, rb); } else { sdiv(scratch, ra, rb); - msub(result, scratch, rb, ra); + Assembler::msub(result, scratch, rb, ra); } return idivq_offset; @@ -3787,14 +3787,6 @@ } } - bool MacroAssembler::use_acq_rel_for_volatile_fields() { -#ifdef PRODUCT - return false; -#else - return UseAcqRelForVolatileFields; -#endif - } - void MacroAssembler::build_frame(int framesize) { if (framesize == 0) { // Is this even possible? diff -r 9c04ed826c93 -r 9cabd4ebd12b hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp --- a/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp Thu May 14 20:15:26 2015 -0700 +++ b/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp Wed Jul 05 20:33:23 2017 +0200 @@ -405,6 +405,18 @@ umaddl(Rd, Rn, Rm, zr); } +#define WRAP(INSN) \ + void INSN(Register Rd, Register Rn, Register Rm, Register Ra) { \ + if ((VM_Version::cpu_cpuFeatures() & VM_Version::CPU_A53MAC) && Ra != zr) \ + nop(); \ + Assembler::INSN(Rd, Rn, Rm, Ra); \ + } + + WRAP(madd) WRAP(msub) WRAP(maddw) WRAP(msubw) + WRAP(smaddl) WRAP(smsubl) WRAP(umaddl) WRAP(umsubl) +#undef WRAP + + // macro assembly operations needed for aarch64 // first two private routines for loading 32 bit or 64 bit constants @@ -1094,9 +1106,6 @@ address read_polling_page(Register r, address page, relocInfo::relocType rtype); address read_polling_page(Register r, relocInfo::relocType rtype); - // Used by aarch64.ad to control code generation - static bool use_acq_rel_for_volatile_fields(); - // CRC32 code for java.util.zip.CRC32::updateBytes() instrinsic. void update_byte_crc32(Register crc, Register val, Register table); void update_word_crc32(Register crc, Register v, Register tmp, @@ -1150,10 +1159,6 @@ int offset, int size); }; -// Used by aarch64.ad to control code generation -#define treat_as_volatile(MEM_NODE) \ - (MacroAssembler::use_acq_rel_for_volatile_fields() ? (MEM_NODE)->is_volatile() : false) - #ifdef ASSERT inline bool AbstractAssembler::pd_check_instruction_mark() { return false; } #endif diff -r 9c04ed826c93 -r 9cabd4ebd12b hotspot/src/cpu/aarch64/vm/vm_version_aarch64.cpp --- a/hotspot/src/cpu/aarch64/vm/vm_version_aarch64.cpp Thu May 14 20:15:26 2015 -0700 +++ b/hotspot/src/cpu/aarch64/vm/vm_version_aarch64.cpp Wed Jul 05 20:33:23 2017 +0200 @@ -59,6 +59,9 @@ int VM_Version::_cpu; int VM_Version::_model; +int VM_Version::_model2; +int VM_Version::_variant; +int VM_Version::_revision; int VM_Version::_stepping; int VM_Version::_cpuFeatures; const char* VM_Version::_features_str = ""; @@ -122,13 +125,47 @@ char buf[512]; - strcpy(buf, "simd"); + _cpuFeatures = auxv; + + int cpu_lines = 0; + if (FILE *f = fopen("/proc/cpuinfo", "r")) { + char buf[128], *p; + while (fgets(buf, sizeof (buf), f) != NULL) { + if (p = strchr(buf, ':')) { + long v = strtol(p+1, NULL, 0); + if (strncmp(buf, "CPU implementer", sizeof "CPU implementer" - 1) == 0) { + _cpu = v; + cpu_lines++; + } else if (strncmp(buf, "CPU variant", sizeof "CPU variant" - 1) == 0) { + _variant = v; + } else if (strncmp(buf, "CPU part", sizeof "CPU part" - 1) == 0) { + if (_model != v) _model2 = _model; + _model = v; + } else if (strncmp(buf, "CPU revision", sizeof "CPU revision" - 1) == 0) { + _revision = v; + } + } + } + fclose(f); + } + + // Enable vendor specific features + if (_cpu == CPU_CAVIUM && _variant == 0) _cpuFeatures |= CPU_DMB_ATOMICS; + if (_cpu == CPU_ARM && (_model == 0xd03 || _model2 == 0xd03)) _cpuFeatures |= CPU_A53MAC; + // If an olde style /proc/cpuinfo (cpu_lines == 1) then if _model is an A57 (0xd07) + // we assume the worst and assume we could be on a big little system and have + // undisclosed A53 cores which we could be swapped to at any stage + if (_cpu == CPU_ARM && cpu_lines == 1 && _model == 0xd07) _cpuFeatures |= CPU_A53MAC; + + sprintf(buf, "0x%02x:0x%x:0x%03x:%d", _cpu, _variant, _model, _revision); + if (_model2) sprintf(buf+strlen(buf), "(0x%03x)", _model2); + if (auxv & HWCAP_ASIMD) strcat(buf, ", simd"); if (auxv & HWCAP_CRC32) strcat(buf, ", crc"); if (auxv & HWCAP_AES) strcat(buf, ", aes"); if (auxv & HWCAP_SHA1) strcat(buf, ", sha1"); if (auxv & HWCAP_SHA2) strcat(buf, ", sha256"); - _features_str = strdup(buf); + _features_str = os::strdup(buf); if (FLAG_IS_DEFAULT(UseCRC32)) { UseCRC32 = (auxv & HWCAP_CRC32) != 0; @@ -202,6 +239,10 @@ UseMultiplyToLenIntrinsic = true; } + if (FLAG_IS_DEFAULT(UseBarriersForVolatile)) { + UseBarriersForVolatile = (_cpuFeatures & CPU_DMB_ATOMICS) != 0; + } + #ifdef COMPILER2 if (FLAG_IS_DEFAULT(OptoScheduling)) { OptoScheduling = true; diff -r 9c04ed826c93 -r 9cabd4ebd12b hotspot/src/cpu/aarch64/vm/vm_version_aarch64.hpp --- a/hotspot/src/cpu/aarch64/vm/vm_version_aarch64.hpp Thu May 14 20:15:26 2015 -0700 +++ b/hotspot/src/cpu/aarch64/vm/vm_version_aarch64.hpp Wed Jul 05 20:33:23 2017 +0200 @@ -34,6 +34,9 @@ protected: static int _cpu; static int _model; + static int _model2; + static int _variant; + static int _revision; static int _stepping; static int _cpuFeatures; // features returned by the "cpuid" instruction // 0 if this instruction is not available @@ -49,7 +52,40 @@ static void assert_is_initialized() { } + enum { + CPU_ARM = 'A', + CPU_BROADCOM = 'B', + CPU_CAVIUM = 'C', + CPU_DEC = 'D', + CPU_INFINEON = 'I', + CPU_MOTOROLA = 'M', + CPU_NVIDIA = 'N', + CPU_AMCC = 'P', + CPU_QUALCOM = 'Q', + CPU_MARVELL = 'V', + CPU_INTEL = 'i', + } cpuFamily; + + enum { + CPU_FP = (1<<0), + CPU_ASIMD = (1<<1), + CPU_EVTSTRM = (1<<2), + CPU_AES = (1<<3), + CPU_PMULL = (1<<4), + CPU_SHA1 = (1<<5), + CPU_SHA2 = (1<<6), + CPU_CRC32 = (1<<7), + CPU_A53MAC = (1 << 30), + CPU_DMB_ATOMICS = (1 << 31), + } cpuFeatureFlags; + static const char* cpu_features() { return _features_str; } + static int cpu_family() { return _cpu; } + static int cpu_model() { return _model; } + static int cpu_model2() { return _model2; } + static int cpu_variant() { return _variant; } + static int cpu_revision() { return _revision; } + static int cpu_cpuFeatures() { return _cpuFeatures; } }; diff -r 9c04ed826c93 -r 9cabd4ebd12b make/CompileJavaModules.gmk --- a/make/CompileJavaModules.gmk Thu May 14 20:15:26 2015 -0700 +++ b/make/CompileJavaModules.gmk Wed Jul 05 20:33:23 2017 +0200 @@ -89,7 +89,7 @@ ################################################################################ -java.desktop_ADD_JAVAC_FLAGS := -Xdoclint:all/protected,-missing,-reference '-Xdoclint/package:java.*,javax.*' +java.desktop_ADD_JAVAC_FLAGS := -Xdoclint:all/protected,-reference '-Xdoclint/package:java.*,javax.*' java.desktop_COPY := .gif .png .wav .txt .xml .css .pf java.desktop_CLEAN := iio-plugin.properties cursors.properties @@ -152,7 +152,6 @@ $(wildcard $(JDK_TOPDIR)/src/java.desktop/unix/classes/sun/java2d/*.java) \ $(wildcard $(JDK_TOPDIR)/src/java.desktop/unix/classes/sun/java2d/opengl/*.java) \ $(wildcard $(JDK_TOPDIR)/src/java.desktop/unix/classes/sun/awt/*.java) \ - $(wildcard $(JDK_TOPDIR)/src/java.desktop/unix/classes/sun/awt/motif/*.java) \ $(wildcard $(JDK_TOPDIR)/src/java.desktop/unix/classes/sun/font/*.java) \ # else diff -r 9c04ed826c93 -r 9cabd4ebd12b make/Init.gmk --- a/make/Init.gmk Thu May 14 20:15:26 2015 -0700 +++ b/make/Init.gmk Wed Jul 05 20:33:23 2017 +0200 @@ -267,7 +267,9 @@ ( cd $(TOPDIR) && \ $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) $(OUTPUT_SYNC_FLAG) \ -j $(JOBS) -f make/Main.gmk $(USER_MAKE_VARS) \ - $(PARALLEL_TARGETS) ) + $(PARALLEL_TARGETS) || \ + ( exitcode=$$? && $(BUILD_LOG_WRAPPER) $(PRINTF) "\nERROR: Build failed for $(TARGET_DESCRIPTION) (exit code $$exitcode) \n" && \ + $(PRINTF) "Hint: If caused by a warning, try configure --disable-warnings-as-errors \n\n" && exit $$exitcode ) ) $(call CleanupSmartJavac) $(call StopGlobalTimer) $(call ReportBuildTimes) diff -r 9c04ed826c93 -r 9cabd4ebd12b make/Javadoc.gmk --- a/make/Javadoc.gmk Thu May 14 20:15:26 2015 -0700 +++ b/make/Javadoc.gmk Wed Jul 05 20:33:23 2017 +0200 @@ -1141,7 +1141,7 @@ NASHORNAPI_HEADER := Nashorn API NASHORNAPI_BOTTOM := $(call CommonBottom,$(NASHORNAPI_FIRST_COPYRIGHT_YEAR)) NASHORNAPI_GROUPNAME := Packages -NASHORNAPI_REGEXP := jdk.nashorn.api.scripting.* +NASHORNAPI_REGEXP := jdk.nashorn.api.* # NASHORNAPI_PKGS is located in NON_CORE_PKGS.gmk NASHORNAPI_INDEX_HTML = $(NASHORNAPI_DOCDIR)/index.html diff -r 9c04ed826c93 -r 9cabd4ebd12b make/common/NON_CORE_PKGS.gmk --- a/make/common/NON_CORE_PKGS.gmk Thu May 14 20:15:26 2015 -0700 +++ b/make/common/NON_CORE_PKGS.gmk Wed Jul 05 20:33:23 2017 +0200 @@ -82,7 +82,8 @@ com.sun.source.util \ jdk -NASHORNAPI_PKGS = jdk.nashorn.api.scripting +NASHORNAPI_PKGS = jdk.nashorn.api.scripting \ + jdk.nashorn.api.tree SMARTCARDIO_PKGS = javax.smartcardio diff -r 9c04ed826c93 -r 9cabd4ebd12b make/common/NativeCompilation.gmk --- a/make/common/NativeCompilation.gmk Thu May 14 20:15:26 2015 -0700 +++ b/make/common/NativeCompilation.gmk Wed Jul 05 20:33:23 2017 +0200 @@ -487,6 +487,21 @@ $1_EXTRA_CXXFLAGS += $$(addprefix $(DISABLE_WARNING_PREFIX), $$($1_DISABLED_WARNINGS_$(TOOLCHAIN_TYPE))) endif + # Check if warnings should be considered errors. + # Pick first binary and toolchain specific, then binary specific, then general setting. + ifeq ($$($1_WARNINGS_AS_ERRORS_$(TOOLCHAIN_TYPE)),) + ifeq ($$($1_WARNINGS_AS_ERRORS),) + $1_WARNINGS_AS_ERRORS_$(TOOLCHAIN_TYPE) := $$(WARNINGS_AS_ERRORS) + else + $1_WARNINGS_AS_ERRORS_$(TOOLCHAIN_TYPE) := $$($1_WARNINGS_AS_ERRORS) + endif + endif + + ifeq ($$($1_WARNINGS_AS_ERRORS_$(TOOLCHAIN_TYPE)), true) + $1_EXTRA_CFLAGS += $(CFLAGS_WARNINGS_ARE_ERRORS) + $1_EXTRA_CXXFLAGS += $(CFLAGS_WARNINGS_ARE_ERRORS) + endif + ifeq (NONE, $$($1_OPTIMIZATION)) $1_EXTRA_CFLAGS += $(C_O_FLAG_NONE) $1_EXTRA_CXXFLAGS += $(CXX_O_FLAG_NONE) diff -r 9c04ed826c93 -r 9cabd4ebd12b modules.xml --- a/modules.xml Thu May 14 20:15:26 2015 -0700 +++ b/modules.xml Wed Jul 05 20:33:23 2017 +0200 @@ -616,7 +616,6 @@ java.prefs java.xml java.datatransfer - jdk.charsets java.applet @@ -1502,10 +1501,6 @@ jdk.charsets java.base - - sun.nio.cs.ext - java.desktop - jdk.compiler