This commit is contained in:
J. Duke 2017-07-05 20:48:56 +02:00
commit 1b0eefb24d
21 changed files with 248 additions and 112 deletions

@ -323,3 +323,4 @@ d82072b699b880a1f647a5e2d7c0f86cec958941 jdk9-b76
8c40d4143ee13bdf8170c68cc384c36ab1e9fadb jdk9-b78
ba08a9f79b9849716bae1f39f71333d47f604012 jdk9-b79
f7c5ae2933c0b8510a420d1713a955e4ffc7ad0b jdk9-b80
b8afcf91331d78626a583ec1b63164468d6f4181 jdk9-b81

@ -4364,7 +4364,7 @@ VS_SDK_PLATFORM_NAME_2013=
#CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks:
DATE_WHEN_GENERATED=1435822080
DATE_WHEN_GENERATED=1441958217
###############################################################################
#
@ -38307,6 +38307,48 @@ $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
fi
fi
if test "x$OPENJDK_BUILD_OS" = xsolaris; then
# objcopy prior to 2.21.1 on solaris is broken and is not usable.
# Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
# - version number is last blank separate word on first line
# - version number formats that have been seen:
# - <major>.<minor>
# - <major>.<minor>.<micro>
OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
# The outer [ ] is to prevent m4 from eating the [] in the sed expression.
OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
-e 's/.* //' \
-e '/^[01]\./b bad' \
-e '/^2\./{' \
-e ' s/^2\.//' \
-e ' /^[0-9]$/b bad' \
-e ' /^[0-9]\./b bad' \
-e ' /^1[0-9]$/b bad' \
-e ' /^1[0-9]\./b bad' \
-e ' /^20\./b bad' \
-e ' /^21\.0$/b bad' \
-e ' /^21\.0\./b bad' \
-e '}' \
-e ':good' \
-e 's/.*/VALID_VERSION/p' \
-e 'q' \
-e ':bad' \
-e 's/.*/BAD_VERSION/p' \
-e 'q'`
if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
OBJCOPY=
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&5
$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
fi
fi
fi
fi

@ -30,25 +30,6 @@
# (called @OPENJDK_BUILD_AUTOCONF_NAME@ by autoconf)
# using 'configure @CONFIGURE_COMMAND_LINE@'
# When calling macros, the spaces between arguments are
# often semantically important! Sometimes we need to subst
# spaces and commas, therefore we need the following macros.
X:=
SPACE:=$(X) $(X)
COMMA:=,
DOLLAR:=$$
HASH:=\#
LEFT_PAREN:=(
RIGHT_PAREN:=)
SQUOTE:='
#'
DQUOTE:="
#"
define NEWLINE
endef
# The command line given to configure.
CONFIGURE_COMMAND_LINE:=@CONFIGURE_COMMAND_LINE@

@ -586,6 +586,43 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_EXTRA],
# Only call fixup if objcopy was found.
if test -n "$OBJCOPY"; then
BASIC_FIXUP_EXECUTABLE(OBJCOPY)
if test "x$OPENJDK_BUILD_OS" = xsolaris; then
# objcopy prior to 2.21.1 on solaris is broken and is not usable.
# Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
# - version number is last blank separate word on first line
# - version number formats that have been seen:
# - <major>.<minor>
# - <major>.<minor>.<micro>
OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
# The outer [ ] is to prevent m4 from eating the [] in the sed expression.
[ OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
-e 's/.* //' \
-e '/^[01]\./b bad' \
-e '/^2\./{' \
-e ' s/^2\.//' \
-e ' /^[0-9]$/b bad' \
-e ' /^[0-9]\./b bad' \
-e ' /^1[0-9]$/b bad' \
-e ' /^1[0-9]\./b bad' \
-e ' /^20\./b bad' \
-e ' /^21\.0$/b bad' \
-e ' /^21\.0\./b bad' \
-e '}' \
-e ':good' \
-e 's/.*/VALID_VERSION/p' \
-e 'q' \
-e ':bad' \
-e 's/.*/BAD_VERSION/p' \
-e 'q'` ]
if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
OBJCOPY=
AC_MSG_WARN([Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated.])
AC_MSG_NOTICE([objcopy reports version $OBJCOPY_VERSION])
AC_MSG_NOTICE([Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version])
AC_MSG_NOTICE([Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version])
AC_MSG_NOTICE([Note: Solaris 11 Update 1 contains the correct version])
fi
fi
fi
fi

@ -483,3 +483,4 @@ e66c3813789debfc06f206afde1bf7a84cb08451 jdk9-b77
20dc06b04fe5ec373879414d60ef82ac70faef98 jdk9-b78
e9e63d93bbfe2c6c23447e2c1f5cc71c98671cba jdk9-b79
8e8377739c06b99b9011c003c77e0bef84c91e09 jdk9-b80
4142c190cd5ca4fb70ec367b4f97ef936272d8ef jdk9-b81

@ -745,13 +745,12 @@ void CodeCache::gc_prologue() {
void CodeCache::gc_epilogue() {
assert_locked_or_safepoint(CodeCache_lock);
NMethodIterator iter;
while(iter.next()) {
nmethod* nm = iter.method();
if (!nm->is_zombie()) {
if (needs_cache_clean()) {
// Clean ICs of unloaded nmethods as well because they may reference other
// unloaded nmethods that may be flushed earlier in the sweeper cycle.
NOT_DEBUG(if (needs_cache_clean())) {
NMethodIterator iter;
while(iter.next_alive()) {
nmethod* nm = iter.method();
assert(!nm->is_unloaded(), "Tautology");
DEBUG_ONLY(if (needs_cache_clean())) {
nm->cleanup_inline_caches();
}
DEBUG_ONLY(nm->verify());

@ -287,6 +287,7 @@ bool CompiledIC::is_call_to_compiled() const {
assert( is_c1_method ||
!is_monomorphic ||
is_optimized() ||
!caller->is_alive() ||
(cached_metadata() != NULL && cached_metadata()->is_klass()), "sanity check");
#endif // ASSERT
return is_monomorphic;
@ -321,7 +322,7 @@ bool CompiledIC::is_call_to_interpreted() const {
}
void CompiledIC::set_to_clean() {
void CompiledIC::set_to_clean(bool in_use) {
assert(SafepointSynchronize::is_at_safepoint() || CompiledIC_lock->is_locked() , "MT-unsafe call");
if (TraceInlineCacheClearing || TraceICs) {
tty->print_cr("IC@" INTPTR_FORMAT ": set to clean", p2i(instruction_address()));
@ -337,7 +338,7 @@ void CompiledIC::set_to_clean() {
// A zombie transition will always be safe, since the metadata has already been set to NULL, so
// we only need to patch the destination
bool safe_transition = is_optimized() || SafepointSynchronize::is_at_safepoint();
bool safe_transition = !in_use || is_optimized() || SafepointSynchronize::is_at_safepoint();
if (safe_transition) {
// Kill any leftover stub we might have too

@ -214,7 +214,7 @@ class CompiledIC: public ResourceObj {
//
// They all takes a TRAP argument, since they can cause a GC if the inline-cache buffer is full.
//
void set_to_clean();
void set_to_clean(bool in_use = true);
void set_to_monomorphic(CompiledICInfo& info);
void clear_ic_stub();

@ -1050,7 +1050,7 @@ void nmethod::cleanup_inline_caches() {
if( cb != NULL && cb->is_nmethod() ) {
nmethod* nm = (nmethod*)cb;
// Clean inline caches pointing to zombie, non-entrant and unloaded methods
if (!nm->is_in_use() || (nm->method()->code() != nm)) ic->set_to_clean();
if (!nm->is_in_use() || (nm->method()->code() != nm)) ic->set_to_clean(is_alive());
}
break;
}
@ -1150,7 +1150,7 @@ void nmethod::mark_as_seen_on_stack() {
// Tell if a non-entrant method can be converted to a zombie (i.e.,
// there are no activations on the stack, not in use by the VM,
// and not in use by the ServiceThread)
bool nmethod::can_not_entrant_be_converted() {
bool nmethod::can_convert_to_zombie() {
assert(is_not_entrant(), "must be a non-entrant method");
// Since the nmethod sweeper only does partial sweep the sweeper's traversal

@ -577,7 +577,7 @@ public:
// See comment at definition of _last_seen_on_stack
void mark_as_seen_on_stack();
bool can_not_entrant_be_converted();
bool can_convert_to_zombie();
// Evolution support. We make old (discarded) compiled methods point to new Method*s.
void set_method(Method* method) { _method = method; }

@ -673,8 +673,7 @@ static void enqueue_cfg_uses(Node* m, Unique_Node_List& wq) {
Node* PhaseIdealLoop::try_move_store_before_loop(Node* n, Node *n_ctrl) {
// Store has to be first in the loop body
IdealLoopTree *n_loop = get_loop(n_ctrl);
if (n->is_Store() && n_loop != _ltree_root && n_loop->is_loop()) {
assert(n->in(0), "store should have control set");
if (n->is_Store() && n_loop != _ltree_root && n_loop->is_loop() && n->in(0) != NULL) {
Node* address = n->in(MemNode::Address);
Node* value = n->in(MemNode::ValueIn);
Node* mem = n->in(MemNode::Memory);
@ -748,8 +747,7 @@ Node* PhaseIdealLoop::try_move_store_before_loop(Node* n, Node *n_ctrl) {
// Try moving a store out of a loop, right after the loop
void PhaseIdealLoop::try_move_store_after_loop(Node* n) {
if (n->is_Store()) {
assert(n->in(0), "store should have control set");
if (n->is_Store() && n->in(0) != NULL) {
Node *n_ctrl = get_ctrl(n);
IdealLoopTree *n_loop = get_loop(n_ctrl);
// Store must be in a loop

@ -1576,51 +1576,58 @@ void PhaseStringOpts::replace_string_concat(StringConcat* sc) {
Node* result;
if (!kit.stopped()) {
// length now contains the number of characters needed for the
// char[] so create a new AllocateArray for the char[]
Node* char_array = NULL;
{
PreserveReexecuteState preexecs(&kit);
// The original jvms is for an allocation of either a String or
// StringBuffer so no stack adjustment is necessary for proper
// reexecution. If we deoptimize in the slow path the bytecode
// will be reexecuted and the char[] allocation will be thrown away.
kit.jvms()->set_should_reexecute(true);
char_array = kit.new_array(__ makecon(TypeKlassPtr::make(ciTypeArrayKlass::make(T_CHAR))),
length, 1);
}
if (sc->num_arguments() == 1 &&
(sc->mode(0) == StringConcat::StringMode ||
sc->mode(0) == StringConcat::StringNullCheckMode)) {
// Handle the case when there is only a single String argument.
// In this case, we can just pull the value from the String itself.
char_array = kit.load_String_value(kit.control(), sc->argument(0));
} else {
// length now contains the number of characters needed for the
// char[] so create a new AllocateArray for the char[]
{
PreserveReexecuteState preexecs(&kit);
// The original jvms is for an allocation of either a String or
// StringBuffer so no stack adjustment is necessary for proper
// reexecution. If we deoptimize in the slow path the bytecode
// will be reexecuted and the char[] allocation will be thrown away.
kit.jvms()->set_should_reexecute(true);
char_array = kit.new_array(__ makecon(TypeKlassPtr::make(ciTypeArrayKlass::make(T_CHAR))),
length, 1);
}
// Mark the allocation so that zeroing is skipped since the code
// below will overwrite the entire array
AllocateArrayNode* char_alloc = AllocateArrayNode::Ideal_array_allocation(char_array, _gvn);
char_alloc->maybe_set_complete(_gvn);
// Mark the allocation so that zeroing is skipped since the code
// below will overwrite the entire array
AllocateArrayNode* char_alloc = AllocateArrayNode::Ideal_array_allocation(char_array, _gvn);
char_alloc->maybe_set_complete(_gvn);
// Now copy the string representations into the final char[]
Node* start = __ intcon(0);
for (int argi = 0; argi < sc->num_arguments(); argi++) {
Node* arg = sc->argument(argi);
switch (sc->mode(argi)) {
case StringConcat::IntMode: {
Node* end = __ AddI(start, string_sizes->in(argi));
// getChars words backwards so pass the ending point as well as the start
int_getChars(kit, arg, char_array, start, end);
start = end;
break;
// Now copy the string representations into the final char[]
Node* start = __ intcon(0);
for (int argi = 0; argi < sc->num_arguments(); argi++) {
Node* arg = sc->argument(argi);
switch (sc->mode(argi)) {
case StringConcat::IntMode: {
Node* end = __ AddI(start, string_sizes->in(argi));
// getChars words backwards so pass the ending point as well as the start
int_getChars(kit, arg, char_array, start, end);
start = end;
break;
}
case StringConcat::StringNullCheckMode:
case StringConcat::StringMode: {
start = copy_string(kit, arg, char_array, start);
break;
}
case StringConcat::CharMode: {
__ store_to_memory(kit.control(), kit.array_element_address(char_array, start, T_CHAR),
arg, T_CHAR, char_adr_idx, MemNode::unordered);
start = __ AddI(start, __ intcon(1));
break;
}
default:
ShouldNotReachHere();
}
case StringConcat::StringNullCheckMode:
case StringConcat::StringMode: {
start = copy_string(kit, arg, char_array, start);
break;
}
case StringConcat::CharMode: {
__ store_to_memory(kit.control(), kit.array_element_address(char_array, start, T_CHAR),
arg, T_CHAR, char_adr_idx, MemNode::unordered);
start = __ AddI(start, __ intcon(1));
break;
}
default:
ShouldNotReachHere();
}
}

@ -611,7 +611,7 @@ NMethodSweeper::MethodStateChange NMethodSweeper::process_nmethod(nmethod* nm) {
} else if (nm->is_not_entrant()) {
// If there are no current activations of this method on the
// stack we can safely convert it to a zombie method
if (nm->can_not_entrant_be_converted()) {
if (nm->can_convert_to_zombie()) {
// Clear ICStubs to prevent back patching stubs of zombie or unloaded
// nmethods during the next safepoint (see ICStub::finalize).
{
@ -645,6 +645,12 @@ NMethodSweeper::MethodStateChange NMethodSweeper::process_nmethod(nmethod* nm) {
assert(result == None, "sanity");
result = Flushed;
} else {
{
// Clean ICs of unloaded nmethods as well because they may reference other
// unloaded nmethods that may be flushed earlier in the sweeper cycle.
MutexLocker cl(CompiledIC_lock);
nm->cleanup_inline_caches();
}
// Code cache state change is tracked in make_zombie()
nm->make_zombie();
SWEEP(nm);

@ -0,0 +1,49 @@
/*
* Copyright (c) 2015, 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.
*
* 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.
*/
/*
* @test
* @bug 8134288
* @summary Store nodes may not have a control if used to update profiling
* @run main/othervm -XX:-ProfileInterpreter -XX:-TieredCompilation -XX:-BackgroundCompilation TestMoveStoresOutOfLoopsStoreNoCtrl
*
*/
public class TestMoveStoresOutOfLoopsStoreNoCtrl {
static void test(boolean flag) {
for (int i = 0; i < 20000; i++) {
if (flag) {
int j = 0;
do {
j++;
} while(j < 10);
}
}
}
static public void main(String[] args) {
test(false);
}
}

@ -534,8 +534,7 @@ define SetupModuleCompilation
## Service types are required in the classpath when compiing module-info
$1_CLASSPATH := $$($1_CLASSPATH) $$(addprefix $(JDK_OUTPUTDIR)/modules/,jdk.hotspot.agent)
endif
$1_CLASSPATH := $$(subst $$(SPACE),$$(PATH_SEP),$$($1_CLASSPATH))
$1_JAVAC_FLAGS := -bootclasspath $(EMPTY_DIR) -extdirs $(EMPTY_DIR) -endorseddirs $(EMPTY_DIR) -classpath "$$($1_CLASSPATH)" $$($1_ADD_JAVAC_FLAGS)
$1_JAVAC_FLAGS := -bootclasspath $(EMPTY_DIR) -extdirs $(EMPTY_DIR) -endorseddirs $(EMPTY_DIR) $$($1_ADD_JAVAC_FLAGS)
$$(eval $$(call SetupJavaCompilation,$1, \
SETUP := $$(if $$($1_SETUP), $$($1_SETUP), GENERATE_JDKBYTECODE), \
@ -543,6 +542,7 @@ define SetupModuleCompilation
INCLUDES := $(JDK_USER_DEFINED_FILTER),\
BIN := $$(if $$($1_BIN), $$($1_BIN), $(JDK_OUTPUTDIR)/modules/$1), \
HEADERS := $(SUPPORT_OUTPUTDIR)/headers/$1, \
CLASSPATH := $$($1_CLASSPATH), \
ADD_JAVAC_FLAGS := $$($1_ADD_JAVAC_FLAGS) $$($1_JAVAC_FLAGS)))
$1: $$($1) $$($1_COPY_EXTRA)

@ -50,7 +50,7 @@ ifeq ($(HAS_SPEC),)
include $(topdir)/make/Help.gmk
# Targets provided by Init.gmk.
ALL_INIT_TARGETS := print-modules print-targets reconfigure
ALL_INIT_TARGETS := print-modules print-targets print-configuration reconfigure
# CALLED_TARGETS is the list of targets that the user provided,
# or "default" if unspecified.
@ -228,6 +228,9 @@ else # HAS_SPEC=true
$(MAKE) $(MAKE_ARGS) -j 1 -f make/Main.gmk $(USER_MAKE_VARS) \
NO_RECIPES=true print-targets )
print-configuration:
$(ECHO) $(CONFIGURE_COMMAND_LINE)
reconfigure:
ifneq ($(CONFIGURE_COMMAND_LINE), )
$(ECHO) "Re-running configure using arguments '$(CONFIGURE_COMMAND_LINE)'"

@ -403,6 +403,7 @@ endef
# SRC:=one or more directories to search for sources. The order of the source roots
# is significant. The first found file of a certain name has priority.
# BIN:=store classes here
# CLASSPATH:=a list of additional entries to set as classpath to javac
# INCLUDES:=myapp.foo means will only compile java files in myapp.foo or any of its sub-packages.
# EXCLUDES:=myapp.foo means will do not compile java files in myapp.foo or any of its sub-packages.
# COPY:=.prp means copy all prp files to the corresponding package in BIN.
@ -428,6 +429,9 @@ define SetupJavaCompilationBody
$1_JVM := $$($$($1_SETUP)_JVM)
$1_JAVAC := $$($$($1_SETUP)_JAVAC)
$1_FLAGS := $$($$($1_SETUP)_FLAGS) $(JAVAC_FLAGS) $$($1_ADD_JAVAC_FLAGS)
ifneq ($$($1_CLASSPATH), )
$1_FLAGS += -cp $$(call PathList, $$($1_CLASSPATH))
endif
ifeq ($$($1_JAVAC),)
$$(error The Java compilation $1 refers to a non-existant java compiler setup $$($1_SETUP))
endif
@ -482,7 +486,7 @@ define SetupJavaCompilationBody
$$(addprefix -i ,$$(addsuffix /*,$$($1_INCLUDES))) \
$$(addprefix -xf *,$$(strip $$($1_EXCLUDE_FILES) $$($1_SJAVAC_EXCLUDE_FILES))) \
$$(addprefix -if *,$$(strip $$($1_INCLUDE_FILES))) \
-src "$$(subst $$(SPACE),$$(PATH_SEP),$$(strip $$($1_SRC)))"
-src $$(call PathList, $$($1_SRC))
# All files below META-INF are always copied.
$1_ALL_COPIES := $$(filter $$(addsuffix /META-INF%,$$($1_SRC)),$$($1_ALL_SRCS))

@ -41,6 +41,29 @@ endif
# next make invocation.
.DELETE_ON_ERROR:
################################################################################
# Definitions for special characters
################################################################################
# When calling macros, the spaces between arguments are
# often semantically important! Sometimes we need to subst
# spaces and commas, therefore we need the following macros.
X:=
SPACE:=$(X) $(X)
COMMA:=,
DOLLAR:=$$
HASH:=\#
LEFT_PAREN:=(
RIGHT_PAREN:=)
SQUOTE:='
#'
DQUOTE:="
#"
define NEWLINE
endef
##############################
# Functions
##############################
@ -779,6 +802,14 @@ else
$(SUPPORT_OUTPUTDIR)/modules_libs/$(strip $1)
endif
################################################################################
# Return a string suitable for use after a -classpath option. It will correct and safe to use
# on all platforms. Arguments are given as space separate classpath entries.
# param 1 : A space separated list of classpath entries
# The surrounding strip is needed to keep additional whitespace out
PathList = \
"$(subst $(SPACE),$(PATH_SEP),$(strip $1))"
################################################################################
# Hook to include the corresponding custom file, if present.

@ -624,28 +624,7 @@ define SetupNativeCompilationBody
$1_DEBUGINFO_FILES := $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).pdb \
$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).map
else ifeq ($(OPENJDK_TARGET_OS), solaris)
$1_DEBUGINFO_FILES := $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).debuginfo
# Setup the command line creating debuginfo files, to be run after linking.
# It cannot be run separately since it updates the original target file
#
# gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
# Use $(FIX_EMPTY_SEC_HDR_FLAGS) to clear the SHF_ALLOC flag (if set) from
# empty section headers until a fixed $(OBJCOPY) is available.
# An empty section header has sh_addr == 0 and sh_size == 0.
# This problem has only been seen on Solaris X64, but we call this tool
# on all Solaris builds just in case.
#
# $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
# Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available.
$1_CREATE_DEBUGINFO_CMDS := \
$(FIX_EMPTY_SEC_HDR_FLAGS) $(LOG_INFO) $$($1_TARGET) $$(NEWLINE) \
$(OBJCOPY) --only-keep-debug $$($1_TARGET) $$($1_DEBUGINFO_FILES) $$(NEWLINE) \
$(CD) $$($1_OUTPUT_DIR) && \
$(ADD_GNU_DEBUGLINK) $(LOG_INFO) $$($1_DEBUGINFO_FILES) $$($1_TARGET)
$1_DEBUGINFO_EXTRA_DEPS := $(FIX_EMPTY_SEC_HDR_FLAGS) $(ADD_GNU_DEBUGLINK)
else ifeq ($(OPENJDK_TARGET_OS), linux)
else ifneq ($(findstring $(OPENJDK_TARGET_OS), linux solaris), )
$1_DEBUGINFO_FILES := $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).debuginfo
# Setup the command line creating debuginfo files, to be run after linking.
# It cannot be run separately since it updates the original target file
@ -653,7 +632,6 @@ define SetupNativeCompilationBody
$(OBJCOPY) --only-keep-debug $$($1_TARGET) $$($1_DEBUGINFO_FILES) $$(NEWLINE) \
$(CD) $$($1_OUTPUT_DIR) && \
$(OBJCOPY) --add-gnu-debuglink=$$($1_DEBUGINFO_FILES) $$($1_TARGET)
endif # No MacOS X support
# This dependency dance ensures that debug info files get rebuilt
@ -694,7 +672,7 @@ define SetupNativeCompilationBody
$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).vardeps)
$$($1_TARGET): $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_REAL_MAPFILE) \
$$($1_DEBUGINFO_EXTRA_DEPS) $$($1_VARDEPS_FILE)
$$($1_VARDEPS_FILE)
$(ECHO) $(LOG_INFO) "Linking $$($1_BASENAME)"
$(call LogFailures, $$($1_OBJECT_DIR)/$1_link.log, $1_link, \
$$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \
@ -735,7 +713,7 @@ define SetupNativeCompilationBody
$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).vardeps)
$$($1_TARGET): $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_MANIFEST) \
$$($1_DEBUGINFO_EXTRA_DEPS) $$($1_VARDEPS_FILE)
$$($1_VARDEPS_FILE)
$(ECHO) $(LOG_INFO) "Linking executable $$($1_BASENAME)"
$(call LogFailures, $$($1_OBJECT_DIR)/$1_link.log, $1_link, \
$$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \

@ -78,7 +78,7 @@ $(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE_NOWARNINGS, \
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
JDK_BOOTCLASSPATH := $(subst $(SPACE),$(PATH_SEP),\
JDK_BOOTCLASSPATH := $(call PathList, \
$(filter-out $(JDK_OUTPUTDIR)/modules/_%, $(wildcard $(JDK_OUTPUTDIR)/modules/*)))
# After the jdk is built, we want to build demos using only the recently
@ -88,7 +88,7 @@ JDK_BOOTCLASSPATH := $(subst $(SPACE),$(PATH_SEP),\
$(eval $(call SetupJavaCompiler,GENERATE_USINGJDKBYTECODE, \
JVM := $(JAVA_SMALL), \
JAVAC := $(NEW_JAVAC), \
FLAGS := -bootclasspath "$(JDK_BOOTCLASSPATH)" $(DISABLE_WARNINGS), \
FLAGS := -bootclasspath $(JDK_BOOTCLASSPATH) $(DISABLE_WARNINGS), \
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
SERVER_JVM := $(SJAVAC_SERVER_JAVA)))

@ -32,8 +32,6 @@ endif
include NativeCompilation.gmk
# FIXME: This is a bad fix currently needed due to JDK-8064808 not being resolved.
include $(JDK_TOPDIR)/make/Tools.gmk
# Setup make rules for creating a set of native test files (libraries or
# executables). This will locate native files matching a certain pattern,