Skip to content

Commit

Permalink
Merge branch 'master' into standard-encodings-in-non-public-modules
Browse files Browse the repository at this point in the history
  • Loading branch information
mrserb committed Aug 30, 2021
2 parents e712764 + 0609421 commit 79829ec
Show file tree
Hide file tree
Showing 338 changed files with 7,476 additions and 4,146 deletions.
24 changes: 24 additions & 0 deletions make/autoconf/boot-jdk.m4
Expand Up @@ -298,6 +298,28 @@ AC_DEFUN([BOOTJDK_CHECK_TOOL_IN_BOOTJDK],
])
])

# Setup CLASSPATH environment variable
AC_DEFUN([BOOTJDK_SETUP_CLASSPATH],
[
AC_ARG_WITH([classpath], [AS_HELP_STRING([--with-classpath],
[Optional classpath to set as CLASSPATH to all Java invocations @<:@none@:>@])])
if test "x$CLASSPATH" != x; then
AC_MSG_WARN([CLASSPATH is set in the environment. This will be ignored. Use --with-classpath instead.])
fi
CLASSPATH=
if test "x$with_classpath" != x && test "x$with_classpath" != xyes &&
test "x$with_classpath" != xno ; then
CLASSPATH="$with_classpath"
AC_MSG_CHECKING([for classpath to use for all Java invocations])
AC_MSG_RESULT([$CLASSPATH])
fi
AC_SUBST(CLASSPATH)
])

###############################################################################
#
# We need a Boot JDK to bootstrap the build.
Expand Down Expand Up @@ -394,6 +416,8 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK],
BOOTJDK_USE_LOCAL_CDS=false
AC_MSG_RESULT([no, -XX:SharedArchiveFile not supported])
fi
BOOTJDK_SETUP_CLASSPATH
])

AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
Expand Down
2 changes: 1 addition & 1 deletion make/autoconf/flags-cflags.m4
Expand Up @@ -137,7 +137,7 @@ AC_DEFUN([FLAGS_SETUP_WARNINGS],
DISABLED_WARNINGS="4800"
if test "x$TOOLCHAIN_VERSION" = x2017; then
# VS2017 incorrectly triggers this warning for constexpr
DISABLED_WARNINGS+=" 4307"
DISABLED_WARNINGS="$DISABLED_WARNINGS 4307"
fi
;;
Expand Down
5 changes: 3 additions & 2 deletions make/autoconf/flags-other.m4
Expand Up @@ -89,11 +89,12 @@ AC_DEFUN([FLAGS_SETUP_ASFLAGS],
# Fix linker warning.
# Code taken from make/autoconf/flags-cflags.m4 and adapted.
JVM_BASIC_ASFLAGS+=" -DMAC_OS_X_VERSION_MIN_REQUIRED=$MACOSX_VERSION_MIN_NODOTS \
JVM_BASIC_ASFLAGS="$JVM_BASIC_ASFLAGS \
-DMAC_OS_X_VERSION_MIN_REQUIRED=$MACOSX_VERSION_MIN_NODOTS \
-mmacosx-version-min=$MACOSX_VERSION_MIN"
if test -n "$MACOSX_VERSION_MAX"; then
JVM_BASIC_ASFLAGS+=" $OS_CFLAGS \
JVM_BASIC_ASFLAGS="$JVM_BASIC_ASFLAGS $OS_CFLAGS \
-DMAC_OS_X_VERSION_MAX_ALLOWED=$MACOSX_VERSION_MAX_NODOTS"
fi
fi
Expand Down
20 changes: 10 additions & 10 deletions make/autoconf/help.m4
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2021, 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 @@ -42,21 +42,21 @@ AC_DEFUN([HELP_MSG_MISSING_DEPENDENCY],
PKGHANDLER_COMMAND=
case $PKGHANDLER in
apt-get)
*apt-get)
apt_help $MISSING_DEPENDENCY ;;
yum)
*yum)
yum_help $MISSING_DEPENDENCY ;;
brew)
*brew)
brew_help $MISSING_DEPENDENCY ;;
port)
*port)
port_help $MISSING_DEPENDENCY ;;
pkgutil)
*pkgutil)
pkgutil_help $MISSING_DEPENDENCY ;;
pkgadd)
*pkgadd)
pkgadd_help $MISSING_DEPENDENCY ;;
zypper)
*zypper)
zypper_help $MISSING_DEPENDENCY ;;
pacman)
*pacman)
pacman_help $MISSING_DEPENDENCY ;;
esac
Expand Down Expand Up @@ -274,7 +274,7 @@ AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS],
printf "\n"
printf "Build performance summary:\n"
printf "* Cores to use: $JOBS\n"
printf "* Build jobs: $JOBS\n"
printf "* Memory limit: $MEMORY_SIZE MB\n"
if test "x$CCACHE_STATUS" != "x"; then
printf "* ccache status: $CCACHE_STATUS\n"
Expand Down
4 changes: 2 additions & 2 deletions make/autoconf/jdk-version.m4
@@ -1,5 +1,5 @@
#
# Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2015, 2021, 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 @@ -525,7 +525,7 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
MACOSX_BUNDLE_BUILD_VERSION="$VERSION_BUILD"
# If VERSION_OPT consists of only numbers and periods, add it.
if [ [[ $VERSION_OPT =~ ^[0-9\.]+$ ]] ]; then
MACOSX_BUNDLE_BUILD_VERSION+=".$VERSION_OPT"
MACOSX_BUNDLE_BUILD_VERSION="$MACOSX_BUNDLE_BUILD_VERSION.$VERSION_OPT"
fi
fi
AC_SUBST(MACOSX_BUNDLE_BUILD_VERSION)
Expand Down
6 changes: 2 additions & 4 deletions make/autoconf/libraries.m4
Expand Up @@ -43,11 +43,9 @@ AC_DEFUN_ONCE([LIB_DETERMINE_DEPENDENCIES],
if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
# No X11 support on windows or macosx
NEEDS_LIB_X11=false
elif test "x$ENABLE_HEADLESS_ONLY" = xtrue; then
# No X11 support needed when building headless only
NEEDS_LIB_X11=false
else
# All other instances need X11
# All other instances need X11, even if building headless only, libawt still
# needs X11 headers.
NEEDS_LIB_X11=true
fi
Expand Down
3 changes: 3 additions & 0 deletions make/autoconf/spec.gmk.in
Expand Up @@ -54,6 +54,9 @@ MAKE := @MAKE@
# Make sure all shell commands are executed with the C locale
export LC_ALL := C

# Make sure we override any local CLASSPATH variable
export CLASSPATH := @CLASSPATH@

# The default make arguments
MAKE_ARGS = $(MAKE_LOG_FLAGS) -r -R -I $(TOPDIR)/make/common SPEC=$(SPEC) \
MAKE_LOG_FLAGS="$(MAKE_LOG_FLAGS)" $(MAKE_LOG_VARS)
Expand Down
6 changes: 3 additions & 3 deletions make/conf/javadoc.conf
@@ -1,4 +1,4 @@
# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2020, 2021, 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 All @@ -23,9 +23,9 @@
#

# URLs
JAVADOC_BASE_URL=https://docs.oracle.com/pls/topic/lookup?ctx=javase$(VERSION_NUMBER)&amp;id=homepage
JAVADOC_BASE_URL=https://docs.oracle.com/pls/topic/lookup?ctx=javase$(VERSION_FEATURE)&amp;id=homepage
BUG_SUBMIT_URL=https://bugreport.java.com/bugreport/
COPYRIGHT_URL=legal/copyright.html
LICENSE_URL=https://www.oracle.com/java/javase/terms/license/java$(VERSION_NUMBER)speclicense.html
LICENSE_URL=https://www.oracle.com/java/javase/terms/license/java$(VERSION_FEATURE)speclicense.html
REDISTRIBUTION_URL=https://www.oracle.com/technetwork/java/redist-137594.html
OTHER_JDK_VERSIONS_URL=https://docs.oracle.com/en/java/javase/index.html
3 changes: 1 addition & 2 deletions make/data/charsetmapping/charsets
@@ -1,5 +1,5 @@
#
# Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2000, 2021, 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 @@ -49,7 +49,6 @@ charset US-ASCII US_ASCII
alias IBM367
alias cp367
alias csASCII
alias default
# Other aliases
alias 646 # Solaris POSIX locale
alias iso_646.irv:1983
Expand Down
4 changes: 2 additions & 2 deletions make/devkit/createMacosxDevkit.sh
@@ -1,6 +1,6 @@
#!/bin/bash
#
# Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2015, 2021, 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 @@ -102,7 +102,7 @@ EXCLUDE_DIRS=" \
"

for ex in $EXCLUDE_DIRS; do
EXCLUDE_ARGS+="--exclude=$ex "
EXCLUDE_ARGS="$EXCLUDE_ARGS --exclude=$ex"
done

echo "Copying Xcode.app..."
Expand Down
1 change: 0 additions & 1 deletion src/hotspot/cpu/aarch64/globals_aarch64.hpp
Expand Up @@ -39,7 +39,6 @@ define_pd_global(bool, UncommonNullCast, true); // Uncommon-trap NULLs
define_pd_global(uintx, CodeCacheSegmentSize, 64 COMPILER1_AND_COMPILER2_PRESENT(+64)); // Tiered compilation has large code-entry alignment.
define_pd_global(intx, CodeEntryAlignment, 64);
define_pd_global(intx, OptoLoopAlignment, 16);
define_pd_global(intx, InlineFrequencyCount, 100);

#define DEFAULT_STACK_YELLOW_PAGES (2)
#define DEFAULT_STACK_RED_PAGES (1)
Expand Down
6 changes: 3 additions & 3 deletions src/hotspot/cpu/aarch64/pauth_aarch64.hpp
Expand Up @@ -22,8 +22,8 @@
*
*/

#ifndef CPU_AARCH64_PAUTH_AARCH64_INLINE_HPP
#define CPU_AARCH64_PAUTH_AARCH64_INLINE_HPP
#ifndef CPU_AARCH64_PAUTH_AARCH64_HPP
#define CPU_AARCH64_PAUTH_AARCH64_HPP

#include OS_CPU_HEADER_INLINE(pauth)

Expand All @@ -32,4 +32,4 @@ inline bool pauth_ptr_is_raw(address ptr) {
return ptr == pauth_strip_pointer(ptr);
}

#endif // CPU_AARCH64_PAUTH_AARCH64_INLINE_HPP
#endif // CPU_AARCH64_PAUTH_AARCH64_HPP
1 change: 0 additions & 1 deletion src/hotspot/cpu/arm/globals_arm.hpp
Expand Up @@ -53,7 +53,6 @@ define_pd_global(intx, StackRedPages, DEFAULT_STACK_RED_PAGES);
define_pd_global(intx, StackShadowPages, DEFAULT_STACK_SHADOW_PAGES);
define_pd_global(intx, StackReservedPages, DEFAULT_STACK_RESERVED_PAGES);

define_pd_global(intx, InlineFrequencyCount, 50);
#if defined(COMPILER1) || defined(COMPILER2)
define_pd_global(intx, InlineSmallCode, 1500);
#endif
Expand Down
35 changes: 21 additions & 14 deletions src/hotspot/cpu/ppc/frame_ppc.cpp
Expand Up @@ -52,7 +52,6 @@ void RegisterMap::check_location_valid() {
#endif // ASSERT

bool frame::safe_for_sender(JavaThread *thread) {
bool safe = false;
address sp = (address)_sp;
address fp = (address)_fp;
address unextended_sp = (address)_unextended_sp;
Expand All @@ -70,28 +69,23 @@ bool frame::safe_for_sender(JavaThread *thread) {

// An fp must be within the stack and above (but not equal) sp.
bool fp_safe = thread->is_in_stack_range_excl(fp, sp);
// An interpreter fp must be within the stack and above (but not equal) sp.
// Moreover, it must be at least the size of the ijava_state structure.
// An interpreter fp must be fp_safe.
// Moreover, it must be at a distance at least the size of the ijava_state structure.
bool fp_interp_safe = fp_safe && ((fp - sp) >= ijava_state_size);

// We know sp/unextended_sp are safe, only fp is questionable here

// If the current frame is known to the code cache then we can attempt to
// to construct the sender and do some validation of it. This goes a long way
// construct the sender and do some validation of it. This goes a long way
// toward eliminating issues when we get in frame construction code

if (_cb != NULL ){
// Entry frame checks
if (is_entry_frame()) {
// An entry frame must have a valid fp.
return fp_safe && is_entry_frame_valid(thread);
}

// Now check if the frame is complete and the test is
// reliable. Unfortunately we can only check frame completeness for
// runtime stubs and nmethods. Other generic buffer blobs are more
// problematic so we just assume they are OK. Adapter blobs never have a
// complete frame and are never OK
// First check if the frame is complete and the test is reliable.
// Unfortunately we can only check frame completeness for runtime stubs
// and nmethods. Other generic buffer blobs are more problematic
// so we just assume they are OK.
// Adapter blobs never have a complete frame and are never OK
if (!_cb->is_frame_complete_at(_pc)) {
if (_cb->is_compiled() || _cb->is_adapter_blob() || _cb->is_runtime_stub()) {
return false;
Expand All @@ -103,10 +97,23 @@ bool frame::safe_for_sender(JavaThread *thread) {
return false;
}

// Entry frame checks
if (is_entry_frame()) {
// An entry frame must have a valid fp.
return fp_safe && is_entry_frame_valid(thread);
}

if (is_interpreted_frame() && !fp_interp_safe) {
return false;
}

// At this point, there still is a chance that fp_safe is false.
// In particular, (fp == NULL) might be true. So let's check and
// bail out before we actually dereference from fp.
if (!fp_safe) {
return false;
}

abi_minframe* sender_abi = (abi_minframe*) fp;
intptr_t* sender_sp = (intptr_t*) fp;
address sender_pc = (address) sender_abi->lr;;
Expand Down
1 change: 0 additions & 1 deletion src/hotspot/cpu/ppc/globals_ppc.hpp
Expand Up @@ -58,7 +58,6 @@ define_pd_global(intx, StackReservedPages, DEFAULT_STACK_RESERVED_PAGES);
define_pd_global(uintx, CodeCacheSegmentSize, 128);
define_pd_global(intx, CodeEntryAlignment, 128);
define_pd_global(intx, OptoLoopAlignment, 16);
define_pd_global(intx, InlineFrequencyCount, 100);
define_pd_global(intx, InlineSmallCode, 1500);

// Flags for template interpreter.
Expand Down
37 changes: 22 additions & 15 deletions src/hotspot/cpu/s390/frame_s390.cpp
Expand Up @@ -55,7 +55,6 @@ void RegisterMap::check_location_valid() {
// Profiling/safepoint support

bool frame::safe_for_sender(JavaThread *thread) {
bool safe = false;
address sp = (address)_sp;
address fp = (address)_fp;
address unextended_sp = (address)_unextended_sp;
Expand All @@ -73,28 +72,23 @@ bool frame::safe_for_sender(JavaThread *thread) {

// An fp must be within the stack and above (but not equal) sp.
bool fp_safe = thread->is_in_stack_range_excl(fp, sp);
// An interpreter fp must be within the stack and above (but not equal) sp.
// Moreover, it must be at least the size of the z_ijava_state structure.
// An interpreter fp must be fp_safe.
// Moreover, it must be at a distance at least the size of the z_ijava_state structure.
bool fp_interp_safe = fp_safe && ((fp - sp) >= z_ijava_state_size);

// We know sp/unextended_sp are safe, only fp is questionable here

// If the current frame is known to the code cache then we can attempt to
// to construct the sender and do some validation of it. This goes a long way
// construct the sender and do some validation of it. This goes a long way
// toward eliminating issues when we get in frame construction code

if (_cb != NULL ) {
// Entry frame checks
if (is_entry_frame()) {
// An entry frame must have a valid fp.
return fp_safe && is_entry_frame_valid(thread);
}

// Now check if the frame is complete and the test is
// reliable. Unfortunately we can only check frame completeness for
// runtime stubs. Other generic buffer blobs are more
// problematic so we just assume they are OK. Adapter blobs never have a
// complete frame and are never OK. nmethods should be OK on s390.
// First check if the frame is complete and the test is reliable.
// Unfortunately we can only check frame completeness for runtime stubs.
// Other generic buffer blobs are more problematic so we just assume they are OK.
// Adapter blobs never have a complete frame and are never OK.
// nmethods should be OK on s390.
if (!_cb->is_frame_complete_at(_pc)) {
if (_cb->is_adapter_blob() || _cb->is_runtime_stub()) {
return false;
Expand All @@ -106,13 +100,26 @@ bool frame::safe_for_sender(JavaThread *thread) {
return false;
}

// Entry frame checks
if (is_entry_frame()) {
// An entry frame must have a valid fp.
return fp_safe && is_entry_frame_valid(thread);
}

if (is_interpreted_frame() && !fp_interp_safe) {
return false;
}

// At this point, there still is a chance that fp_safe is false.
// In particular, (fp == NULL) might be true. So let's check and
// bail out before we actually dereference from fp.
if (!fp_safe) {
return false;
}

z_abi_160* sender_abi = (z_abi_160*) fp;
intptr_t* sender_sp = (intptr_t*) sender_abi->callers_sp;
address sender_pc = (address) sender_abi->return_pc;
address sender_pc = (address) sender_abi->return_pc;

// We must always be able to find a recognizable pc.
CodeBlob* sender_blob = CodeCache::find_blob_unsafe(sender_pc);
Expand Down
1 change: 0 additions & 1 deletion src/hotspot/cpu/s390/globals_s390.hpp
Expand Up @@ -43,7 +43,6 @@ define_pd_global(uintx, CodeCacheSegmentSize, 256);
// code size significantly by padding nops between IVC and second UEP.
define_pd_global(intx, CodeEntryAlignment, 64);
define_pd_global(intx, OptoLoopAlignment, 2);
define_pd_global(intx, InlineFrequencyCount, 100);
define_pd_global(intx, InlineSmallCode, 2000);

#define DEFAULT_STACK_YELLOW_PAGES (2)
Expand Down
1 change: 0 additions & 1 deletion src/hotspot/cpu/x86/globals_x86.hpp
Expand Up @@ -49,7 +49,6 @@ define_pd_global(intx, CodeEntryAlignment, 32);
define_pd_global(intx, CodeEntryAlignment, 16);
#endif // COMPILER2_OR_JVMCI
define_pd_global(intx, OptoLoopAlignment, 16);
define_pd_global(intx, InlineFrequencyCount, 100);
define_pd_global(intx, InlineSmallCode, 1000);

#define DEFAULT_STACK_YELLOW_PAGES (NOT_WINDOWS(2) WINDOWS_ONLY(3))
Expand Down

0 comments on commit 79829ec

Please sign in to comment.