Skip to content

Commit

Permalink
Merge pull request #317 from alibaba/wip_dragonwell_extended_squash_b…
Browse files Browse the repository at this point in the history
…ranch

Merge remote-tracking branch 'upstream/master' into dragonwell
  • Loading branch information
Accelerator1996 authored Nov 3, 2022
2 parents 359c2eb + d6a370c commit a8027e7
Show file tree
Hide file tree
Showing 949 changed files with 54,204 additions and 33,875 deletions.
254 changes: 225 additions & 29 deletions .github/workflows/submit.yml

Large diffs are not rendered by default.

16 changes: 0 additions & 16 deletions .hgignore

This file was deleted.

652 changes: 0 additions & 652 deletions .hgtags

This file was deleted.

2 changes: 1 addition & 1 deletion .jcheck/conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[general]
project=jdk-updates
jbs=JDK
version=11.0.16
version=11.0.17

[checks]
error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace
Expand Down
12 changes: 0 additions & 12 deletions README

This file was deleted.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,4 @@ Technologies included in Alibaba Dragonwell have been published in following pap

- Fangxi Yin, Denghui Dong, Sanhong Li, Jianmei Guo, Kingsum Chow [**Java Performance Troubleshooting and Optimization at Alibaba**](https://www.icse2018.org/details/icse-2018-Software-Engineering-in-Practice/4/Java-Performance-Troubleshooting-and-Optimization-at-Alibaba) In _ICSE-SEIP 2018_, pp. 11–12


11 changes: 11 additions & 0 deletions README.origin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Welcome to the JDK!

For build instructions please see the
[online documentation](https://openjdk.java.net/groups/build/doc/building.html),
or either of these files:

- [doc/building.html](doc/building.html) (html version)
- [doc/building.md](doc/building.md) (markdown version)

See <https://openjdk.java.net/> for more information about
the OpenJDK Community and the JDK.
1 change: 1 addition & 0 deletions doc/building.html
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ <h3 id="freetype">FreeType</h3>
<li>To install on an apt-based Linux, try running <code>sudo apt-get install libfreetype6-dev</code>.</li>
<li>To install on an rpm-based Linux, try running <code>sudo yum install freetype-devel</code>.</li>
<li>To install on Alpine Linux, try running <code>sudo apk add freetype-dev</code>.</li>
<li>To install on macOS, try running <code>brew install freetype</code>.</li>
<li>To install on Solaris, try running <code>pkg install system/library/freetype-2</code>.</li>
</ul>
<p>Use <code>--with-freetype-include=&lt;path&gt;</code> and <code>--with-freetype-lib=&lt;path&gt;</code> if <code>configure</code> does not automatically locate the platform FreeType files.</p>
Expand Down
1 change: 1 addition & 0 deletions doc/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,7 @@ rather than bundling the JDK's own copy.
* To install on an rpm-based Linux, try running `sudo yum install
freetype-devel`.
* To install on Alpine Linux, try running `sudo apk add freetype-dev`.
* To install on macOS, try running `brew install freetype`.
* To install on Solaris, try running `pkg install system/library/freetype-2`.

Use `--with-freetype-include=<path>` and `--with-freetype-lib=<path>`
Expand Down
4 changes: 2 additions & 2 deletions make/Init.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2012, 2019, 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
Expand Down Expand Up @@ -272,7 +272,7 @@ else # HAS_SPEC=true
else
$(ECHO) "Re-running configure using default settings"
endif
( cd $(OUTPUTDIR) && PATH="$(ORIGINAL_PATH)" \
( cd $(CONFIGURE_START_DIR) && PATH="$(ORIGINAL_PATH)" AUTOCONF="$(AUTOCONF)" \
CUSTOM_ROOT="$(CUSTOM_ROOT)" \
CUSTOM_CONFIG_DIR="$(CUSTOM_CONFIG_DIR)" \
$(BASH) $(TOPDIR)/configure $(CONFIGURE_COMMAND_LINE) )
Expand Down
21 changes: 10 additions & 11 deletions make/MacBundles.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,8 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)

MACOSX_PLIST_SRC := $(TOPDIR)/make/data/bundle

BUNDLE_ID := $(MACOSX_BUNDLE_ID_BASE).$(VERSION_SHORT)
BUNDLE_NAME := $(MACOSX_BUNDLE_NAME_BASE) $(VERSION_SHORT)
BUNDLE_INFO := $(MACOSX_BUNDLE_NAME_BASE) $(VERSION_STRING)
BUNDLE_PLATFORM_VERSION := $(VERSION_FEATURE).$(VERSION_INTERIM)
BUNDLE_VERSION := $(VERSION_NUMBER)
ifeq ($(COMPANY_NAME), N/A)
BUNDLE_VENDOR := UNDEFINED
else
Expand Down Expand Up @@ -75,24 +72,26 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
SOURCE_FILES := $(MACOSX_PLIST_SRC)/JDK-Info.plist, \
OUTPUT_FILE := $(JDK_MACOSX_CONTENTS_DIR)/Info.plist, \
REPLACEMENTS := \
@@ID@@ => $(BUNDLE_ID).jdk ; \
@@ID@@ => $(MACOSX_BUNDLE_ID_BASE).jdk ; \
@@NAME@@ => $(BUNDLE_NAME) ; \
@@INFO@@ => $(BUNDLE_INFO) ; \
@@PLATFORM_VERSION@@ => $(BUNDLE_PLATFORM_VERSION) ; \
@@VERSION@@ => $(BUNDLE_VERSION) ; \
@@VENDOR@@ => $(BUNDLE_VENDOR) , \
@@VERSION@@ => $(VERSION_NUMBER) ; \
@@BUILD_VERSION@@ => $(MACOSX_BUNDLE_BUILD_VERSION) ; \
@@VENDOR@@ => $(BUNDLE_VENDOR) ; \
@@MACOSX_VERSION_MIN@@ => $(MACOSX_VERSION_MIN) , \
))

$(eval $(call SetupTextFileProcessing, BUILD_JRE_PLIST, \
SOURCE_FILES := $(MACOSX_PLIST_SRC)/JRE-Info.plist, \
OUTPUT_FILE := $(JRE_MACOSX_CONTENTS_DIR)/Info.plist, \
REPLACEMENTS := \
@@ID@@ => $(BUNDLE_ID).jre ; \
@@ID@@ => $(MACOSX_BUNDLE_ID_BASE).jre ; \
@@NAME@@ => $(BUNDLE_NAME) ; \
@@INFO@@ => $(BUNDLE_INFO) ; \
@@PLATFORM_VERSION@@ => $(BUNDLE_PLATFORM_VERSION) ; \
@@VERSION@@ => $(BUNDLE_VERSION) ; \
@@VENDOR@@ => $(BUNDLE_VENDOR) , \
@@VERSION@@ => $(VERSION_NUMBER) ; \
@@BUILD_VERSION@@ => $(BUNDLE_BUILD_VERSION) ; \
@@VENDOR@@ => $(BUNDLE_VENDOR) ; \
@@MACOSX_VERSION_MIN@@ => $(MACOSX_VERSION_MIN) , \
))

$(SUPPORT_OUTPUTDIR)/images/_jdk_bundle_attribute_set: $(COPY_JDK_IMAGE)
Expand Down
73 changes: 33 additions & 40 deletions make/RunTests.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -32,43 +32,6 @@ include FindTests.gmk
# We will always run multiple tests serially
.NOTPARALLEL:

################################################################################
# Setup global test running parameters
################################################################################

# Each factor variable comes in 3 variants. The first one is reserved for users
# to use on command line. The other two are for predifined configurations in JDL
# and for machine specific configurations respectively.
TEST_JOBS_FACTOR ?= 1
TEST_JOBS_FACTOR_JDL ?= 1
TEST_JOBS_FACTOR_MACHINE ?= 1

ifeq ($(TEST_JOBS), 0)
CORES_DIVIDER := 2
ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
# For smaller SPARC machines we see reasonable scaling of throughput up to
# cpus/4 without affecting test reliability. On the bigger machines, cpus/4
# causes intermittent timeouts.
ifeq ($(shell $(EXPR) $(NUM_CORES) \> 16), 1)
CORES_DIVIDER := 5
else
CORES_DIVIDER := 4
endif
endif
MEMORY_DIVIDER := 2048
TEST_JOBS := $(shell $(AWK) \
'BEGIN { \
c = $(NUM_CORES) / $(CORES_DIVIDER); \
m = $(MEMORY_SIZE) / $(MEMORY_DIVIDER); \
if (c > m) c = m; \
c = c * $(TEST_JOBS_FACTOR); \
c = c * $(TEST_JOBS_FACTOR_JDL); \
c = c * $(TEST_JOBS_FACTOR_MACHINE); \
if (c < 1) c = 1; \
printf "%.0f", c; \
}')
endif

################################################################################
# Parse global control variables
################################################################################
Expand Down Expand Up @@ -241,11 +204,41 @@ TEST_JOBS_FACTOR_JDL ?= 1
TEST_JOBS_FACTOR_MACHINE ?= 1

ifeq ($(TEST_JOBS), 0)
# Concurrency based on min(cores / 2, 12) * TEST_JOBS_FACTOR
CORES_DIVIDER := 2
ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
# For smaller SPARC machines we see reasonable scaling of throughput up to
# cpus/4 without affecting test reliability. On the bigger machines, cpus/4
# causes intermittent timeouts.
ifeq ($(shell $(EXPR) $(NUM_CORES) \> 16), 1)
CORES_DIVIDER := 5
else
CORES_DIVIDER := 4
endif
endif
# For some big multi-core machines with low ulimit -u setting we hit the max
# threads/process limit. In such a setup the memory/cores-only-guided
# TEST_JOBS config is insufficient. From experience a concurrency setting of
# 14 works reasonably well for low ulimit values (<= 4096). Thus, use
# divider 4096/14. For high ulimit -u values this shouldn't make a difference.
ULIMIT_DIVIDER := (4096/14)
PROC_ULIMIT := -1
ifneq ($(OPENJDK_TARGET_OS), windows)
PROC_ULIMIT := $(shell $(ULIMIT) -u)
ifeq ($(PROC_ULIMIT), unlimited)
PROC_ULIMIT := -1
endif
endif
MEMORY_DIVIDER := 2048
TEST_JOBS := $(shell $(AWK) \
'BEGIN { \
c = $(NUM_CORES) / 2; \
if (c > 12) c = 12; \
c = $(NUM_CORES) / $(CORES_DIVIDER); \
m = $(MEMORY_SIZE) / $(MEMORY_DIVIDER); \
u = $(PROC_ULIMIT); \
if (u > -1) { \
u = u / $(ULIMIT_DIVIDER); \
if (u < c) c = u; \
} \
if (c > m) c = m; \
c = c * $(TEST_JOBS_FACTOR); \
c = c * $(TEST_JOBS_FACTOR_JDL); \
c = c * $(TEST_JOBS_FACTOR_MACHINE); \
Expand Down
1 change: 1 addition & 0 deletions make/RunTestsPrebuiltSpec.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ UNZIP := unzip
EXPR := expr
FILE := file
HG := hg
ULIMIT := ulimit

# On Solaris gnu versions of some tools are required.
ifeq ($(OPENJDK_BUILD_OS), solaris)
Expand Down
54 changes: 43 additions & 11 deletions make/autoconf/basics.m4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2019, 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
Expand Down Expand Up @@ -168,7 +168,7 @@ AC_DEFUN([ADD_JVM_ARG_IF_OK],
[
$ECHO "Check if jvm arg is ok: $1" >&AS_MESSAGE_LOG_FD
$ECHO "Command: $3 $1 -version" >&AS_MESSAGE_LOG_FD
OUTPUT=`$3 $1 -version 2>&1`
OUTPUT=`$3 $1 $USER_BOOT_JDK_OPTIONS -version 2>&1`
FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
Expand Down Expand Up @@ -402,6 +402,8 @@ AC_DEFUN_ONCE([BASIC_INIT],
[
# Save the original command line. This is passed to us by the wrapper configure script.
AC_SUBST(CONFIGURE_COMMAND_LINE)
# AUTOCONF might be set in the environment by the user. Preserve for "make reconfigure".
AC_SUBST(AUTOCONF)
# Save the path variable before it gets changed
ORIGINAL_PATH="$PATH"
AC_SUBST(ORIGINAL_PATH)
Expand Down Expand Up @@ -539,6 +541,26 @@ AC_DEFUN([BASIC_REQUIRE_SPECIAL],
BASIC_CHECK_NONEMPTY($1)
])

###############################################################################
# Like BASIC_REQUIRE_PROGS but also allows for bash built-ins
# $1: variable to set
# $2: executable name (or list of names) to look for
# $3: [path]
AC_DEFUN([BASIC_REQUIRE_BUILTIN_PROGS],
[
BASIC_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
AC_MSG_NOTICE([Found $2 as shell built-in. Using it])
$1="$2"
else
AC_MSG_ERROR([Required tool $2 also not found as built-in.])
fi
fi
BASIC_CHECK_NONEMPTY($1)
])

###############################################################################
# Setup the most fundamental tools that relies on not much else to set up,
# but is used by much of the early bootstrap code.
Expand Down Expand Up @@ -617,7 +639,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
[
# Save the current directory this script was started from
CURDIR="$PWD"
CONFIGURE_START_DIR="$PWD"
# We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
# for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
Expand All @@ -640,9 +662,10 @@ AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
AC_MSG_CHECKING([for top-level directory])
AC_MSG_RESULT([$TOPDIR])
AC_SUBST(TOPDIR)
AC_SUBST(CONFIGURE_START_DIR)
# We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
BASIC_FIXUP_PATH(CURDIR)
BASIC_FIXUP_PATH(CONFIGURE_START_DIR)
BASIC_FIXUP_PATH(TOPDIR)
if test "x$CUSTOM_ROOT" != x; then
Expand Down Expand Up @@ -873,9 +896,10 @@ AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
# Test from where we are running configure, in or outside of src root.
AC_MSG_CHECKING([where to store configuration])
if test "x$CURDIR" = "x$TOPDIR" || test "x$CURDIR" = "x$CUSTOM_ROOT" \
|| test "x$CURDIR" = "x$TOPDIR/make/autoconf" \
|| test "x$CURDIR" = "x$TOPDIR/make" ; then
if test "x$CONFIGURE_START_DIR" = "x$TOPDIR" \
|| test "x$CONFIGURE_START_DIR" = "x$CUSTOM_ROOT" \
|| test "x$CONFIGURE_START_DIR" = "x$TOPDIR/make/autoconf" \
|| test "x$CONFIGURE_START_DIR" = "x$TOPDIR/make" ; then
# We are running configure from the src root.
# Create a default ./build/target-variant-debuglevel output root.
if test "x${CONF_NAME}" = x; then
Expand All @@ -896,9 +920,9 @@ AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
# If configuration is situated in normal build directory, just use the build
# directory name as configuration name, otherwise use the complete path.
if test "x${CONF_NAME}" = x; then
CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${TOPDIR}/build/!!"`
CONF_NAME=`$ECHO $CONFIGURE_START_DIR | $SED -e "s!^${TOPDIR}/build/!!"`
fi
OUTPUTDIR="$CURDIR"
OUTPUTDIR="$CONFIGURE_START_DIR"
AC_MSG_RESULT([in current directory])
# WARNING: This might be a bad thing to do. You need to be sure you want to
Expand All @@ -918,14 +942,14 @@ AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
-e 's/ //g' \
| $TR -d '\n'`
if test "x$filtered_files" != x; then
AC_MSG_NOTICE([Current directory is $CURDIR.])
AC_MSG_NOTICE([Current directory is $CONFIGURE_START_DIR.])
AC_MSG_NOTICE([Since this is not the source root, configure will output the configuration here])
AC_MSG_NOTICE([(as opposed to creating a configuration in <src_root>/build/<conf-name>).])
AC_MSG_NOTICE([However, this directory is not empty. This is not allowed, since it could])
AC_MSG_NOTICE([seriously mess up just about everything.])
AC_MSG_NOTICE([Try 'cd $TOPDIR' and restart configure])
AC_MSG_NOTICE([(or create a new empty directory and cd to it).])
AC_MSG_ERROR([Will not continue creating configuration in $CURDIR])
AC_MSG_ERROR([Will not continue creating configuration in $CONFIGURE_START_DIR])
fi
fi
fi
Expand Down Expand Up @@ -1127,6 +1151,8 @@ AC_DEFUN([BASIC_CHECK_TAR],
TAR_TYPE="bsd"
elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
TAR_TYPE="bsd"
elif test "x$($TAR --version | $GREP "busybox")" != "x"; then
TAR_TYPE="busybox"
elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
TAR_TYPE="solaris"
fi
Expand All @@ -1142,6 +1168,9 @@ AC_DEFUN([BASIC_CHECK_TAR],
# When using gnu tar for Solaris targets, need to use compatibility mode
TAR_CREATE_EXTRA_PARAM="--format=ustar"
fi
elif test "x$TAR_TYPE" = "xbusybox"; then
TAR_INCLUDE_PARAM="T"
TAR_SUPPORTS_TRANSFORM="false"
else
TAR_INCLUDE_PARAM="I"
TAR_SUPPORTS_TRANSFORM="false"
Expand Down Expand Up @@ -1267,6 +1296,9 @@ AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
BASIC_REQUIRE_PROGS(ELFEDIT, elfedit)
fi
if ! test "x$OPENJDK_TARGET_OS" = "xwindows"; then
BASIC_REQUIRE_BUILTIN_PROGS(ULIMIT, ulimit)
fi
])

###############################################################################
Expand Down
4 changes: 2 additions & 2 deletions make/autoconf/basics_windows.m4
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ AC_DEFUN_ONCE([BASIC_COMPILE_FIXPATH],
$MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
cd $FIXPATH_DIR
$CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
cd $CURDIR
cd $CONFIGURE_START_DIR
if test ! -x $FIXPATH_BIN; then
AC_MSG_RESULT([no])
Expand Down Expand Up @@ -435,7 +435,7 @@ AC_DEFUN_ONCE([BASIC_COMPILE_FIXPATH],
cd $FIXPATH_DIR
$FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
> $FIXPATH_DIR/fixpath2.log 2>&1
cd $CURDIR
cd $CONFIGURE_START_DIR
if test ! -x $FIXPATH_DIR/fixpath2.exe; then
AC_MSG_RESULT([no])
cat $FIXPATH_DIR/fixpath2.log
Expand Down
Loading

0 comments on commit a8027e7

Please sign in to comment.