Skip to content

Commit ed18f94

Browse files
author
Alejandro Murillo
committed
Merge
2 parents b3349ef + 4935f9d commit ed18f94

File tree

447 files changed

+10221
-6352
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

447 files changed

+10221
-6352
lines changed

.hgtags

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,3 +356,4 @@ c870cb782aca71093d2584376f27f0cfbfec0e3a jdk-9+109
356356
a6614ff7bf09da74be1d0ef3d9755090d244697a jdk-9+111
357357
7359994942f8d8e723b584d66a3a92c2e9e95e5c jdk-9+112
358358
6072af7a98be3922f26bdce71b53bb3646cb2ac9 jdk-9+113
359+
c84d0cce090e161d736de69e941830adf8c2f87a jdk-9+114

.hgtags-top-repo

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,3 +356,4 @@ c7be2a78c31b3b6132f2f5e9e4b3d3bb1c20245c jdk-9+108
356356
f900d5afd9c83a0df8f36161c27c5e4c86a66f4c jdk-9+111
357357
03543a758cd5890f2266e4b9678378a925dde22a jdk-9+112
358358
55b6d550828d1223b364e6ead4a56e56411c56df jdk-9+113
359+
1d992540870ff33fe6cc550443388588df9b9e4f jdk-9+114

common/autoconf/boot-jdk.m4

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK],
305305
BOOT_JDK_SOURCETARGET="-source 8 -target 8"
306306
AC_SUBST(BOOT_JDK_SOURCETARGET)
307307
308-
ADD_JVM_ARG_IF_OK([-Xpatch:], dummy, [$JAVA])
308+
ADD_JVM_ARG_IF_OK([-Xpatch:foo=bar], dummy, [$JAVA])
309309
AC_MSG_CHECKING([if Boot JDK supports modules])
310310
if test "x$JVM_ARG_OK" = "xtrue"; then
311311
AC_MSG_RESULT([yes])
@@ -444,9 +444,9 @@ AC_DEFUN([BOOTJDK_CHECK_BUILD_JDK],
444444
BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | head -n 1`
445445
446446
# Extra M4 quote needed to protect [] in grep expression.
447-
[FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | grep '\"1\.[9]\.'`]
447+
[FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`]
448448
if test "x$FOUND_CORRECT_VERSION" = x; then
449-
AC_MSG_NOTICE([Potential Boot JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring])
449+
AC_MSG_NOTICE([Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring])
450450
AC_MSG_NOTICE([(Your Build JDK must be version 9)])
451451
BUILD_JDK_FOUND=no
452452
else

common/autoconf/build-performance.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ AC_DEFUN_ONCE([BPERF_SETUP_SMART_JAVAC],
454454
AC_MSG_RESULT([$ENABLE_JAVAC_SERVER])
455455
AC_SUBST(ENABLE_JAVAC_SERVER)
456456
457-
if test "x$ENABLE_JAVAC_SERVER" = "xyes" || "x$ENABLE_SJAVAC" = "xyes"; then
457+
if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
458458
# When using a server javac, the small client instances do not need much
459459
# resources.
460460
JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"

common/autoconf/configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ LIB_SETUP_LIBRARIES
227227

228228
HOTSPOT_SETUP_BUILD_TWEAKS
229229
JDKOPT_DETECT_INTREE_EC
230+
JDKOPT_ENABLE_DISABLE_FAILURE_HANDLER
230231

231232
###############################################################################
232233
#

common/autoconf/generated-configure.sh

Lines changed: 62 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -650,6 +650,7 @@ TEST_JOBS
650650
JOBS
651651
MEMORY_SIZE
652652
NUM_CORES
653+
BUILD_FAILURE_HANDLER
653654
ENABLE_INTREE_EC
654655
HOTSPOT_MAKE_ARGS
655656
LIBZIP_CAN_USE_MMAP
@@ -1172,6 +1173,7 @@ with_lcms
11721173
with_dxsdk
11731174
with_dxsdk_lib
11741175
with_dxsdk_include
1176+
enable_jtreg_failure_handler
11751177
with_num_cores
11761178
with_memory_size
11771179
with_jobs
@@ -1940,6 +1942,12 @@ Optional Features:
19401942
disable bundling of the freetype library with the
19411943
build result [enabled on Windows or when using
19421944
--with-freetype, disabled otherwise]
1945+
--enable-jtreg-failure-handler
1946+
forces build of the jtreg failure handler to be
1947+
enabled, missing dependencies become fatal errors.
1948+
Default is auto, where the failure handler is built
1949+
if all dependencies are present and otherwise just
1950+
disabled.
19431951
--enable-sjavac use sjavac to do fast incremental compiles
19441952
[disabled]
19451953
--disable-javac-server disable javac server [enabled]
@@ -4274,6 +4282,12 @@ pkgadd_help() {
42744282
#
42754283

42764284

4285+
################################################################################
4286+
#
4287+
# Check if building of the jtreg failure handler should be enabled.
4288+
#
4289+
4290+
42774291
#
42784292
# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
42794293
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -4950,7 +4964,7 @@ VS_SDK_PLATFORM_NAME_2013=
49504964
#CUSTOM_AUTOCONF_INCLUDE
49514965

49524966
# Do not change or remove the following line, it is needed for consistency checks:
4953-
DATE_WHEN_GENERATED=1458755892
4967+
DATE_WHEN_GENERATED=1460963400
49544968

49554969
###############################################################################
49564970
#
@@ -29770,13 +29784,13 @@ $as_echo "$tool_specified" >&6; }
2977029784

2977129785

2977229786

29773-
$ECHO "Check if jvm arg is ok: -Xpatch:" >&5
29774-
$ECHO "Command: $JAVA -Xpatch: -version" >&5
29775-
OUTPUT=`$JAVA -Xpatch: -version 2>&1`
29787+
$ECHO "Check if jvm arg is ok: -Xpatch:foo=bar" >&5
29788+
$ECHO "Command: $JAVA -Xpatch:foo=bar -version" >&5
29789+
OUTPUT=`$JAVA -Xpatch:foo=bar -version 2>&1`
2977629790
FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
2977729791
FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
2977829792
if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
29779-
dummy="$dummy -Xpatch:"
29793+
dummy="$dummy -Xpatch:foo=bar"
2978029794
JVM_ARG_OK=true
2978129795
else
2978229796
$ECHO "Arg failed:" >&5
@@ -29856,10 +29870,10 @@ $as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
2985629870
BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | head -n 1`
2985729871

2985829872
# Extra M4 quote needed to protect [] in grep expression.
29859-
FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | grep '\"1\.[9]\.'`
29873+
FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
2986029874
if test "x$FOUND_CORRECT_VERSION" = x; then
29861-
{ $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
29862-
$as_echo "$as_me: Potential Boot JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
29875+
{ $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
29876+
$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
2986329877
{ $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
2986429878
$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
2986529879
BUILD_JDK_FOUND=no
@@ -62037,6 +62051,45 @@ $as_echo "no" >&6; }
6203762051

6203862052

6203962053

62054+
# Check whether --enable-jtreg-failure-handler was given.
62055+
if test "${enable_jtreg_failure_handler+set}" = set; then :
62056+
enableval=$enable_jtreg_failure_handler;
62057+
fi
62058+
62059+
62060+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
62061+
$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
62062+
62063+
if test "x$enable_jtreg_failure_handler" = "xyes"; then
62064+
if test "x$JT_HOME" = "x"; then
62065+
as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
62066+
else
62067+
BUILD_FAILURE_HANDLER=true
62068+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
62069+
$as_echo "yes, forced" >&6; }
62070+
fi
62071+
elif test "x$enable_jtreg_failure_handler" = "xno"; then
62072+
BUILD_FAILURE_HANDLER=false
62073+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
62074+
$as_echo "no, forced" >&6; }
62075+
elif test "x$enable_jtreg_failure_handler" = "xauto" \
62076+
|| test "x$enable_jtreg_failure_handler" = "x"; then
62077+
if test "x$JT_HOME" = "x"; then
62078+
BUILD_FAILURE_HANDLER=false
62079+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
62080+
$as_echo "no, missing jtreg" >&6; }
62081+
else
62082+
BUILD_FAILURE_HANDLER=true
62083+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
62084+
$as_echo "yes, jtreg present" >&6; }
62085+
fi
62086+
else
62087+
as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
62088+
fi
62089+
62090+
62091+
62092+
6204062093
###############################################################################
6204162094
#
6204262095
# Configure parts of the build that only affect the build performance,
@@ -62510,7 +62563,7 @@ $as_echo_n "checking whether to use javac server... " >&6; }
6251062563
$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
6251162564

6251262565

62513-
if test "x$ENABLE_JAVAC_SERVER" = "xyes" || "x$ENABLE_SJAVAC" = "xyes"; then
62566+
if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
6251462567
# When using a server javac, the small client instances do not need much
6251562568
# resources.
6251662569
JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"

common/autoconf/jdk-options.m4

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_STATIC_BUILD],
408408

409409
################################################################################
410410
#
411-
# jlink options.
411+
# jlink options.
412412
# We always keep packaged modules in JDK image.
413413
#
414414
AC_DEFUN_ONCE([JDKOPT_SETUP_JLINK_OPTIONS],
@@ -433,3 +433,42 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JLINK_OPTIONS],
433433
434434
AC_SUBST(JLINK_KEEP_PACKAGED_MODULES)
435435
])
436+
437+
################################################################################
438+
#
439+
# Check if building of the jtreg failure handler should be enabled.
440+
#
441+
AC_DEFUN_ONCE([JDKOPT_ENABLE_DISABLE_FAILURE_HANDLER],
442+
[
443+
AC_ARG_ENABLE([jtreg-failure-handler], [AS_HELP_STRING([--enable-jtreg-failure-handler],
444+
[forces build of the jtreg failure handler to be enabled, missing dependencies
445+
become fatal errors. Default is auto, where the failure handler is built if all
446+
dependencies are present and otherwise just disabled.])])
447+
448+
AC_MSG_CHECKING([if jtreg failure handler should be built])
449+
450+
if test "x$enable_jtreg_failure_handler" = "xyes"; then
451+
if test "x$JT_HOME" = "x"; then
452+
AC_MSG_ERROR([Cannot enable jtreg failure handler without jtreg.])
453+
else
454+
BUILD_FAILURE_HANDLER=true
455+
AC_MSG_RESULT([yes, forced])
456+
fi
457+
elif test "x$enable_jtreg_failure_handler" = "xno"; then
458+
BUILD_FAILURE_HANDLER=false
459+
AC_MSG_RESULT([no, forced])
460+
elif test "x$enable_jtreg_failure_handler" = "xauto" \
461+
|| test "x$enable_jtreg_failure_handler" = "x"; then
462+
if test "x$JT_HOME" = "x"; then
463+
BUILD_FAILURE_HANDLER=false
464+
AC_MSG_RESULT([no, missing jtreg])
465+
else
466+
BUILD_FAILURE_HANDLER=true
467+
AC_MSG_RESULT([yes, jtreg present])
468+
fi
469+
else
470+
AC_MSG_ERROR([Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler])
471+
fi
472+
473+
AC_SUBST(BUILD_FAILURE_HANDLER)
474+
])

common/autoconf/spec.gmk.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,8 @@ HOTSPOT_DIST=@HOTSPOT_DIST@
260260

261261
BUILD_HOTSPOT=@BUILD_HOTSPOT@
262262

263+
BUILD_FAILURE_HANDLER := @BUILD_FAILURE_HANDLER@
264+
263265
# The boot jdk to use. This is overridden in bootcycle-spec.gmk. Make sure to keep
264266
# it in sync.
265267
BOOT_JDK:=@BOOT_JDK@

common/bin/compare.sh

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ if [ "$OPENJDK_TARGET_OS" = "macosx" ]; then
4141
STAT_PRINT_SIZE="-f %z"
4242
elif [ "$OPENJDK_TARGET_OS" = "windows" ]; then
4343
FULLDUMP_CMD="$DUMPBIN -all"
44-
LDD_CMD="$DUMPBIN -dependants | $GREP .dll"
44+
LDD_CMD="$DUMPBIN -dependents"
4545
DIS_CMD="$DUMPBIN -disasm:nobytes"
4646
STAT_PRINT_SIZE="-c %s"
4747
elif [ "$OPENJDK_TARGET_OS" = "aix" ]; then
@@ -824,12 +824,25 @@ compare_bin_file() {
824824

825825
# Check dependencies
826826
if [ -n "$LDD_CMD" ]; then
827-
(cd $FILE_WORK_DIR && $CP $OTHER_FILE . && $LDD_CMD $NAME 2>/dev/null | $AWK '{ print $1;}' | $SORT | $TEE $WORK_FILE_BASE.deps.other | $UNIQ > $WORK_FILE_BASE.deps.other.uniq)
828-
(cd $FILE_WORK_DIR && $CP $THIS_FILE . && $LDD_CMD $NAME 2</dev/null | $AWK '{ print $1;}' | $SORT | $TEE $WORK_FILE_BASE.deps.this | $UNIQ > $WORK_FILE_BASE.deps.this.uniq)
827+
if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
828+
LDD_FILTER="$GREP \.dll"
829+
else
830+
LDD_FILTER="$CAT"
831+
fi
832+
(cd $FILE_WORK_DIR && $CP $OTHER_FILE . && $LDD_CMD $NAME 2>/dev/null \
833+
| $LDD_FILTER | $AWK '{ print $1;}' | $SORT \
834+
| $TEE $WORK_FILE_BASE.deps.other \
835+
| $UNIQ > $WORK_FILE_BASE.deps.other.uniq)
836+
(cd $FILE_WORK_DIR && $CP $THIS_FILE . && $LDD_CMD $NAME 2</dev/null \
837+
| $LDD_FILTER | $AWK '{ print $1;}' | $SORT \
838+
| $TEE $WORK_FILE_BASE.deps.this \
839+
| $UNIQ > $WORK_FILE_BASE.deps.this.uniq)
829840
(cd $FILE_WORK_DIR && $RM -f $NAME)
830841

831-
LC_ALL=C $DIFF $WORK_FILE_BASE.deps.other $WORK_FILE_BASE.deps.this > $WORK_FILE_BASE.deps.diff
832-
LC_ALL=C $DIFF $WORK_FILE_BASE.deps.other.uniq $WORK_FILE_BASE.deps.this.uniq > $WORK_FILE_BASE.deps.diff.uniq
842+
LC_ALL=C $DIFF $WORK_FILE_BASE.deps.other $WORK_FILE_BASE.deps.this \
843+
> $WORK_FILE_BASE.deps.diff
844+
LC_ALL=C $DIFF $WORK_FILE_BASE.deps.other.uniq $WORK_FILE_BASE.deps.this.uniq \
845+
> $WORK_FILE_BASE.deps.diff.uniq
833846

834847
if [ -s $WORK_FILE_BASE.deps.diff ]; then
835848
if [ -s $WORK_FILE_BASE.deps.diff.uniq ]; then

common/conf/jib-profiles.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ var getJibProfiles = function (input) {
214214
var getJibProfilesCommon = function (input) {
215215
var common = {
216216
dependencies: ["boot_jdk", "gnumake", "jtreg"],
217-
configure_args: ["--with-default-make-target=all"],
217+
configure_args: ["--with-default-make-target=all", "--enable-jtreg-failure-handler"],
218218
configure_args_32bit: ["--with-target-bits=32", "--with-jvm-variants=client,server"],
219219
configure_args_debug: ["--enable-debug"],
220220
configure_args_slowdebug: ["--with-debug-level=slowdebug"],

0 commit comments

Comments
 (0)