Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LW3 version prefix #91

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -641,9 +641,8 @@ dd5198db2e5b1ebcafe065d987c03ba9fcb50fc3 jdk-15+17
7223c6d610343fd8323af9d07d501e01fa1a7696 jdk-15+22
f143729ca00ec14a98ea5c7f73acba88da97746e jdk-15+23
497fd9f9129c4928fd5a876dd55e0daf6298b511 jdk-15+24
58833044988772ca06c97ab2f142474a8627af80 jdk-15+25
58833044988772ca06c97ab2f142474a8627af80 jdk-15+25
90b266a84c06f1b3dc0ed8767856793e8c1c357e jdk-15+25
0a32396f7a690015d22ca3328ac441a358295d90 jdk-15+26
506abc554caeb275928c02bf3a16e95d1978749f jdk-15+27
93813843680bbe1b7efbca56c03fd137f20a2c31 jdk-16+0
93813843680bbe1b7efbca56c03fd137f20a2c31 jdk-15+27
4a485c89d5a08b495961835f5308a96038678aeb jdk-16+1
@@ -640,6 +640,18 @@ $(eval $(call SetupTarget, test-image-jdk-jtreg-native, \
DEPS := build-test-jdk-jtreg-native, \
))

$(eval $(call SetupTarget, build-test-libtest-jtreg-native, \
MAKEFILE := test/JtregNativeLibTest, \
TARGET := build-test-libtest-jtreg-native, \
DEPS := buildtools-jdk, \
))

$(eval $(call SetupTarget, test-image-libtest-jtreg-native, \
MAKEFILE := test/JtregNativeLibTest, \
TARGET := test-image-libtest-jtreg-native, \
DEPS := build-test-libtest-jtreg-native, \
))

$(eval $(call SetupTarget, build-test-hotspot-jtreg-graal, \
MAKEFILE := test/JtregGraalUnit, \
TARGET := build-test-hotspot-jtreg-graal, \
@@ -982,6 +994,7 @@ else
interim-image: $(INTERIM_JMOD_TARGETS)

build-test-hotspot-jtreg-native: hotspot-$(JVM_VARIANT_MAIN)-libs
build-test-libtest-jtreg-native: hotspot-$(JVM_VARIANT_MAIN)-libs

endif

@@ -1105,7 +1118,7 @@ endif
docs-image: docs-jdk

# This target builds the test image
test-image: prepare-test-image test-image-jdk-jtreg-native test-image-demos-jdk
test-image: prepare-test-image test-image-jdk-jtreg-native test-image-demos-jdk test-image-libtest-jtreg-native

ifneq ($(JVM_TEST_IMAGE_TARGETS), )
# If JVM_TEST_IMAGE_TARGETS is externally defined, use it instead of the
@@ -342,11 +342,13 @@ hotspot_JTREG_MAX_MEM := 0
hotspot_JTREG_ASSERT := false
hotspot_JTREG_NATIVEPATH := $(TEST_IMAGE_DIR)/hotspot/jtreg/native
jdk_JTREG_NATIVEPATH := $(TEST_IMAGE_DIR)/jdk/jtreg/native
lib-test_JTREG_NATIVEPATH := $(TEST_IMAGE_DIR)/lib-test/jtreg/native

jdk_JTREG_PROBLEM_LIST += $(TOPDIR)/test/jdk/ProblemList.txt
jaxp_JTREG_PROBLEM_LIST += $(TOPDIR)/test/jaxp/ProblemList.txt
langtools_JTREG_PROBLEM_LIST += $(TOPDIR)/test/langtools/ProblemList.txt
hotspot_JTREG_PROBLEM_LIST += $(TOPDIR)/test/hotspot/jtreg/ProblemList.txt
lib-test_JTREG_PROBLEM_LIST += $(TOPDIR)/test/lib-test/ProblemList.txt

langtools_JTREG_MAX_MEM := 768m

@@ -62,17 +62,10 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
[
# Setup basic LDFLAGS
if test "x$TOOLCHAIN_TYPE" = xgcc; then
# If this is a --hash-style=gnu system, use --hash-style=both, why?
# We have previously set HAS_GNU_HASH if this is the case
if test -n "$HAS_GNU_HASH"; then
BASIC_LDFLAGS="-Wl,--hash-style=both"
LIBJSIG_HASHSTYLE_LDFLAGS="-Wl,--hash-style=both"
fi
# Add -z,defs, to forbid undefined symbols in object files.
# add -z,relro (mark relocations read only) for all libs
# add -z,now ("full relro" - more of the Global Offset Table GOT is marked read only)
BASIC_LDFLAGS="$BASIC_LDFLAGS -Wl,-z,defs -Wl,-z,relro -Wl,-z,now"
BASIC_LDFLAGS="-Wl,--hash-style=gnu -Wl,-z,defs -Wl,-z,relro -Wl,-z,now"
# Linux : remove unused code+data in link step
if test "x$ENABLE_LINKTIME_GC" = xtrue; then
if test "x$OPENJDK_TARGET_CPU" = xs390x; then
@@ -152,8 +145,6 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
# Export some intermediate variables for compatibility
LDFLAGS_CXX_JDK="$BASIC_LDFLAGS_ONLYCXX $BASIC_LDFLAGS_ONLYCXX_JDK_ONLY $DEBUGLEVEL_LDFLAGS_JDK_ONLY"
AC_SUBST(LDFLAGS_CXX_JDK)
AC_SUBST(LIBJSIG_HASHSTYLE_LDFLAGS)
AC_SUBST(LIBJSIG_NOEXECSTACK_LDFLAGS)
])

################################################################################
@@ -179,7 +179,7 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
AC_MSG_ERROR([--with-version-string must have a value])
elif test "x$with_version_string" != x; then
# Additional [] needed to keep m4 from mangling shell constructs.
if [ [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ]; then
if [ [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z0-9]+))?(((\+)([0-9]*))?(-([-a-zA-Z0-9.]+))?)?$ ]] ]; then
VERSION_FEATURE=${BASH_REMATCH[[1]]}
VERSION_INTERIM=${BASH_REMATCH[[3]]}
VERSION_UPDATE=${BASH_REMATCH[[5]]}
@@ -188,9 +188,9 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
VERSION_EXTRA2=${BASH_REMATCH[[11]]}
VERSION_EXTRA3=${BASH_REMATCH[[13]]}
VERSION_PRE=${BASH_REMATCH[[15]]}
version_plus_separator=${BASH_REMATCH[[17]]}
VERSION_BUILD=${BASH_REMATCH[[18]]}
VERSION_OPT=${BASH_REMATCH[[20]]}
version_plus_separator=${BASH_REMATCH[[18]]}
VERSION_BUILD=${BASH_REMATCH[[19]]}
VERSION_OPT=${BASH_REMATCH[[21]]}
# Unspecified numerical fields are interpreted as 0.
if test "x$VERSION_INTERIM" = x; then
VERSION_INTERIM=0
@@ -233,8 +233,8 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
# Interpret --without-* as empty string instead of the literal "no"
VERSION_PRE=
else
# Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
[ VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'` ]
# Only [a-zA-Z0-9] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
[ VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-zA-Z0-9]'` ]
if test "x$VERSION_PRE" != "x$with_version_pre"; then
AC_MSG_WARN([--with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'])
fi
@@ -489,9 +489,6 @@ CXXFLAGS_JDKLIB:=@CXXFLAGS_JDKLIB@
CFLAGS_JDKEXE:=@CFLAGS_JDKEXE@
CXXFLAGS_JDKEXE:=@CXXFLAGS_JDKEXE@

LIBJSIG_HASHSTYLE_LDFLAGS := @LIBJSIG_HASHSTYLE_LDFLAGS@
LIBJSIG_NOEXECSTACK_LDFLAGS := @LIBJSIG_NOEXECSTACK_LDFLAGS@

FDLIBM_CFLAGS := @FDLIBM_CFLAGS@
JVM_CFLAGS := @JVM_CFLAGS@
JVM_LDFLAGS := @JVM_LDFLAGS@
@@ -972,12 +972,6 @@ AC_DEFUN_ONCE([TOOLCHAIN_MISC_CHECKS],
fi
fi
if test "x$TOOLCHAIN_TYPE" = xgcc; then
# If this is a --hash-style=gnu system, use --hash-style=both, why?
HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
# This is later checked when setting flags.
fi
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
# Check if linker has -z noexecstack.
HAS_NOEXECSTACK=`$CC -Wl,--help 2>/dev/null | $GREP 'z noexecstack'`
@@ -1005,8 +999,27 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_JTREG],
AC_MSG_CHECKING([for jtreg test harness])
AC_MSG_RESULT([no, disabled])
elif test "x$with_jtreg" != xyes && test "x$with_jtreg" != x; then
# An explicit path is specified, use it.
JT_HOME="$with_jtreg"
if test -d "$with_jtreg"; then
# An explicit path is specified, use it.
JT_HOME="$with_jtreg"
else
case "$with_jtreg" in
*.zip )
JTREG_SUPPORT_DIR=$CONFIGURESUPPORT_OUTPUTDIR/jtreg
$RM -rf $JTREG_SUPPORT_DIR
$MKDIR -p $JTREG_SUPPORT_DIR
$UNZIP -qq -d $JTREG_SUPPORT_DIR $with_jtreg
# Try to find jtreg to determine JT_HOME path
JTREG_PATH=`$FIND $JTREG_SUPPORT_DIR | $GREP "/bin/jtreg"`
if test "x$JTREG_PATH" != x; then
JT_HOME=$($DIRNAME $($DIRNAME $JTREG_PATH))
fi
;;
* )
;;
esac
fi
UTIL_FIXUP_PATH([JT_HOME])
if test ! -d "$JT_HOME"; then
AC_MSG_ERROR([jtreg home directory from --with-jtreg=$with_jtreg does not exist])
@@ -38,7 +38,7 @@ DEFAULT_VERSION_CLASSFILE_MAJOR=60 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
DEFAULT_VERSION_CLASSFILE_MINOR=0
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="14 15 16"
DEFAULT_JDK_SOURCE_TARGET_VERSION=16
DEFAULT_PROMOTED_VERSION_PRE=ea
DEFAULT_PROMOTED_VERSION_PRE=lworld3ea

LAUNCHER_NAME=openjdk
PRODUCT_NAME=OpenJDK
@@ -43,7 +43,7 @@ $(eval $(call IncludeCustomExtension, common/FindTests.gmk))
TEST_BASEDIRS += $(TOPDIR)/test $(TOPDIR)

# JTREG_TESTROOTS might have been set by a custom extension
JTREG_TESTROOTS += $(addprefix $(TOPDIR)/test/, hotspot/jtreg jdk langtools jaxp)
JTREG_TESTROOTS += $(addprefix $(TOPDIR)/test/, hotspot/jtreg jdk langtools jaxp lib-test)

# Extract the names of the Jtreg group files from the TEST.ROOT files. The
# TEST.ROOT files being properties files can be interpreted as makefiles so
@@ -1347,7 +1347,7 @@ var versionArgs = function(input, common) {
args = concat(args, "--with-version-pre=" + preString,
"--with-version-opt=" + optString);
} else {
args = concat(args, "--with-version-pre=lworld2ea");
args = concat(args, "--with-version-pre=" + version_numbers.get("DEFAULT_PROMOTED_VERSION_PRE"));
args = concat(args, "--with-version-opt=" + common.build_id);
}
return args;
@@ -62,6 +62,7 @@ ifeq ($(call isTargetOs, linux), true)
JVM_PRECOMPILED_HEADER_EXCLUDE := \
sharedRuntimeTrig.cpp \
sharedRuntimeTrans.cpp \
$(OPT_SPEED_SRC) \
#
endif

@@ -111,6 +112,7 @@ else ifeq ($(call isTargetOs, macosx), true)
loopTransform.cpp \
unsafe.cpp \
jvmciCompilerToVM.cpp \
$(OPT_SPEED_SRC) \
#
endif

@@ -872,10 +872,8 @@ BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exesigtest := -ljvm
ifeq ($(call isTargetOs, windows), true)
BUILD_HOTSPOT_JTREG_EXECUTABLES_CFLAGS_exeFPRegs := -MT
BUILD_HOTSPOT_JTREG_EXCLUDE += exesigtest.c libterminatedThread.c
BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exejvm-test-launcher := jvm.lib
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libatExit := jvm.lib
else
BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exejvm-test-launcher := -ljvm
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libbootclssearch_agent += -lpthread
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsystemclssearch_agent += -lpthread
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libgetsysprop001 += -lpthread
@@ -0,0 +1,94 @@
#
# Copyright (c) 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
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#

################################################################################
# This file builds the native component of the JTReg tests for testlibrary.
# It also covers the test-image part, where the built files are copied to the
# test image.
################################################################################

default: all

include $(SPEC)
include MakeBase.gmk
include TestFilesCompilation.gmk

$(eval $(call IncludeCustomExtension, test/JtregNativeLibTest.gmk))

################################################################################
# Targets for building the native tests themselves.
################################################################################

# This might have been added to by a custom extension.
BUILD_LIBTEST_JTREG_NATIVE_SRC += $(TOPDIR)/test/lib-test

BUILD_LIBTEST_JTREG_OUTPUT_DIR := $(OUTPUTDIR)/support/test/lib-test/jtreg/native

BUILD_LIBTEST_JTREG_IMAGE_DIR := $(TEST_IMAGE_DIR)/lib-test/jtreg

ifeq ($(call isTargetOs, windows), true)
BUILD_LIBTEST_JTREG_EXECUTABLES_LIBS_exejvm-test-launcher := jvm.lib
else
BUILD_LIBTEST_JTREG_EXECUTABLES_LIBS_exejvm-test-launcher := -ljvm
endif

# This evaluation is expensive and should only be done if this target was
# explicitly called.
ifneq ($(filter build-test-libtest-jtreg-native, $(MAKECMDGOALS)), )
$(eval $(call SetupTestFilesCompilation, BUILD_LIBTEST_JTREG_LIBRARIES, \
TYPE := LIBRARY, \
SOURCE_DIRS := $(BUILD_LIBTEST_JTREG_NATIVE_SRC), \
OUTPUT_DIR := $(BUILD_LIBTEST_JTREG_OUTPUT_DIR), \
EXCLUDE := $(BUILD_LIBTEST_JTREG_EXCLUDE), \
))

$(eval $(call SetupTestFilesCompilation, BUILD_LIBTEST_JTREG_EXECUTABLES, \
TYPE := PROGRAM, \
SOURCE_DIRS := $(BUILD_LIBTEST_JTREG_NATIVE_SRC), \
OUTPUT_DIR := $(BUILD_LIBTEST_JTREG_OUTPUT_DIR), \
EXCLUDE := $(BUILD_LIBTEST_JTREG_EXCLUDE), \
))
endif

build-test-libtest-jtreg-native: $(BUILD_LIBTEST_JTREG_LIBRARIES) $(BUILD_LIBTEST_JTREG_EXECUTABLES)

################################################################################
# Targets for building test-image.
################################################################################

# Copy to lib-test jtreg test image
$(eval $(call SetupCopyFiles, COPY_LIBTEST_JTREG_NATIVE, \
SRC := $(BUILD_LIBTEST_JTREG_OUTPUT_DIR), \
DEST := $(TEST_IMAGE_DIR)/lib-test/jtreg/native, \
FILES := $(wildcard $(addprefix $(BUILD_LIBTEST_JTREG_OUTPUT_DIR), /bin/* /lib/*)), \
FLATTEN := true, \
))

test-image-libtest-jtreg-native: $(COPY_LIBTEST_JTREG_NATIVE)

all: build-test-libtest-jtreg-native
test-image: test-image-libtest-jtreg-native

.PHONY: default all build-test-libtest-jtreg-native test-image-libtest-jtreg-native test-image
@@ -1335,7 +1335,7 @@ void MacroAssembler::verify_oop(Register reg, const char* s) {
stp(rscratch2, lr, Address(pre(sp, -2 * wordSize)));

mov(r0, reg);
mov(rscratch1, (address)b);
movptr(rscratch1, (uintptr_t)(address)b);

// call indirectly to solve generation ordering problem
lea(rscratch2, ExternalAddress(StubRoutines::verify_oop_subroutine_entry_address()));
@@ -1375,7 +1375,7 @@ void MacroAssembler::verify_oop_addr(Address addr, const char* s) {
} else {
ldr(r0, addr);
}
mov(rscratch1, (address)b);
movptr(rscratch1, (uintptr_t)(address)b);

// call indirectly to solve generation ordering problem
lea(rscratch2, ExternalAddress(StubRoutines::verify_oop_subroutine_entry_address()));