Skip to content
Permalink
Browse files

Merge

  • Loading branch information
prsadhuk committed May 8, 2020
2 parents 1f2f808 + 13d6b49 commit b75ea9b069e70651c436df132bb47eda6ccc4efe
Showing 707 changed files with 14,791 additions and 34,616 deletions.
@@ -632,3 +632,4 @@ dd5198db2e5b1ebcafe065d987c03ba9fcb50fc3 jdk-15+17
7cc27caabe6e342151e8baf549beb07a9c755ec2 jdk-15+19
46bca5e5e6fb26efd07245d26fe96a9c3260f51e jdk-15+20
12b55fad80f30d24b1f8fdb3b947ea6465ef9518 jdk-15+21
7223c6d610343fd8323af9d07d501e01fa1a7696 jdk-15+22
@@ -295,7 +295,7 @@ <h2 id="native-compiler-toolchain-requirements">Native Compiler (Toolchain) Requ
</tr>
<tr class="even">
<td style="text-align: left;">Windows</td>
<td style="text-align: left;">Microsoft Visual Studio 2017 update 15.9.16</td>
<td style="text-align: left;">Microsoft Visual Studio 2019 update 16.5.3</td>
</tr>
</tbody>
</table>
@@ -330,7 +330,7 @@ issues.
Linux gcc 9.2.0
macOS Apple Xcode 10.1 (using clang 10.0.0)
Solaris Oracle Solaris Studio 12.6 (with compiler version 5.15)
Windows Microsoft Visual Studio 2017 update 15.9.16
Windows Microsoft Visual Studio 2019 update 16.5.3

All compilers are expected to be able to compile to the C99 language standard,
as some C99 features are used in the source code. Microsoft Visual Studio
@@ -226,6 +226,9 @@ else # HAS_SPEC=true
# Parse COMPARE_BUILD (for makefile development)
$(eval $(call ParseCompareBuild))

# Setup reproducible build environment
$(eval $(call SetupReproducibleBuild))

# If no LOG= was given on command line, but we have a non-standard default
# value, use that instead and re-parse log level.
ifeq ($(LOG), )
@@ -306,6 +306,15 @@ else # $(HAS_SPEC)=true
topdir=$(TOPDIR)
endif

# Setup the build environment to match the requested specification on
# level of reproducible builds
define SetupReproducibleBuild
ifeq ($$(SOURCE_DATE), updated)
SOURCE_DATE := $$(shell $$(DATE) +"%s")
endif
export SOURCE_DATE_EPOCH := $$(SOURCE_DATE)
endef

# Parse COMPARE_BUILD into COMPARE_BUILD_*
# Syntax: COMPARE_BUILD=CONF=<configure options>:PATCH=<patch file>:
# MAKE=<make targets>:COMP_OPTS=<compare script options>:
@@ -471,15 +480,15 @@ else # $(HAS_SPEC)=true
# Remove any javac server logs and port files. This
# prevents a new make run to reuse the previous servers.
define PrepareSmartJavac
$(if $(SJAVAC_SERVER_DIR), \
$(RM) -r $(SJAVAC_SERVER_DIR) 2> /dev/null && \
$(MKDIR) -p $(SJAVAC_SERVER_DIR) \
$(if $(JAVAC_SERVER_DIR), \
$(RM) -r $(JAVAC_SERVER_DIR) 2> /dev/null && \
$(MKDIR) -p $(JAVAC_SERVER_DIR) \
)
endef

define CleanupSmartJavac
[ -f $(SJAVAC_SERVER_DIR)/server.port ] && $(ECHO) Stopping sjavac server && \
$(TOUCH) $(SJAVAC_SERVER_DIR)/server.port.stop; true
[ -f $(JAVAC_SERVER_DIR)/server.port ] && $(ECHO) Stopping sjavac server && \
$(TOUCH) $(JAVAC_SERVER_DIR)/server.port.stop; true
endef

ifeq ($(call isBuildOs, windows), true)
@@ -488,7 +497,7 @@ else # $(HAS_SPEC)=true
# synchronization process, wait for a while and hope it helps. This is only
# used by build comparisons.
define WaitForSmartJavacFinish
$(if $(SJAVAC_SERVER_DIR), \
$(if $(JAVAC_SERVER_DIR), \
sleep 5\
)
endef
@@ -74,7 +74,8 @@ AC_DEFUN([BOOTJDK_DO_CHECK],
BOOT_JDK_FOUND=no
else
# Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java$EXE_SUFFIX" $USER_BOOT_JDK_OPTIONS -version 2>&1 | $HEAD -n 1`
# Additional [] needed to keep m4 from mangling shell constructs.
[ BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java$EXE_SUFFIX" $USER_BOOT_JDK_OPTIONS -version 2>&1 | $AWK '/version \"[0-9\._\-a-zA-Z]+\"/{print $ 0; exit;}'` ]
if [ [[ "$BOOT_JDK_VERSION" =~ "Picked up" ]] ]; then
AC_MSG_NOTICE([You have _JAVA_OPTIONS or JAVA_TOOL_OPTIONS set. This can mess up the build. Please use --with-boot-jdk-jvmargs instead.])
AC_MSG_NOTICE([Java reports: "$BOOT_JDK_VERSION".])
@@ -529,7 +530,8 @@ AC_DEFUN([BOOTJDK_CHECK_BUILD_JDK],
BUILD_JDK_FOUND=no
else
# Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
# Additional [] needed to keep m4 from mangling shell constructs.
[ BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $AWK '/version \"[0-9\._\-a-zA-Z]+\"/{print $ 0; exit;}'` ]
# Extra M4 quote needed to protect [] in grep expression.
[FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP "\"$VERSION_FEATURE([\.+-].*)?\""`]
@@ -44,7 +44,8 @@ BOOT_JDK := $(JDK_IMAGE_DIR)
# The bootcycle build has a different output directory
OLD_OUTPUTDIR:=@OUTPUTDIR@
OUTPUTDIR:=$(OLD_OUTPUTDIR)/bootcycle-build
SJAVAC_SERVER_DIR:=$(patsubst $(OLD_OUTPUTDIR)%, $(OUTPUTDIR)%, $(SJAVAC_SERVER_DIR))
# No spaces in patsubst to avoid leading space in variable
JAVAC_SERVER_DIR:=$(patsubst $(OLD_OUTPUTDIR)%,$(OUTPUTDIR)%,$(JAVAC_SERVER_DIR))

JAVA_CMD:=$(BOOT_JDK)/bin/java
JAVAC_CMD:=$(BOOT_JDK)/bin/javac
@@ -32,7 +32,12 @@ AC_DEFUN([BPERF_CHECK_CORES],
if test -f /proc/cpuinfo; then
# Looks like a Linux (or cygwin) system
NUM_CORES=`cat /proc/cpuinfo | grep -c processor`
FOUND_CORES=yes
if test "$NUM_CORES" -eq "0"; then
NUM_CORES=`cat /proc/cpuinfo | grep -c ^CPU`
fi
if test "$NUM_CORES" -ne "0"; then
FOUND_CORES=yes
fi
elif test -x /usr/sbin/psrinfo; then
# Looks like a Solaris system
NUM_CORES=`/usr/sbin/psrinfo -v | grep -c on-line`
@@ -249,6 +249,7 @@ JDKOPT_ENABLE_DISABLE_GENERATE_CLASSLIST
JDKOPT_EXCLUDE_TRANSLATIONS
JDKOPT_ENABLE_DISABLE_MANPAGES
JDKOPT_ENABLE_DISABLE_CDS_ARCHIVE
JDKOPT_SETUP_REPRODUCIBLE_BUILD

###############################################################################
#
@@ -630,3 +630,59 @@ AC_DEFUN([JDKOPT_ALLOW_ABSOLUTE_PATHS_IN_OUTPUT],
AC_SUBST(ALLOW_ABSOLUTE_PATHS_IN_OUTPUT)
])

################################################################################
#
# Check and set options related to reproducible builds.
#
AC_DEFUN_ONCE([JDKOPT_SETUP_REPRODUCIBLE_BUILD],
[
AC_ARG_WITH([source-date], [AS_HELP_STRING([--with-source-date],
[how to set SOURCE_DATE_EPOCH ('updated', 'current', 'version' a timestamp or an ISO-8601 date) @<:@updated@:>@])],
[with_source_date_present=true], [with_source_date_present=false])
AC_MSG_CHECKING([what source date to use])
if test "x$with_source_date" = xyes; then
AC_MSG_ERROR([--with-source-date must have a value])
elif test "x$with_source_date" = xupdated || test "x$with_source_date" = x; then
# Tell the makefiles to update at each build
SOURCE_DATE=updated
AC_MSG_RESULT([determined at build time, from 'updated'])
elif test "x$with_source_date" = xcurrent; then
# Set the current time
SOURCE_DATE=$($DATE +"%s")
AC_MSG_RESULT([$SOURCE_DATE, from 'current'])
elif test "x$with_source_date" = xversion; then
# Use the date from version-numbers
UTIL_GET_EPOCH_TIMESTAMP(SOURCE_DATE, $DEFAULT_VERSION_DATE)
if test "x$SOURCE_DATE" = x; then
AC_MSG_RESULT([unavailable])
AC_MSG_ERROR([Cannot convert DEFAULT_VERSION_DATE to timestamp])
fi
AC_MSG_RESULT([$SOURCE_DATE, from 'version'])
else
# It's a timestamp, an ISO-8601 date, or an invalid string
# Additional [] needed to keep m4 from mangling shell constructs.
if [ [[ "$with_source_date" =~ ^[0-9][0-9]*$ ]] ] ; then
SOURCE_DATE=$with_source_date
AC_MSG_RESULT([$SOURCE_DATE, from timestamp on command line])
else
UTIL_GET_EPOCH_TIMESTAMP(SOURCE_DATE, $with_source_date)
if test "x$SOURCE_DATE" != x; then
AC_MSG_RESULT([$SOURCE_DATE, from ISO-8601 date on command line])
else
AC_MSG_RESULT([unavailable])
AC_MSG_ERROR([Cannot parse date string "$with_source_date"])
fi
fi
fi
UTIL_ARG_ENABLE(NAME: reproducible-build, DEFAULT: $with_source_date_present,
RESULT: ENABLE_REPRODUCIBLE_BUILD,
DESC: [enable reproducible builds (not yet fully functional)],
DEFAULT_DESC: [enabled if --with-source-date is given])
AC_SUBST(SOURCE_DATE)
AC_SUBST(ENABLE_REPRODUCIBLE_BUILD)
])
@@ -36,7 +36,7 @@
AC_DEFUN([JDKVER_CHECK_AND_SET_NUMBER],
[
# Additional [] needed to keep m4 from mangling shell constructs.
if [ ! [[ "$2" =~ ^0*([1-9][0-9]*)|(0)$ ]] ] ; then
if [ ! [[ "$2" =~ ^0*([1-9][0-9]*)$|^0*(0)$ ]] ] ; then
AC_MSG_ERROR(["$2" is not a valid numerical value for $1])
fi
# Extract the version number without leading zeros.
@@ -119,6 +119,9 @@ OPENJDK_MODULE_TARGET_PLATFORM:=@OPENJDK_MODULE_TARGET_PLATFORM@
RELEASE_FILE_OS_NAME:=@RELEASE_FILE_OS_NAME@
RELEASE_FILE_OS_ARCH:=@RELEASE_FILE_OS_ARCH@

SOURCE_DATE := @SOURCE_DATE@
ENABLE_REPRODUCIBLE_BUILD := @ENABLE_REPRODUCIBLE_BUILD@

LIBM:=@LIBM@
LIBDL:=@LIBDL@

@@ -356,9 +359,9 @@ BOOT_JDK_SOURCETARGET:=@BOOT_JDK_SOURCETARGET@
NUM_CORES:=@NUM_CORES@
MEMORY_SIZE:=@MEMORY_SIZE@
ENABLE_JAVAC_SERVER:=@ENABLE_JAVAC_SERVER@
# Store sjavac server synchronization files here, and
# the sjavac server log files.
SJAVAC_SERVER_DIR=$(MAKESUPPORT_OUTPUTDIR)/javacservers
# Store javac server synchronization files here, and
# the javac server log files.
JAVAC_SERVER_DIR=$(MAKESUPPORT_OUTPUTDIR)/javacservers

# Number of parallel jobs to use for compilation
JOBS?=@JOBS@
@@ -227,6 +227,29 @@ AC_DEFUN([UTIL_GET_MATCHING_VALUES],
fi
])

###############################################################################
# Converts an ISO-8601 date/time string to a unix epoch timestamp. If no
# suitable conversion method was found, an empty string is returned.
#
# Sets the specified variable to the resulting list.
#
# $1: result variable name
# $2: input date/time string
AC_DEFUN([UTIL_GET_EPOCH_TIMESTAMP],
[
timestamp=$($DATE --utc --date=$2 +"%s" 2> /dev/null)
if test "x$timestamp" = x; then
# GNU date format did not work, try BSD date options
timestamp=$($DATE -j -f "%F %T" "$2" "+%s" 2> /dev/null)
if test "x$timestamp" = x; then
# Perhaps the time was missing
timestamp=$($DATE -j -f "%F %T" "$2 00:00:00" "+%s" 2> /dev/null)
# If this did not work, we give up and return the empty string
fi
fi
$1=$timestamp
])

###############################################################################
# Sort a space-separated list, and remove duplicates.
#
@@ -320,12 +343,14 @@ AC_DEFUN([UTIL_ALIASED_ARG_ENABLE],
# option should be available. Must set AVAILABLE to 'false' if not.
# IF_GIVEN: An optional code block to execute if the option was given on the
# command line (regardless of the value).
# IF_NOT_GIVEN: An optional code block to execute if the option was not given
# on the command line (regardless of the value).
# IF_ENABLED: An optional code block to execute if the option is turned on.
# IF_DISABLED: An optional code block to execute if the option is turned off.
#
UTIL_DEFUN_NAMED([UTIL_ARG_ENABLE],
[*NAME RESULT DEFAULT AVAILABLE DESC DEFAULT_DESC CHECKING_MSG
CHECK_AVAILABLE IF_GIVEN IF_ENABLED IF_DISABLED], [$@],
CHECK_AVAILABLE IF_GIVEN IF_NOT_GIVEN IF_ENABLED IF_DISABLED], [$@],
[
##########################
# Part 1: Set up m4 macros
@@ -356,6 +381,7 @@ UTIL_DEFUN_NAMED([UTIL_ARG_ENABLE],
# tripping up bash.
m4_define([ARG_CHECK_AVAILABLE], m4_if(ARG_CHECK_AVAILABLE, , :, ARG_CHECK_AVAILABLE))
m4_define([ARG_IF_GIVEN], m4_if(ARG_IF_GIVEN, , :, ARG_IF_GIVEN))
m4_define([ARG_IF_NOT_GIVEN], m4_if(ARG_IF_NOT_GIVEN, , :, ARG_IF_NOT_GIVEN))
m4_define([ARG_IF_ENABLED], m4_if(ARG_IF_ENABLED, , :, ARG_IF_ENABLED))
m4_define([ARG_IF_DISABLED], m4_if(ARG_IF_DISABLED, , :, ARG_IF_DISABLED))
@@ -425,6 +451,8 @@ UTIL_DEFUN_NAMED([UTIL_ARG_ENABLE],
# Execute result payloads, if present
if test x$ARG_GIVEN = xtrue; then
ARG_IF_GIVEN
else
ARG_IF_NOT_GIVEN
fi
if test x$ARG_RESULT = xtrue; then
@@ -573,7 +601,7 @@ AC_DEFUN([UTIL_REQUIRE_BUILTIN_PROGS],
UTIL_SETUP_TOOL($1, [AC_PATH_PROGS($1, $2, , $3)])
if test "x[$]$1" = x; then
AC_MSG_NOTICE([Required tool $2 not found in PATH, checking built-in])
if help $2 > /dev/null 2>&1; then
if command -v $2 > /dev/null 2>&1; then
AC_MSG_NOTICE([Found $2 as shell built-in. Using it])
$1="$2"
else
@@ -216,7 +216,7 @@ define SetupJavaCompilationBody

# The port file contains the tcp/ip on which the server listens
# and the cookie necessary to talk to the server.
$1_JAVA_SERVER_FLAGS := --server:portfile=$$(SJAVAC_SERVER_DIR)/server.port,sjavac=$$($1_ESCAPED_CMD)
$1_JAVA_SERVER_FLAGS := --server:portfile=$$(JAVAC_SERVER_DIR)/server.port,sjavac=$$($1_ESCAPED_CMD)

# Always use small to launch client
$1_JAVAC_CMD := $$(JAVA_SMALL) $$($1_JAVA_FLAGS) $$($1_JAVAC) $$($1_JAVA_SERVER_FLAGS)
@@ -986,7 +986,7 @@ var getJibProfilesDependencies = function (input, common) {
macosx_x64: "Xcode10.1-MacOSX10.14+1.0",
solaris_x64: "SS12u4-Solaris11u1+1.0",
solaris_sparcv9: "SS12u6-Solaris11u3+1.0",
windows_x64: "VS2017-15.9.16+1.0",
windows_x64: "VS2019-16.5.3+1.0",
linux_aarch64: "gcc9.2.0-OL7.6+1.0",
linux_arm: "gcc8.2.0-Fedora27+1.0",
linux_ppc64le: "gcc8.2.0-Fedora27+1.0",
@@ -1,5 +1,5 @@
#
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -122,6 +122,7 @@ JVM_GetNestMembers
JVM_GetPrimitiveArrayElement
JVM_GetProperties
JVM_GetProtectionDomain
JVM_GetRandomSeedForCDSDump
JVM_GetRecordComponents
JVM_GetSimpleBinaryName
JVM_GetStackAccessControlContext
@@ -24,6 +24,7 @@
*/

#include "precompiled.hpp"
#include "classfile/javaClasses.inline.hpp"
#include "interpreter/cppInterpreterGenerator.hpp"
#include "interpreter/interpreter.hpp"
#include "interpreter/interpreterRuntime.hpp"
@@ -1180,14 +1180,6 @@ void os::shutdown() {
void os::abort(bool dump_core, void* siginfo, const void* context) {
os::shutdown();
if (dump_core) {
#ifndef PRODUCT
fdStream out(defaultStream::output_fd());
out.print_raw("Current thread is ");
char buf[16];
jio_snprintf(buf, sizeof(buf), UINTX_FORMAT, os::current_thread_id());
out.print_raw_cr(buf);
out.print_raw_cr("Dumping core ...");
#endif
::abort(); // dump core
}

@@ -3549,10 +3541,9 @@ jint os::init_2(void) {
return JNI_ERR;
}

if (UseNUMA) {
UseNUMA = false;
warning("NUMA optimizations are not available on this OS.");
}
// Not supported.
FLAG_SET_ERGO(UseNUMA, false);
FLAG_SET_ERGO(UseNUMAInterleaving, false);

if (MaxFDLimit) {
// Set the number of file descriptors to max. print out error
@@ -1070,14 +1070,6 @@ void os::shutdown() {
void os::abort(bool dump_core, void* siginfo, const void* context) {
os::shutdown();
if (dump_core) {
#ifndef PRODUCT
fdStream out(defaultStream::output_fd());
out.print_raw("Current thread is ");
char buf[16];
jio_snprintf(buf, sizeof(buf), UINTX_FORMAT, os::current_thread_id());
out.print_raw_cr(buf);
out.print_raw_cr("Dumping core ...");
#endif
::abort(); // dump core
}

@@ -3140,6 +3132,10 @@ jint os::init_2(void) {
return JNI_ERR;
}

// Not supported.
FLAG_SET_ERGO(UseNUMA, false);
FLAG_SET_ERGO(UseNUMAInterleaving, false);

if (MaxFDLimit) {
// set the number of file descriptors to max. print out error
// if getrlimit/setrlimit fails but continue regardless.

0 comments on commit b75ea9b

Please sign in to comment.