Merge
This commit is contained in:
commit
e81038299e
@ -1166,7 +1166,9 @@ AC_DEFUN([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER],
|
||||
-I${TOPDIR}/src/java.base/$OPENJDK_$1_OS/native/include \
|
||||
-I${TOPDIR}/src/java.base/$OPENJDK_$1_OS_TYPE/native/include \
|
||||
-I${TOPDIR}/src/java.base/share/native/libjava \
|
||||
-I${TOPDIR}/src/java.base/$OPENJDK_$1_OS_TYPE/native/libjava"
|
||||
-I${TOPDIR}/src/java.base/$OPENJDK_$1_OS_TYPE/native/libjava \
|
||||
-I${TOPDIR}/src/hotspot/share/include \
|
||||
-I${TOPDIR}/src/hotspot/os/${HOTSPOT_$1_OS_TYPE}/include"
|
||||
|
||||
# The shared libraries are compiled using the picflag.
|
||||
$2CFLAGS_JDKLIB="[$]$2COMMON_CCXXFLAGS_JDK \
|
||||
|
@ -972,7 +972,6 @@ HOTSPOT_BUILD_CPU
|
||||
HOTSPOT_BUILD_OS_TYPE
|
||||
HOTSPOT_BUILD_OS
|
||||
OPENJDK_BUILD_BUNDLE_PLATFORM
|
||||
OPENJDK_BUILD_OS_EXPORT_DIR
|
||||
OPENJDK_BUILD_CPU_OSARCH
|
||||
OPENJDK_BUILD_CPU_ISADIR
|
||||
OPENJDK_BUILD_CPU_LEGACY_LIB
|
||||
@ -984,7 +983,6 @@ HOTSPOT_TARGET_OS_TYPE
|
||||
HOTSPOT_TARGET_OS
|
||||
DEFINE_CROSS_COMPILE_ARCH
|
||||
OPENJDK_TARGET_BUNDLE_PLATFORM
|
||||
OPENJDK_TARGET_OS_EXPORT_DIR
|
||||
OPENJDK_TARGET_CPU_OSARCH
|
||||
OPENJDK_TARGET_CPU_ISADIR
|
||||
OPENJDK_TARGET_CPU_LEGACY_LIB
|
||||
@ -5159,7 +5157,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=1512479382
|
||||
DATE_WHEN_GENERATED=1512638287
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
@ -16200,13 +16198,6 @@ $as_echo "$COMPILE_TYPE" >&6; }
|
||||
OPENJDK_TARGET_CPU_JLI="amd64"
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
OPENJDK_TARGET_OS_EXPORT_DIR=macosx
|
||||
else
|
||||
OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
|
||||
fi
|
||||
|
||||
|
||||
# The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
|
||||
# Macosx is osx and x86_64 is x64
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
@ -16358,13 +16349,6 @@ $as_echo "$COMPILE_TYPE" >&6; }
|
||||
OPENJDK_BUILD_CPU_JLI="amd64"
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS" = xmacosx; then
|
||||
OPENJDK_BUILD_OS_EXPORT_DIR=macosx
|
||||
else
|
||||
OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
|
||||
fi
|
||||
|
||||
|
||||
# The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
|
||||
# Macosx is osx and x86_64 is x64
|
||||
if test "x$OPENJDK_BUILD_OS" = xmacosx; then
|
||||
@ -52817,7 +52801,9 @@ fi
|
||||
-I${TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
|
||||
-I${TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
|
||||
-I${TOPDIR}/src/java.base/share/native/libjava \
|
||||
-I${TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
|
||||
-I${TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava \
|
||||
-I${TOPDIR}/src/hotspot/share/include \
|
||||
-I${TOPDIR}/src/hotspot/os/${HOTSPOT_TARGET_OS_TYPE}/include"
|
||||
|
||||
# The shared libraries are compiled using the picflag.
|
||||
CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
|
||||
@ -53698,7 +53684,9 @@ fi
|
||||
-I${TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
|
||||
-I${TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
|
||||
-I${TOPDIR}/src/java.base/share/native/libjava \
|
||||
-I${TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
|
||||
-I${TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava \
|
||||
-I${TOPDIR}/src/hotspot/share/include \
|
||||
-I${TOPDIR}/src/hotspot/os/${HOTSPOT_BUILD_OS_TYPE}/include"
|
||||
|
||||
# The shared libraries are compiled using the picflag.
|
||||
OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
|
||||
|
@ -388,13 +388,6 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS_HELPER],
|
||||
OPENJDK_$1_CPU_JLI="amd64"
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_$1_OS" = xmacosx; then
|
||||
OPENJDK_$1_OS_EXPORT_DIR=macosx
|
||||
else
|
||||
OPENJDK_$1_OS_EXPORT_DIR=${OPENJDK_$1_OS_TYPE}
|
||||
fi
|
||||
AC_SUBST(OPENJDK_$1_OS_EXPORT_DIR)
|
||||
|
||||
# The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
|
||||
# Macosx is osx and x86_64 is x64
|
||||
if test "x$OPENJDK_$1_OS" = xmacosx; then
|
||||
|
@ -78,7 +78,6 @@ OPENJDK_TARGET_CPU_ISADIR:=@OPENJDK_TARGET_CPU_ISADIR@
|
||||
OPENJDK_TARGET_CPU_LEGACY:=@OPENJDK_TARGET_CPU_LEGACY@
|
||||
OPENJDK_TARGET_CPU_LEGACY_LIB:=@OPENJDK_TARGET_CPU_LEGACY_LIB@
|
||||
OPENJDK_TARGET_CPU_OSARCH:=@OPENJDK_TARGET_CPU_OSARCH@
|
||||
OPENJDK_TARGET_OS_EXPORT_DIR:=@OPENJDK_TARGET_OS_EXPORT_DIR@
|
||||
|
||||
HOTSPOT_TARGET_OS := @HOTSPOT_TARGET_OS@
|
||||
HOTSPOT_TARGET_OS_TYPE := @HOTSPOT_TARGET_OS_TYPE@
|
||||
|
@ -27,24 +27,6 @@ include CopyCommon.gmk
|
||||
|
||||
$(eval $(call IncludeCustomExtension, copy/Copy-java.base.gmk))
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Copy exported header files to outputdir.
|
||||
#
|
||||
TARGETS += \
|
||||
$(INCLUDE_DST_DIR)/jni.h \
|
||||
$(INCLUDE_DST_DIR)/jvmticmlr.h \
|
||||
$(INCLUDE_DST_DIR)/classfile_constants.h \
|
||||
$(INCLUDE_DST_OS_DIR)/jni_md.h \
|
||||
#
|
||||
|
||||
$(INCLUDE_DST_DIR)/%.h: $(TOPDIR)/src/java.base/share/native/include/%.h
|
||||
$(call install-file)
|
||||
|
||||
$(INCLUDE_DST_OS_DIR)/%.h: \
|
||||
$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/include/%.h
|
||||
$(call install-file)
|
||||
|
||||
################################################################################
|
||||
|
||||
ifneq ($(findstring $(OPENJDK_TARGET_OS), windows aix),)
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2017, 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
|
||||
@ -29,20 +29,6 @@ $(eval $(call IncludeCustomExtension, copy/Copy-java.desktop.gmk))
|
||||
|
||||
################################################################################
|
||||
|
||||
TARGETS += \
|
||||
$(INCLUDE_DST_DIR)/jawt.h \
|
||||
$(INCLUDE_DST_OS_DIR)/jawt_md.h \
|
||||
#
|
||||
|
||||
$(INCLUDE_DST_DIR)/%.h: $(TOPDIR)/src/java.desktop/share/native/include/%.h
|
||||
$(call install-file)
|
||||
|
||||
$(INCLUDE_DST_OS_DIR)/%.h: \
|
||||
$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_EXPORT_DIR)/native/include/%.h
|
||||
$(call install-file)
|
||||
|
||||
################################################################################
|
||||
|
||||
ifneq ($(FREETYPE_BUNDLE_LIB_PATH), )
|
||||
# We need to bundle the freetype library, so it will be available at runtime
|
||||
# as well as link time.
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2104, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2017, 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
|
||||
@ -23,19 +23,7 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
################################################################################
|
||||
# Include CopyCommon.gmk to get exported header files to be properly copied.
|
||||
|
||||
include CopyCommon.gmk
|
||||
|
||||
################################################################################
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
TARGETS += $(INCLUDE_DST_OS_DIR)/bridge/AccessBridgeCallbacks.h \
|
||||
$(INCLUDE_DST_OS_DIR)/bridge/AccessBridgeCalls.h \
|
||||
$(INCLUDE_DST_OS_DIR)/bridge/AccessBridgePackages.h
|
||||
|
||||
$(INCLUDE_DST_OS_DIR)/bridge/%: \
|
||||
$(TOPDIR)/src/jdk.accessibility/windows/native/include/bridge/%
|
||||
$(install-file)
|
||||
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2017, 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
|
||||
@ -23,13 +23,7 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
################################################################################
|
||||
# Include CopyCommon.gmk to get exported header files to be properly copied.
|
||||
|
||||
include CopyCommon.gmk
|
||||
|
||||
################################################################################
|
||||
|
||||
TARGETS := $(INCLUDE_DST_DIR)/jdwpTransport.h
|
||||
|
||||
$(INCLUDE_DST_DIR)/%.h: $(TOPDIR)/src/jdk.jdwp.agent/share/native/include/%.h
|
||||
$(call install-file)
|
||||
|
||||
################################################################################
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2017, 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
|
||||
@ -23,15 +23,48 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
INCLUDE_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_include/$(MODULE)
|
||||
LIB_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)
|
||||
CONF_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_conf/$(MODULE)
|
||||
LEGAL_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_legal/$(MODULE)
|
||||
|
||||
INCLUDE_DST_OS_DIR := $(INCLUDE_DST_DIR)/$(OPENJDK_TARGET_OS)
|
||||
################################################################################
|
||||
#
|
||||
# Copy exported include headers files to output directory, if present.
|
||||
#
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
INCLUDE_DST_OS_DIR := $(INCLUDE_DST_DIR)/win32
|
||||
else ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
INCLUDE_DST_OS_DIR := $(INCLUDE_DST_DIR)/darwin
|
||||
INCLUDE_TARGET_DIR := $(SUPPORT_OUTPUTDIR)/modules_include/$(MODULE)
|
||||
INCLUDE_SOURCE_DIR := $(TOPDIR)/src/$(MODULE)/share/native/include
|
||||
|
||||
ifneq ($(wildcard $(INCLUDE_SOURCE_DIR)/*), )
|
||||
$(eval $(call SetupCopyFiles, COPY_EXPORTED_INCLUDE, \
|
||||
SRC := $(INCLUDE_SOURCE_DIR), \
|
||||
DEST := $(INCLUDE_TARGET_DIR), \
|
||||
FILES := $(shell $(FIND) $(INCLUDE_SOURCE_DIR) -type f), \
|
||||
))
|
||||
|
||||
TARGETS += $(COPY_EXPORTED_INCLUDE)
|
||||
endif
|
||||
|
||||
# For historical reasons, the OS include directories have odd names.
|
||||
INCLUDE_TARGET_OS_SUBDIR := $(OPENJDK_TARGET_OS)
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
INCLUDE_TARGET_OS_SUBDIR := win32
|
||||
else ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
INCLUDE_TARGET_OS_SUBDIR := darwin
|
||||
endif
|
||||
|
||||
# Use the most specific of OS and OS_TYPE.
|
||||
INCLUDE_SOURCE_OS_DIR := $(TOPDIR)/src/$(MODULE)/$(OPENJDK_TARGET_OS)/native/include
|
||||
ifeq ($(wildcard $(INCLUDE_SOURCE_OS_DIR)/*), )
|
||||
INCLUDE_SOURCE_OS_DIR := $(TOPDIR)/src/$(MODULE)/$(OPENJDK_TARGET_OS_TYPE)/native/include
|
||||
endif
|
||||
|
||||
ifneq ($(wildcard $(INCLUDE_SOURCE_OS_DIR)/*), )
|
||||
$(eval $(call SetupCopyFiles, COPY_EXPORTED_INCLUDE_OS, \
|
||||
SRC := $(INCLUDE_SOURCE_OS_DIR), \
|
||||
DEST := $(INCLUDE_TARGET_DIR)/$(INCLUDE_TARGET_OS_SUBDIR), \
|
||||
FILES := $(shell $(FIND) $(INCLUDE_SOURCE_OS_DIR) -type f), \
|
||||
))
|
||||
|
||||
TARGETS += $(COPY_EXPORTED_INCLUDE_OS)
|
||||
endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2012, 2017, 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
|
||||
@ -92,8 +92,10 @@ ifneq ($(COMPILE_TYPE), cross)
|
||||
endif
|
||||
|
||||
SIZER_CFLAGS := \
|
||||
-I${TOPDIR}/src/hotspot/share/include \
|
||||
-I${TOPDIR}/src/hotspot/os/$(HOTSPOT_TARGET_OS_TYPE)/include \
|
||||
-I$(TOPDIR)/src/java.base/share/native/include \
|
||||
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_EXPORT_DIR)/native/include \
|
||||
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/include \
|
||||
-I$(TOPDIR)/src/java.base/share/native/libjava \
|
||||
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjava \
|
||||
-I$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/awt \
|
||||
|
@ -57,9 +57,10 @@ JVM_CFLAGS_INCLUDES += \
|
||||
$(patsubst %,-I%,$(filter-out $(JVM_VARIANT_OUTPUTDIR)/gensrc/%, $(JVM_SRC_DIRS))) \
|
||||
-I$(JVM_VARIANT_OUTPUTDIR)/gensrc \
|
||||
-I$(TOPDIR)/src/hotspot/share/precompiled \
|
||||
-I$(TOPDIR)/src/hotspot/share/include \
|
||||
-I$(TOPDIR)/src/hotspot/os/$(HOTSPOT_TARGET_OS_TYPE)/include \
|
||||
-I$(TOPDIR)/src/java.base/share/native/include \
|
||||
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/include \
|
||||
-I$(TOPDIR)/src/java.management/share/native/include \
|
||||
-I$(TOPDIR)/src/java.base/share/native/libjimage \
|
||||
#
|
||||
|
||||
|
@ -57,7 +57,7 @@ ifneq ($(OPENJDK_TARGET_OS), windows)
|
||||
endif
|
||||
|
||||
else ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
LIBJSIG_CFLAGS := -m64 -KPIC -mt -I $(TOPDIR)/src/java.base/unix/native/include
|
||||
LIBJSIG_CFLAGS := -m64 -KPIC -mt -I $(TOPDIR)/src/hotspot/os/$(HOTSPOT_TARGET_OS_TYPE)/include
|
||||
LIBJSIG_LDFLAGS := -m64 -mt -xnolib
|
||||
LIBJSIG_LIBS := $(LIBDL)
|
||||
|
||||
|
@ -177,6 +177,7 @@ jprt.make.rule.test.targets=${my.make.rule.test.targets.${jprt.test.set}}
|
||||
|
||||
# Not all test targets need the test image
|
||||
jprt.test.bundle.targets=\
|
||||
${my.make.rule.test.targets.svc}, \
|
||||
${my.make.rule.test.targets.hotspot.reg}, \
|
||||
${my.make.rule.test.targets.hotspot.gtest} \
|
||||
${my.make.rule.test.targets.nativesanity} \
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2017, 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
|
||||
@ -30,8 +30,8 @@ $(eval $(call IncludeCustomExtension, lib/Lib-java.management.gmk))
|
||||
|
||||
################################################################################
|
||||
|
||||
LIBMANAGEMENT_SRC += $(TOPDIR)/src/java.management/share/native/libmanagement
|
||||
LIBMANAGEMENT_CFLAGS := -I$(TOPDIR)/src/java.management/share/native/include \
|
||||
LIBMANAGEMENT_SRC += $(TOPDIR)/src/java.management/share/native/libmanagement
|
||||
LIBMANAGEMENT_CFLAGS := -I$(TOPDIR)/src/hotspot/share/include \
|
||||
$(addprefix -I,$(LIBMANAGEMENT_SRC)) \
|
||||
-I$(SUPPORT_OUTPUTDIR)/headers/java.management \
|
||||
$(LIBJAVA_HEADER_FLAGS) \
|
||||
|
@ -5157,8 +5157,8 @@ class StubGenerator: public StubCodeGenerator {
|
||||
const Register gxp = G1; // Need to use global registers across RWs.
|
||||
const Register gyp = G2;
|
||||
const Register gzp = G3;
|
||||
const Register offs = G4;
|
||||
const Register disp = G5;
|
||||
const Register disp = G4;
|
||||
const Register offs = G5;
|
||||
|
||||
__ mov(xptr, gxp);
|
||||
__ mov(yptr, gyp);
|
||||
@ -5569,8 +5569,8 @@ class StubGenerator: public StubCodeGenerator {
|
||||
// for (int i = xn; i >= 0; i--)
|
||||
__ bind(L_loop_i);
|
||||
|
||||
__ cmp_and_br_short(xpc, xp,// i >= 0
|
||||
Assembler::less, Assembler::pn, L_exit_loop_i);
|
||||
__ cmp_and_brx_short(xpc, xp,// i >= 0
|
||||
Assembler::lessUnsigned, Assembler::pn, L_exit_loop_i);
|
||||
__ lduw(xpc, 0, rt); // u64 x = xp[i]
|
||||
__ lduw(xpc, 4, rx); // ...
|
||||
__ sllx(rt, 32, rt);
|
||||
@ -5598,8 +5598,8 @@ class StubGenerator: public StubCodeGenerator {
|
||||
|
||||
__ bind(L_loop_j);
|
||||
|
||||
__ cmp_and_br_short(ypc, yp,// j >= 0
|
||||
Assembler::less, Assembler::pn, L_exit);
|
||||
__ cmp_and_brx_short(ypc, yp,// j >= 0
|
||||
Assembler::lessUnsigned, Assembler::pn, L_exit);
|
||||
__ clr(rc); // u64 c = 0
|
||||
__ lduw(ypc, 0, rt); // u64 y = yp[j] (= *ypc)
|
||||
__ lduw(ypc, 4, ry); // ...
|
||||
@ -5615,8 +5615,8 @@ class StubGenerator: public StubCodeGenerator {
|
||||
|
||||
__ bind(L_loop_i2);
|
||||
|
||||
__ cmp_and_br_short(xpc, xp,// i >= 0
|
||||
Assembler::less, Assembler::pn, L_exit_loop_i2);
|
||||
__ cmp_and_brx_short(xpc, xp,// i >= 0
|
||||
Assembler::lessUnsigned, Assembler::pn, L_exit_loop_i2);
|
||||
__ lduw(xpc, 0, rt); // u64 x = xp[i] (= *xpc)
|
||||
__ lduw(xpc, 4, rx); // ...
|
||||
__ sllx(rt, 32, rt);
|
||||
|
@ -7449,6 +7449,27 @@ void Assembler::blendvpd(XMMRegister dst, XMMRegister nds, XMMRegister src1, XMM
|
||||
emit_int8((unsigned char)(0xF0 & src2_enc<<4));
|
||||
}
|
||||
|
||||
void Assembler::cmpps(XMMRegister dst, XMMRegister nds, XMMRegister src, int cop, int vector_len) {
|
||||
assert(VM_Version::supports_avx(), "");
|
||||
assert(!VM_Version::supports_evex(), "");
|
||||
InstructionAttr attributes(vector_len, /* vex_w */ false, /* legacy_mode */ true, /* no_mask_reg */ false, /* uses_vl */ false);
|
||||
int encode = simd_prefix_and_encode(dst, nds, src, VEX_SIMD_NONE, VEX_OPCODE_0F, &attributes);
|
||||
emit_int8((unsigned char)0xC2);
|
||||
emit_int8((unsigned char)(0xC0 | encode));
|
||||
emit_int8((unsigned char)(0xF & cop));
|
||||
}
|
||||
|
||||
void Assembler::blendvps(XMMRegister dst, XMMRegister nds, XMMRegister src1, XMMRegister src2, int vector_len) {
|
||||
assert(VM_Version::supports_avx(), "");
|
||||
assert(!VM_Version::supports_evex(), "");
|
||||
InstructionAttr attributes(vector_len, /* vex_w */ false, /* legacy_mode */ true, /* no_mask_reg */ false, /* uses_vl */ false);
|
||||
int encode = vex_prefix_and_encode(dst->encoding(), nds->encoding(), src1->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_3A, &attributes);
|
||||
emit_int8((unsigned char)0x4A);
|
||||
emit_int8((unsigned char)(0xC0 | encode));
|
||||
int src2_enc = src2->encoding();
|
||||
emit_int8((unsigned char)(0xF0 & src2_enc<<4));
|
||||
}
|
||||
|
||||
void Assembler::vpblendd(XMMRegister dst, XMMRegister nds, XMMRegister src, int imm8, int vector_len) {
|
||||
assert(VM_Version::supports_avx2(), "");
|
||||
InstructionAttr attributes(vector_len, /* vex_w */ false, /* legacy_mode */ true, /* no_mask_reg */ false, /* uses_vl */ false);
|
||||
|
@ -2114,9 +2114,11 @@ private:
|
||||
// runtime code and native libraries.
|
||||
void vzeroupper();
|
||||
|
||||
// AVX support for vectorized conditional move (double). The following two instructions used only coupled.
|
||||
// AVX support for vectorized conditional move (float/double). The following two instructions used only coupled.
|
||||
void cmppd(XMMRegister dst, XMMRegister nds, XMMRegister src, int cop, int vector_len);
|
||||
void blendvpd(XMMRegister dst, XMMRegister nds, XMMRegister src1, XMMRegister src2, int vector_len);
|
||||
void cmpps(XMMRegister dst, XMMRegister nds, XMMRegister src, int cop, int vector_len);
|
||||
void blendvps(XMMRegister dst, XMMRegister nds, XMMRegister src1, XMMRegister src2, int vector_len);
|
||||
void vpblendd(XMMRegister dst, XMMRegister nds, XMMRegister src, int imm8, int vector_len);
|
||||
|
||||
protected:
|
||||
|
@ -1263,6 +1263,7 @@ const bool Matcher::match_rule_supported(int opcode) {
|
||||
if (!VM_Version::supports_cx8())
|
||||
ret_value = false;
|
||||
break;
|
||||
case Op_CMoveVF:
|
||||
case Op_CMoveVD:
|
||||
if (UseAVX < 1 || UseAVX > 2)
|
||||
ret_value = false;
|
||||
@ -1304,6 +1305,9 @@ const bool Matcher::match_rule_supported_vector(int opcode, int vlen) {
|
||||
if ((vlen == 32) && (VM_Version::supports_avx512bw() == false))
|
||||
ret_value = false;
|
||||
break;
|
||||
case Op_CMoveVF:
|
||||
if (vlen != 8)
|
||||
ret_value = false;
|
||||
case Op_CMoveVD:
|
||||
if (vlen != 4)
|
||||
ret_value = false;
|
||||
@ -8170,6 +8174,22 @@ instruct vmul8D_mem(vecZ dst, vecZ src, memory mem) %{
|
||||
ins_pipe( pipe_slow );
|
||||
%}
|
||||
|
||||
instruct vcmov8F_reg(vecY dst, vecY src1, vecY src2, immI8 cop, cmpOp_vcmppd copnd) %{
|
||||
predicate(UseAVX > 0 && UseAVX < 3 && n->as_Vector()->length() == 8);
|
||||
match(Set dst (CMoveVF (Binary copnd cop) (Binary src1 src2)));
|
||||
effect(TEMP dst, USE src1, USE src2);
|
||||
format %{ "cmpps.$copnd $dst, $src1, $src2 ! vcmovevf, cond=$cop\n\t"
|
||||
"blendvps $dst,$src1,$src2,$dst ! vcmovevf\n\t"
|
||||
%}
|
||||
ins_encode %{
|
||||
int vector_len = 1;
|
||||
int cond = (Assembler::Condition)($copnd$$cmpcode);
|
||||
__ cmpps($dst$$XMMRegister, $src1$$XMMRegister, $src2$$XMMRegister, cond, vector_len);
|
||||
__ blendvps($dst$$XMMRegister, $src1$$XMMRegister, $src2$$XMMRegister, $dst$$XMMRegister, vector_len);
|
||||
%}
|
||||
ins_pipe( pipe_slow );
|
||||
%}
|
||||
|
||||
instruct vcmov4D_reg(vecY dst, vecY src1, vecY src2, immI8 cop, cmpOp_vcmppd copnd) %{
|
||||
predicate(UseAVX > 0 && UseAVX < 3 && n->as_Vector()->length() == 4);
|
||||
match(Set dst (CMoveVD (Binary copnd cop) (Binary src1 src2)));
|
||||
|
@ -243,8 +243,9 @@ char* os::map_memory_to_file(char* base, size_t size, int fd) {
|
||||
assert(fd != -1, "File descriptor is not valid");
|
||||
|
||||
// allocate space for the file
|
||||
if (util_posix_fallocate(fd, 0, (off_t)size) != 0) {
|
||||
vm_exit_during_initialization(err_msg("Error in mapping Java heap at the given filesystem directory."));
|
||||
int ret = util_posix_fallocate(fd, 0, (off_t)size);
|
||||
if (ret != 0) {
|
||||
vm_exit_during_initialization(err_msg("Error in mapping Java heap at the given filesystem directory. error(%d)", ret));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -256,12 +257,13 @@ char* os::map_memory_to_file(char* base, size_t size, int fd) {
|
||||
char* addr = (char*)mmap(base, size, prot, flags, fd, 0);
|
||||
|
||||
if (addr == MAP_FAILED) {
|
||||
warning("Failed mmap to file. (%s)", os::strerror(errno));
|
||||
return NULL;
|
||||
}
|
||||
if (base != NULL && addr != base) {
|
||||
if (!os::release_memory(addr, size)) {
|
||||
warning("Could not release memory on unsuccessful file mapping");
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
return addr;
|
||||
|
@ -4164,7 +4164,7 @@ bool MatchRule::is_vector() const {
|
||||
"AddVB","AddVS","AddVI","AddVL","AddVF","AddVD",
|
||||
"SubVB","SubVS","SubVI","SubVL","SubVF","SubVD",
|
||||
"MulVS","MulVI","MulVL","MulVF","MulVD",
|
||||
"CMoveVD",
|
||||
"CMoveVD", "CMoveVF",
|
||||
"DivVF","DivVD",
|
||||
"AbsVF","AbsVD",
|
||||
"NegVF","NegVD",
|
||||
|
@ -1439,6 +1439,9 @@ void GraphBuilder::call_register_finalizer() {
|
||||
}
|
||||
|
||||
if (needs_check) {
|
||||
// Not a trivial method because C2 can do better with inlined check.
|
||||
compilation()->set_would_profile(true);
|
||||
|
||||
// Perform the registration of finalizable objects.
|
||||
ValueStack* state_before = copy_state_for_exception();
|
||||
load_local(objectType, 0);
|
||||
@ -3556,6 +3559,9 @@ void GraphBuilder::build_graph_for_intrinsic(ciMethod* callee, bool ignore_retur
|
||||
}
|
||||
|
||||
bool GraphBuilder::try_inline_intrinsics(ciMethod* callee, bool ignore_return) {
|
||||
// Not a trivial method because C2 may do intrinsics better.
|
||||
compilation()->set_would_profile(true);
|
||||
|
||||
// For calling is_intrinsic_available we need to transition to
|
||||
// the '_thread_in_vm' state because is_intrinsic_available()
|
||||
// accesses critical VM-internal data.
|
||||
|
@ -899,64 +899,18 @@ bool ciEnv::system_dictionary_modification_counter_changed() {
|
||||
void ciEnv::validate_compile_task_dependencies(ciMethod* target) {
|
||||
if (failing()) return; // no need for further checks
|
||||
|
||||
// First, check non-klass dependencies as we might return early and
|
||||
// not check klass dependencies if the system dictionary
|
||||
// modification counter hasn't changed (see below).
|
||||
for (Dependencies::DepStream deps(dependencies()); deps.next(); ) {
|
||||
if (deps.is_klass_type()) continue; // skip klass dependencies
|
||||
Klass* witness = deps.check_dependency();
|
||||
if (witness != NULL) {
|
||||
if (deps.type() == Dependencies::call_site_target_value) {
|
||||
_inc_decompile_count_on_failure = false;
|
||||
record_failure("call site target change");
|
||||
} else {
|
||||
record_failure("invalid non-klass dependency");
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Klass dependencies must be checked when the system dictionary
|
||||
// changes. If logging is enabled all violated dependences will be
|
||||
// recorded in the log. In debug mode check dependencies even if
|
||||
// the system dictionary hasn't changed to verify that no invalid
|
||||
// dependencies were inserted. Any violated dependences in this
|
||||
// case are dumped to the tty.
|
||||
bool counter_changed = system_dictionary_modification_counter_changed();
|
||||
|
||||
bool verify_deps = trueInDebug;
|
||||
if (!counter_changed && !verify_deps) return;
|
||||
|
||||
int klass_violations = 0;
|
||||
for (Dependencies::DepStream deps(dependencies()); deps.next(); ) {
|
||||
if (!deps.is_klass_type()) continue; // skip non-klass dependencies
|
||||
Klass* witness = deps.check_dependency();
|
||||
if (witness != NULL) {
|
||||
klass_violations++;
|
||||
if (!counter_changed) {
|
||||
// Dependence failed but counter didn't change. Log a message
|
||||
// describing what failed and allow the assert at the end to
|
||||
// trigger.
|
||||
deps.print_dependency(witness);
|
||||
} else if (xtty == NULL) {
|
||||
// If we're not logging then a single violation is sufficient,
|
||||
// otherwise we want to log all the dependences which were
|
||||
// violated.
|
||||
break;
|
||||
}
|
||||
Dependencies::DepType result = dependencies()->validate_dependencies(_task, counter_changed);
|
||||
if (result != Dependencies::end_marker) {
|
||||
if (result == Dependencies::call_site_target_value) {
|
||||
_inc_decompile_count_on_failure = false;
|
||||
record_failure("call site target change");
|
||||
} else if (Dependencies::is_klass_type(result)) {
|
||||
record_failure("invalid non-klass dependency");
|
||||
} else {
|
||||
record_failure("concurrent class loading");
|
||||
}
|
||||
}
|
||||
|
||||
if (klass_violations != 0) {
|
||||
#ifdef ASSERT
|
||||
if (!counter_changed && !PrintCompilation) {
|
||||
// Print out the compile task that failed
|
||||
_task->print_tty();
|
||||
}
|
||||
#endif
|
||||
assert(counter_changed, "failed dependencies, but counter didn't change");
|
||||
record_failure("concurrent class loading");
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
@ -30,6 +30,8 @@
|
||||
#include "classfile/javaClasses.inline.hpp"
|
||||
#include "code/dependencies.hpp"
|
||||
#include "compiler/compileLog.hpp"
|
||||
#include "compiler/compileBroker.hpp"
|
||||
#include "compiler/compileTask.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "oops/objArrayKlass.hpp"
|
||||
@ -620,6 +622,72 @@ void Dependencies::check_valid_dependency_type(DepType dept) {
|
||||
guarantee(FIRST_TYPE <= dept && dept < TYPE_LIMIT, "invalid dependency type: %d", (int) dept);
|
||||
}
|
||||
|
||||
Dependencies::DepType Dependencies::validate_dependencies(CompileTask* task, bool counter_changed, char** failure_detail) {
|
||||
// First, check non-klass dependencies as we might return early and
|
||||
// not check klass dependencies if the system dictionary
|
||||
// modification counter hasn't changed (see below).
|
||||
for (Dependencies::DepStream deps(this); deps.next(); ) {
|
||||
if (deps.is_klass_type()) continue; // skip klass dependencies
|
||||
Klass* witness = deps.check_dependency();
|
||||
if (witness != NULL) {
|
||||
return deps.type();
|
||||
}
|
||||
}
|
||||
|
||||
// Klass dependencies must be checked when the system dictionary
|
||||
// changes. If logging is enabled all violated dependences will be
|
||||
// recorded in the log. In debug mode check dependencies even if
|
||||
// the system dictionary hasn't changed to verify that no invalid
|
||||
// dependencies were inserted. Any violated dependences in this
|
||||
// case are dumped to the tty.
|
||||
if (!counter_changed && !trueInDebug) {
|
||||
return end_marker;
|
||||
}
|
||||
|
||||
int klass_violations = 0;
|
||||
DepType result = end_marker;
|
||||
for (Dependencies::DepStream deps(this); deps.next(); ) {
|
||||
if (!deps.is_klass_type()) continue; // skip non-klass dependencies
|
||||
Klass* witness = deps.check_dependency();
|
||||
if (witness != NULL) {
|
||||
if (klass_violations == 0) {
|
||||
result = deps.type();
|
||||
if (failure_detail != NULL && klass_violations == 0) {
|
||||
// Use a fixed size buffer to prevent the string stream from
|
||||
// resizing in the context of an inner resource mark.
|
||||
char* buffer = NEW_RESOURCE_ARRAY(char, O_BUFLEN);
|
||||
stringStream st(buffer, O_BUFLEN);
|
||||
deps.print_dependency(witness, true, &st);
|
||||
*failure_detail = st.as_string();
|
||||
}
|
||||
}
|
||||
klass_violations++;
|
||||
if (!counter_changed) {
|
||||
// Dependence failed but counter didn't change. Log a message
|
||||
// describing what failed and allow the assert at the end to
|
||||
// trigger.
|
||||
deps.print_dependency(witness);
|
||||
} else if (xtty == NULL) {
|
||||
// If we're not logging then a single violation is sufficient,
|
||||
// otherwise we want to log all the dependences which were
|
||||
// violated.
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (klass_violations != 0) {
|
||||
#ifdef ASSERT
|
||||
if (task != NULL && !counter_changed && !PrintCompilation) {
|
||||
// Print out the compile task that failed
|
||||
task->print_tty();
|
||||
}
|
||||
#endif
|
||||
assert(counter_changed, "failed dependencies, but counter didn't change");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
// for the sake of the compiler log, print out current dependencies:
|
||||
void Dependencies::log_all_dependencies() {
|
||||
if (log() == NULL) return;
|
||||
|
@ -457,6 +457,8 @@ class Dependencies: public ResourceObj {
|
||||
|
||||
void copy_to(nmethod* nm);
|
||||
|
||||
DepType validate_dependencies(CompileTask* task, bool counter_changed, char** failure_detail = NULL);
|
||||
|
||||
void log_all_dependencies();
|
||||
|
||||
void log_dependency(DepType dept, GrowableArray<ciBaseObject*>* args) {
|
||||
|
@ -98,9 +98,9 @@ void G1Arguments::initialize_flags() {
|
||||
// Enable loop strip mining to offer better pause time guarantees
|
||||
if (FLAG_IS_DEFAULT(UseCountedLoopSafepoints)) {
|
||||
FLAG_SET_DEFAULT(UseCountedLoopSafepoints, true);
|
||||
}
|
||||
if (UseCountedLoopSafepoints && FLAG_IS_DEFAULT(LoopStripMiningIter)) {
|
||||
FLAG_SET_DEFAULT(LoopStripMiningIter, 1000);
|
||||
if (FLAG_IS_DEFAULT(LoopStripMiningIter)) {
|
||||
FLAG_SET_DEFAULT(LoopStripMiningIter, 1000);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -410,8 +410,8 @@ methodHandle JVMCIEnv::get_method_by_index(const constantPoolHandle& cpool,
|
||||
// ------------------------------------------------------------------
|
||||
// Check for changes to the system dictionary during compilation
|
||||
// class loads, evolution, breakpoints
|
||||
JVMCIEnv::CodeInstallResult JVMCIEnv::check_for_system_dictionary_modification(Dependencies* dependencies, Handle compiled_code,
|
||||
JVMCIEnv* env, char** failure_detail) {
|
||||
JVMCIEnv::CodeInstallResult JVMCIEnv::validate_compile_task_dependencies(Dependencies* dependencies, Handle compiled_code,
|
||||
JVMCIEnv* env, char** failure_detail) {
|
||||
// If JVMTI capabilities were enabled during compile, the compilation is invalidated.
|
||||
if (env != NULL) {
|
||||
if (!env->_jvmti_can_hotswap_or_post_breakpoint && JvmtiExport::can_hotswap_or_post_breakpoint()) {
|
||||
@ -422,37 +422,20 @@ JVMCIEnv::CodeInstallResult JVMCIEnv::check_for_system_dictionary_modification(D
|
||||
|
||||
// Dependencies must be checked when the system dictionary changes
|
||||
// or if we don't know whether it has changed (i.e., env == NULL).
|
||||
// In debug mode, always check dependencies.
|
||||
bool counter_changed = env != NULL && env->_system_dictionary_modification_counter != SystemDictionary::number_of_modifications();
|
||||
bool verify_deps = env == NULL || trueInDebug || JavaAssertions::enabled(SystemDictionary::HotSpotInstalledCode_klass()->name()->as_C_string(), true);
|
||||
if (!counter_changed && !verify_deps) {
|
||||
bool counter_changed = env == NULL || env->_system_dictionary_modification_counter != SystemDictionary::number_of_modifications();
|
||||
CompileTask* task = env == NULL ? NULL : env->task();
|
||||
Dependencies::DepType result = dependencies->validate_dependencies(task, counter_changed, failure_detail);
|
||||
if (result == Dependencies::end_marker) {
|
||||
return JVMCIEnv::ok;
|
||||
}
|
||||
|
||||
for (Dependencies::DepStream deps(dependencies); deps.next(); ) {
|
||||
Klass* witness = deps.check_dependency();
|
||||
if (witness != NULL) {
|
||||
// Use a fixed size buffer to prevent the string stream from
|
||||
// resizing in the context of an inner resource mark.
|
||||
char* buffer = NEW_RESOURCE_ARRAY(char, O_BUFLEN);
|
||||
stringStream st(buffer, O_BUFLEN);
|
||||
deps.print_dependency(witness, true, &st);
|
||||
*failure_detail = st.as_string();
|
||||
if (env == NULL || counter_changed || deps.type() == Dependencies::evol_method) {
|
||||
return JVMCIEnv::dependencies_failed;
|
||||
} else {
|
||||
// The dependencies were invalid at the time of installation
|
||||
// without any intervening modification of the system
|
||||
// dictionary. That means they were invalidly constructed.
|
||||
return JVMCIEnv::dependencies_invalid;
|
||||
}
|
||||
}
|
||||
if (LogCompilation) {
|
||||
deps.log_dependency();
|
||||
}
|
||||
if (!Dependencies::is_klass_type(result) || counter_changed) {
|
||||
return JVMCIEnv::dependencies_failed;
|
||||
}
|
||||
|
||||
return JVMCIEnv::ok;
|
||||
// The dependencies were invalid at the time of installation
|
||||
// without any intervening modification of the system
|
||||
// dictionary. That means they were invalidly constructed.
|
||||
return JVMCIEnv::dependencies_invalid;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
@ -492,8 +475,15 @@ JVMCIEnv::CodeInstallResult JVMCIEnv::register_method(
|
||||
// Encode the dependencies now, so we can check them right away.
|
||||
dependencies->encode_content_bytes();
|
||||
|
||||
// Record the dependencies for the current compile in the log
|
||||
if (LogCompilation) {
|
||||
for (Dependencies::DepStream deps(dependencies); deps.next(); ) {
|
||||
deps.log_dependency();
|
||||
}
|
||||
}
|
||||
|
||||
// Check for {class loads, evolution, breakpoints} during compilation
|
||||
result = check_for_system_dictionary_modification(dependencies, compiled_code, env, &failure_detail);
|
||||
result = validate_compile_task_dependencies(dependencies, compiled_code, env, &failure_detail);
|
||||
if (result != JVMCIEnv::ok) {
|
||||
// While not a true deoptimization, it is a preemptive decompile.
|
||||
MethodData* mdp = method()->method_data();
|
||||
|
@ -138,8 +138,8 @@ private:
|
||||
|
||||
// Helper routine for determining the validity of a compilation
|
||||
// with respect to concurrent class loading.
|
||||
static JVMCIEnv::CodeInstallResult check_for_system_dictionary_modification(Dependencies* target, Handle compiled_code,
|
||||
JVMCIEnv* env, char** failure_detail);
|
||||
static JVMCIEnv::CodeInstallResult validate_compile_task_dependencies(Dependencies* target, Handle compiled_code,
|
||||
JVMCIEnv* env, char** failure_detail);
|
||||
|
||||
public:
|
||||
CompileTask* task() { return _task; }
|
||||
|
@ -195,6 +195,9 @@
|
||||
product(bool, UseSubwordForMaxVector, true, \
|
||||
"Use Subword Analysis to set maximum vector size") \
|
||||
\
|
||||
product(bool, UseVectorCmov, false, \
|
||||
"Use Vectorized Cmov") \
|
||||
\
|
||||
develop(intx, UnrollLimitForProfileCheck, 1, \
|
||||
"Don't use profile_trip_cnt() to restrict unrolling until " \
|
||||
"unrolling would push the number of unrolled iterations above " \
|
||||
|
@ -66,6 +66,7 @@ macro(ConstraintCast)
|
||||
macro(CMoveD)
|
||||
macro(CMoveVD)
|
||||
macro(CMoveF)
|
||||
macro(CMoveVF)
|
||||
macro(CMoveI)
|
||||
macro(CMoveL)
|
||||
macro(CMoveP)
|
||||
|
@ -528,13 +528,12 @@ Node *PhaseIdealLoop::conditional_move( Node *region ) {
|
||||
BasicType bt = phi->type()->basic_type();
|
||||
switch (bt) {
|
||||
case T_DOUBLE:
|
||||
case T_FLOAT:
|
||||
if (C->use_cmove()) {
|
||||
continue; //TODO: maybe we want to add some cost
|
||||
}
|
||||
case T_FLOAT: {
|
||||
cost += Matcher::float_cmove_cost(); // Could be very expensive
|
||||
break;
|
||||
}
|
||||
case T_LONG: {
|
||||
cost += Matcher::long_cmove_cost(); // May encodes as 2 CMOV's
|
||||
}
|
||||
@ -613,8 +612,9 @@ Node *PhaseIdealLoop::conditional_move( Node *region ) {
|
||||
}
|
||||
// Check for highly predictable branch. No point in CMOV'ing if
|
||||
// we are going to predict accurately all the time.
|
||||
if (C->use_cmove() && cmp_op == Op_CmpD) ;//keep going
|
||||
else if (iff->_prob < infrequent_prob ||
|
||||
if (C->use_cmove() && (cmp_op == Op_CmpF || cmp_op == Op_CmpD)) {
|
||||
//keep going
|
||||
} else if (iff->_prob < infrequent_prob ||
|
||||
iff->_prob > (1.0f - infrequent_prob))
|
||||
return NULL;
|
||||
|
||||
|
@ -2267,6 +2267,7 @@ void Matcher::find_shared( Node *n ) {
|
||||
case Op_CMoveL:
|
||||
case Op_CMoveN:
|
||||
case Op_CMoveP:
|
||||
case Op_CMoveVF:
|
||||
case Op_CMoveVD: {
|
||||
// Restructure into a binary tree for Matching. It's possible that
|
||||
// we could move this code up next to the graph reshaping for IfNodes
|
||||
|
@ -58,7 +58,7 @@ SuperWord::SuperWord(PhaseIdealLoop* phase) :
|
||||
_mem_slice_tail(arena(), 8, 0, NULL), // memory slice tails
|
||||
_node_info(arena(), 8, 0, SWNodeInfo::initial), // info needed per node
|
||||
_clone_map(phase->C->clone_map()), // map of nodes created in cloning
|
||||
_cmovev_kit(_arena, this), // map to facilitate CMoveVD creation
|
||||
_cmovev_kit(_arena, this), // map to facilitate CMoveV creation
|
||||
_align_to_ref(NULL), // memory reference to align vectors to
|
||||
_disjoint_ptrs(arena(), 8, 0, OrderedPair::initial), // runtime disambiguated pointer pairs
|
||||
_dg(_arena), // dependence graph
|
||||
@ -511,8 +511,7 @@ void SuperWord::SLP_extract() {
|
||||
combine_packs();
|
||||
|
||||
construct_my_pack_map();
|
||||
|
||||
if (_do_vector_loop) {
|
||||
if (UseVectorCmov) {
|
||||
merge_packs_to_cmovd();
|
||||
}
|
||||
|
||||
@ -1249,8 +1248,8 @@ void SuperWord::set_alignment(Node* s1, Node* s2, int align) {
|
||||
|
||||
//------------------------------data_size---------------------------
|
||||
int SuperWord::data_size(Node* s) {
|
||||
Node* use = NULL; //test if the node is a candidate for CMoveVD optimization, then return the size of CMov
|
||||
if (_do_vector_loop) {
|
||||
Node* use = NULL; //test if the node is a candidate for CMoveV optimization, then return the size of CMov
|
||||
if (UseVectorCmov) {
|
||||
use = _cmovev_kit.is_Bool_candidate(s);
|
||||
if (use != NULL) {
|
||||
return data_size(use);
|
||||
@ -1260,6 +1259,7 @@ int SuperWord::data_size(Node* s) {
|
||||
return data_size(use);
|
||||
}
|
||||
}
|
||||
|
||||
int bsize = type2aelembytes(velt_basic_type(s));
|
||||
assert(bsize != 0, "valid size");
|
||||
return bsize;
|
||||
@ -1718,6 +1718,9 @@ Node_List* CMoveKit::make_cmovevd_pack(Node_List* cmovd_pk) {
|
||||
if (!cmovd->is_CMove()) {
|
||||
return NULL;
|
||||
}
|
||||
if (cmovd->Opcode() != Op_CMoveF && cmovd->Opcode() != Op_CMoveD) {
|
||||
return NULL;
|
||||
}
|
||||
if (pack(cmovd) != NULL) { // already in the cmov pack
|
||||
return NULL;
|
||||
}
|
||||
@ -2377,7 +2380,13 @@ void SuperWord::output() {
|
||||
}
|
||||
BasicType bt = velt_basic_type(n);
|
||||
const TypeVect* vt = TypeVect::make(bt, vlen);
|
||||
vn = new CMoveVDNode(cc, src1, src2, vt);
|
||||
assert(bt == T_FLOAT || bt == T_DOUBLE, "Only vectorization for FP cmovs is supported");
|
||||
if (bt == T_FLOAT) {
|
||||
vn = new CMoveVFNode(cc, src1, src2, vt);
|
||||
} else {
|
||||
assert(bt == T_DOUBLE, "Expected double");
|
||||
vn = new CMoveVDNode(cc, src1, src2, vt);
|
||||
}
|
||||
NOT_PRODUCT(if(is_trace_cmov()) {tty->print("SWPointer::output: created new CMove node %d: ", vn->_idx); vn->dump();})
|
||||
} else if (opc == Op_FmaD || opc == Op_FmaF) {
|
||||
// Promote operands to vector
|
||||
|
@ -92,6 +92,9 @@ int VectorNode::opcode(int sopc, BasicType bt) {
|
||||
case Op_FmaF:
|
||||
assert(bt == T_FLOAT, "must be");
|
||||
return Op_FmaVF;
|
||||
case Op_CMoveF:
|
||||
assert(bt == T_FLOAT, "must be");
|
||||
return Op_CMoveVF;
|
||||
case Op_CMoveD:
|
||||
assert(bt == T_DOUBLE, "must be");
|
||||
return Op_CMoveVD;
|
||||
|
@ -277,8 +277,16 @@ public:
|
||||
virtual int Opcode() const;
|
||||
};
|
||||
|
||||
//------------------------------CMoveVFNode--------------------------------------
|
||||
// Vector float conditional move
|
||||
class CMoveVFNode : public VectorNode {
|
||||
public:
|
||||
CMoveVFNode(Node* in1, Node* in2, Node* in3, const TypeVect* vt) : VectorNode(in1, in2, in3, vt) {}
|
||||
virtual int Opcode() const;
|
||||
};
|
||||
|
||||
//------------------------------CMoveVDNode--------------------------------------
|
||||
// Vector multiply double
|
||||
// Vector double conditional move
|
||||
class CMoveVDNode : public VectorNode {
|
||||
public:
|
||||
CMoveVDNode(Node* in1, Node* in2, Node* in3, const TypeVect* vt) : VectorNode(in1, in2, in3, vt) {}
|
||||
|
@ -224,7 +224,13 @@ address NativeLookup::lookup_critical_style(const methodHandle& method, char* pu
|
||||
st.print_raw(long_name);
|
||||
if (os_style) os::print_jni_name_suffix_on(&st, args_size);
|
||||
char* jni_name = st.as_string();
|
||||
return (address)os::dll_lookup(dll, jni_name);
|
||||
address critical_entry = (address)os::dll_lookup(dll, jni_name);
|
||||
// Close the handle to avoid keeping the library alive if the native method holder is unloaded.
|
||||
// This is fine because the library is still kept alive by JNI (see JVM_LoadLibrary). As soon
|
||||
// as the holder class and the library are unloaded (see JVM_UnloadLibrary), the native wrapper
|
||||
// that calls 'critical_entry' becomes unreachable and is unloaded as well.
|
||||
os::dll_unload(dll);
|
||||
return critical_entry;
|
||||
}
|
||||
}
|
||||
|
||||
@ -245,7 +251,6 @@ address NativeLookup::lookup_entry(const methodHandle& method, bool& in_base_lib
|
||||
+ (method->is_static() ? 1 : 0) // class for static methods
|
||||
+ method->size_of_parameters(); // actual parameters
|
||||
|
||||
|
||||
// 1) Try JNI short style
|
||||
entry = lookup_style(method, pure_name, "", args_size, true, in_base_library, CHECK_NULL);
|
||||
if (entry != NULL) return entry;
|
||||
|
@ -357,7 +357,7 @@ void print_statistics() {
|
||||
MemTracker::final_report(tty);
|
||||
}
|
||||
|
||||
Threads::log_smr_statistics();
|
||||
ThreadsSMRSupport::log_smr_statistics();
|
||||
}
|
||||
|
||||
#else // PRODUCT MODE STATISTICS
|
||||
@ -399,7 +399,7 @@ void print_statistics() {
|
||||
Method::print_touched_methods(tty);
|
||||
}
|
||||
|
||||
Threads::log_smr_statistics();
|
||||
ThreadsSMRSupport::log_smr_statistics();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -58,6 +58,7 @@
|
||||
|
||||
class ThreadSafepointState;
|
||||
class ThreadsList;
|
||||
class ThreadsSMRSupport;
|
||||
class NestedThreadsList;
|
||||
|
||||
class JvmtiThreadState;
|
||||
@ -103,7 +104,6 @@ class WorkerThread;
|
||||
// - WatcherThread
|
||||
|
||||
class Thread: public ThreadShadow {
|
||||
friend class Threads;
|
||||
friend class VMStructs;
|
||||
friend class JVMCIVMStructs;
|
||||
private:
|
||||
@ -121,12 +121,14 @@ class Thread: public ThreadShadow {
|
||||
protected:
|
||||
// Support for forcing alignment of thread objects for biased locking
|
||||
void* _real_malloc_address;
|
||||
|
||||
// JavaThread lifecycle support:
|
||||
friend class ScanHazardPtrGatherProtectedThreadsClosure;
|
||||
friend class ScanHazardPtrGatherThreadsListClosure;
|
||||
friend class ScanHazardPtrPrintMatchingThreadsClosure;
|
||||
friend class ThreadsListHandle;
|
||||
friend class ThreadsListSetter;
|
||||
friend class ScanHazardPtrGatherProtectedThreadsClosure; // for cmpxchg_threads_hazard_ptr(), get_threads_hazard_ptr(), is_hazard_ptr_tagged() access
|
||||
friend class ScanHazardPtrGatherThreadsListClosure; // for get_nested_threads_hazard_ptr(), get_threads_hazard_ptr(), untag_hazard_ptr() access
|
||||
friend class ScanHazardPtrPrintMatchingThreadsClosure; // for get_threads_hazard_ptr(), is_hazard_ptr_tagged() access
|
||||
friend class ThreadsListSetter; // for get_threads_hazard_ptr() access
|
||||
friend class ThreadsSMRSupport; // for get_threads_hazard_ptr() access
|
||||
|
||||
ThreadsList* volatile _threads_hazard_ptr;
|
||||
ThreadsList* cmpxchg_threads_hazard_ptr(ThreadsList* exchange_value, ThreadsList* compare_value);
|
||||
ThreadsList* get_threads_hazard_ptr();
|
||||
@ -2126,62 +2128,18 @@ inline CompilerThread* CompilerThread::current() {
|
||||
class Threads: AllStatic {
|
||||
friend class VMStructs;
|
||||
private:
|
||||
// Safe Memory Reclamation (SMR) support:
|
||||
// The coordination between Threads::release_stable_list() and
|
||||
// Threads::smr_delete() uses the smr_delete_lock in order to
|
||||
// reduce the traffic on the Threads_lock.
|
||||
static Monitor* _smr_delete_lock;
|
||||
// The '_cnt', '_max' and '_times" fields are enabled via
|
||||
// -XX:+EnableThreadSMRStatistics (see thread.cpp for a
|
||||
// description about each field):
|
||||
static uint _smr_delete_lock_wait_cnt;
|
||||
static uint _smr_delete_lock_wait_max;
|
||||
// The smr_delete_notify flag is used for proper double-check
|
||||
// locking in order to reduce the traffic on the smr_delete_lock.
|
||||
static volatile uint _smr_delete_notify;
|
||||
static volatile uint _smr_deleted_thread_cnt;
|
||||
static volatile uint _smr_deleted_thread_time_max;
|
||||
static volatile uint _smr_deleted_thread_times;
|
||||
static ThreadsList* volatile _smr_java_thread_list;
|
||||
static uint64_t _smr_java_thread_list_alloc_cnt;
|
||||
static uint64_t _smr_java_thread_list_free_cnt;
|
||||
static uint _smr_java_thread_list_max;
|
||||
static uint _smr_nested_thread_list_max;
|
||||
static volatile uint _smr_tlh_cnt;
|
||||
static volatile uint _smr_tlh_time_max;
|
||||
static volatile uint _smr_tlh_times;
|
||||
static ThreadsList* _smr_to_delete_list;
|
||||
static uint _smr_to_delete_list_cnt;
|
||||
static uint _smr_to_delete_list_max;
|
||||
|
||||
static JavaThread* _thread_list;
|
||||
static int _number_of_threads;
|
||||
static int _number_of_non_daemon_threads;
|
||||
static int _return_code;
|
||||
static int _thread_claim_parity;
|
||||
static JavaThread* _thread_list;
|
||||
static int _number_of_threads;
|
||||
static int _number_of_non_daemon_threads;
|
||||
static int _return_code;
|
||||
static int _thread_claim_parity;
|
||||
#ifdef ASSERT
|
||||
static bool _vm_complete;
|
||||
static bool _vm_complete;
|
||||
#endif
|
||||
|
||||
static void initialize_java_lang_classes(JavaThread* main_thread, TRAPS);
|
||||
static void initialize_jsr292_core_classes(TRAPS);
|
||||
|
||||
static ThreadsList *acquire_stable_list_fast_path(Thread *self);
|
||||
static ThreadsList *acquire_stable_list_nested_path(Thread *self);
|
||||
static void add_smr_deleted_thread_times(uint add_value);
|
||||
static void clear_smr_delete_notify();
|
||||
static ThreadsList* get_smr_java_thread_list();
|
||||
static void inc_smr_deleted_thread_cnt();
|
||||
static void release_stable_list_fast_path(Thread *self);
|
||||
static void release_stable_list_nested_path(Thread *self);
|
||||
static void release_stable_list_wake_up(char *log_str);
|
||||
static void set_smr_delete_notify();
|
||||
static Monitor* smr_delete_lock() { return _smr_delete_lock; }
|
||||
static bool smr_delete_notify();
|
||||
static void smr_free_list(ThreadsList* threads);
|
||||
static void update_smr_deleted_thread_time_max(uint new_value);
|
||||
static ThreadsList* xchg_smr_java_thread_list(ThreadsList* new_list);
|
||||
|
||||
public:
|
||||
// Thread management
|
||||
// force_daemon is a concession to JNI, where we may need to add a
|
||||
@ -2191,19 +2149,6 @@ class Threads: AllStatic {
|
||||
static void threads_do(ThreadClosure* tc);
|
||||
static void possibly_parallel_threads_do(bool is_par, ThreadClosure* tc);
|
||||
|
||||
// SMR support:
|
||||
static ThreadsList *acquire_stable_list(Thread *self, bool is_ThreadsListSetter);
|
||||
static void release_stable_list(Thread *self);
|
||||
static bool is_a_protected_JavaThread(JavaThread *thread);
|
||||
static bool is_a_protected_JavaThread_with_lock(JavaThread *thread) {
|
||||
MutexLockerEx ml(Threads_lock->owned_by_self() ? NULL : Threads_lock);
|
||||
return is_a_protected_JavaThread(thread);
|
||||
}
|
||||
static void smr_delete(JavaThread *thread);
|
||||
static void inc_smr_tlh_cnt();
|
||||
static void update_smr_tlh_time_max(uint new_value);
|
||||
static void add_smr_tlh_times(uint add_value);
|
||||
|
||||
// Initializes the vm and creates the vm thread
|
||||
static jint create_vm(JavaVMInitArgs* args, bool* canTryAgain);
|
||||
static void convert_vm_init_libraries_to_agents();
|
||||
@ -2264,10 +2209,7 @@ class Threads: AllStatic {
|
||||
|
||||
// Verification
|
||||
static void verify();
|
||||
static void log_smr_statistics();
|
||||
static void print_on(outputStream* st, bool print_stacks, bool internal_format, bool print_concurrent_locks);
|
||||
static void print_smr_info_on(outputStream* st);
|
||||
static void print_smr_info_elements_on(outputStream* st, ThreadsList* t_list);
|
||||
static void print(bool print_stacks, bool internal_format) {
|
||||
// this function is only used by debug.cpp
|
||||
print_on(tty, print_stacks, internal_format, false /* no concurrent lock printed */);
|
||||
|
@ -28,7 +28,6 @@
|
||||
#include "runtime/atomic.hpp"
|
||||
#include "runtime/os.inline.hpp"
|
||||
#include "runtime/thread.hpp"
|
||||
#include "runtime/threadSMR.hpp"
|
||||
|
||||
inline void Thread::set_suspend_flag(SuspendFlags f) {
|
||||
assert(sizeof(jint) == sizeof(_suspend_flags), "size mismatch");
|
||||
@ -212,26 +211,4 @@ inline void JavaThread::set_terminated_value() {
|
||||
OrderAccess::release_store((volatile jint *) &_terminated, (jint) _thread_terminated);
|
||||
}
|
||||
|
||||
inline void Threads::add_smr_tlh_times(uint add_value) {
|
||||
Atomic::add(add_value, &_smr_tlh_times);
|
||||
}
|
||||
|
||||
inline void Threads::inc_smr_tlh_cnt() {
|
||||
Atomic::inc(&_smr_tlh_cnt);
|
||||
}
|
||||
|
||||
inline void Threads::update_smr_tlh_time_max(uint new_value) {
|
||||
while (true) {
|
||||
uint cur_value = _smr_tlh_time_max;
|
||||
if (new_value <= cur_value) {
|
||||
// No need to update max value so we're done.
|
||||
break;
|
||||
}
|
||||
if (Atomic::cmpxchg(new_value, &_smr_tlh_time_max, cur_value) == cur_value) {
|
||||
// Updated max value so we're done. Otherwise try it all again.
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif // SHARE_VM_RUNTIME_THREAD_INLINE_HPP
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -77,11 +77,77 @@
|
||||
// longer protected by a ThreadsListHandle.
|
||||
|
||||
|
||||
// SMR Support for the Threads class.
|
||||
//
|
||||
class ThreadsSMRSupport : AllStatic {
|
||||
// The coordination between ThreadsSMRSupport::release_stable_list() and
|
||||
// ThreadsSMRSupport::smr_delete() uses the smr_delete_lock in order to
|
||||
// reduce the traffic on the Threads_lock.
|
||||
static Monitor* _smr_delete_lock;
|
||||
// The '_cnt', '_max' and '_times" fields are enabled via
|
||||
// -XX:+EnableThreadSMRStatistics (see thread.cpp for a
|
||||
// description about each field):
|
||||
static uint _smr_delete_lock_wait_cnt;
|
||||
static uint _smr_delete_lock_wait_max;
|
||||
// The smr_delete_notify flag is used for proper double-check
|
||||
// locking in order to reduce the traffic on the smr_delete_lock.
|
||||
static volatile uint _smr_delete_notify;
|
||||
static volatile uint _smr_deleted_thread_cnt;
|
||||
static volatile uint _smr_deleted_thread_time_max;
|
||||
static volatile uint _smr_deleted_thread_times;
|
||||
static ThreadsList* volatile _smr_java_thread_list;
|
||||
static uint64_t _smr_java_thread_list_alloc_cnt;
|
||||
static uint64_t _smr_java_thread_list_free_cnt;
|
||||
static uint _smr_java_thread_list_max;
|
||||
static uint _smr_nested_thread_list_max;
|
||||
static volatile uint _smr_tlh_cnt;
|
||||
static volatile uint _smr_tlh_time_max;
|
||||
static volatile uint _smr_tlh_times;
|
||||
static ThreadsList* _smr_to_delete_list;
|
||||
static uint _smr_to_delete_list_cnt;
|
||||
static uint _smr_to_delete_list_max;
|
||||
|
||||
static ThreadsList *acquire_stable_list_fast_path(Thread *self);
|
||||
static ThreadsList *acquire_stable_list_nested_path(Thread *self);
|
||||
static void add_smr_deleted_thread_times(uint add_value);
|
||||
static void add_smr_tlh_times(uint add_value);
|
||||
static void clear_smr_delete_notify();
|
||||
static void inc_smr_deleted_thread_cnt();
|
||||
static void inc_smr_java_thread_list_alloc_cnt();
|
||||
static void inc_smr_tlh_cnt();
|
||||
static bool is_a_protected_JavaThread(JavaThread *thread);
|
||||
static void release_stable_list_fast_path(Thread *self);
|
||||
static void release_stable_list_nested_path(Thread *self);
|
||||
static void release_stable_list_wake_up(char *log_str);
|
||||
static void set_smr_delete_notify();
|
||||
static Monitor* smr_delete_lock() { return _smr_delete_lock; }
|
||||
static bool smr_delete_notify();
|
||||
static void smr_free_list(ThreadsList* threads);
|
||||
static void update_smr_deleted_thread_time_max(uint new_value);
|
||||
static void update_smr_java_thread_list_max(uint new_value);
|
||||
static void update_smr_tlh_time_max(uint new_value);
|
||||
static ThreadsList* xchg_smr_java_thread_list(ThreadsList* new_list);
|
||||
|
||||
public:
|
||||
static ThreadsList *acquire_stable_list(Thread *self, bool is_ThreadsListSetter);
|
||||
static void add_thread(JavaThread *thread);
|
||||
static ThreadsList* get_smr_java_thread_list();
|
||||
static bool is_a_protected_JavaThread_with_lock(JavaThread *thread);
|
||||
static void release_stable_list(Thread *self);
|
||||
static void remove_thread(JavaThread *thread);
|
||||
static void smr_delete(JavaThread *thread);
|
||||
static void update_smr_tlh_stats(uint millis);
|
||||
|
||||
// Logging and printing support:
|
||||
static void log_smr_statistics();
|
||||
static void print_smr_info_elements_on(outputStream* st, ThreadsList* t_list);
|
||||
static void print_smr_info_on(outputStream* st);
|
||||
};
|
||||
|
||||
// A fast list of JavaThreads.
|
||||
//
|
||||
class ThreadsList : public CHeapObj<mtThread> {
|
||||
friend class ScanHazardPtrGatherProtectedThreadsClosure;
|
||||
friend class Threads;
|
||||
friend class ThreadsSMRSupport; // for next_list(), set_next_list() access
|
||||
|
||||
const uint _length;
|
||||
ThreadsList* _next_list;
|
||||
@ -93,6 +159,9 @@ class ThreadsList : public CHeapObj<mtThread> {
|
||||
ThreadsList *next_list() const { return _next_list; }
|
||||
void set_next_list(ThreadsList *list) { _next_list = list; }
|
||||
|
||||
static ThreadsList* add_thread(ThreadsList* list, JavaThread* java_thread);
|
||||
static ThreadsList* remove_thread(ThreadsList* list, JavaThread* java_thread);
|
||||
|
||||
public:
|
||||
ThreadsList(int entries);
|
||||
~ThreadsList();
|
||||
@ -110,9 +179,6 @@ public:
|
||||
int find_index_of_JavaThread(JavaThread* target);
|
||||
JavaThread* find_JavaThread_from_java_tid(jlong java_tid) const;
|
||||
bool includes(const JavaThread * const p) const;
|
||||
|
||||
static ThreadsList* add_thread(ThreadsList* list, JavaThread* java_thread);
|
||||
static ThreadsList* remove_thread(ThreadsList* list, JavaThread* java_thread);
|
||||
};
|
||||
|
||||
// Linked list of ThreadsLists to support nested ThreadsListHandles.
|
||||
|
@ -52,6 +52,32 @@ inline void ThreadsList::threads_do(T *cl) const {
|
||||
}
|
||||
}
|
||||
|
||||
// These three inlines are private to ThreadsSMRSupport, but
|
||||
// they are called by public inline update_smr_tlh_stats() below:
|
||||
|
||||
inline void ThreadsSMRSupport::add_smr_tlh_times(uint add_value) {
|
||||
Atomic::add(add_value, &_smr_tlh_times);
|
||||
}
|
||||
|
||||
inline void ThreadsSMRSupport::inc_smr_tlh_cnt() {
|
||||
Atomic::inc(&_smr_tlh_cnt);
|
||||
}
|
||||
|
||||
inline void ThreadsSMRSupport::update_smr_tlh_time_max(uint new_value) {
|
||||
while (true) {
|
||||
uint cur_value = _smr_tlh_time_max;
|
||||
if (new_value <= cur_value) {
|
||||
// No need to update max value so we're done.
|
||||
break;
|
||||
}
|
||||
if (Atomic::cmpxchg(new_value, &_smr_tlh_time_max, cur_value) == cur_value) {
|
||||
// Updated max value so we're done. Otherwise try it all again.
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
inline ThreadsList* ThreadsListSetter::list() {
|
||||
ThreadsList *ret = _target->get_threads_hazard_ptr();
|
||||
assert(ret != NULL, "hazard ptr should be set");
|
||||
@ -59,4 +85,19 @@ inline ThreadsList* ThreadsListSetter::list() {
|
||||
return ret;
|
||||
}
|
||||
|
||||
inline ThreadsList* ThreadsSMRSupport::get_smr_java_thread_list() {
|
||||
return (ThreadsList*)OrderAccess::load_acquire(&_smr_java_thread_list);
|
||||
}
|
||||
|
||||
inline bool ThreadsSMRSupport::is_a_protected_JavaThread_with_lock(JavaThread *thread) {
|
||||
MutexLockerEx ml(Threads_lock->owned_by_self() ? NULL : Threads_lock);
|
||||
return is_a_protected_JavaThread(thread);
|
||||
}
|
||||
|
||||
inline void ThreadsSMRSupport::update_smr_tlh_stats(uint millis) {
|
||||
ThreadsSMRSupport::inc_smr_tlh_cnt();
|
||||
ThreadsSMRSupport::add_smr_tlh_times(millis);
|
||||
ThreadsSMRSupport::update_smr_tlh_time_max(millis);
|
||||
}
|
||||
|
||||
#endif // SHARE_VM_RUNTIME_THREADSMR_INLINE_HPP
|
||||
|
@ -1991,6 +1991,7 @@ typedef PaddedEnd<ObjectMonitor> PaddedObjectMonitor;
|
||||
declare_c2_type(MulVDNode, VectorNode) \
|
||||
declare_c2_type(FmaVDNode, VectorNode) \
|
||||
declare_c2_type(FmaVFNode, VectorNode) \
|
||||
declare_c2_type(CMoveVFNode, VectorNode) \
|
||||
declare_c2_type(CMoveVDNode, VectorNode) \
|
||||
declare_c2_type(MulReductionVDNode, ReductionNode) \
|
||||
declare_c2_type(DivVFNode, VectorNode) \
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "memory/allocation.hpp"
|
||||
#include "oops/oop.hpp"
|
||||
#include "runtime/thread.hpp"
|
||||
#include "runtime/threadSMR.hpp"
|
||||
#include "code/codeCache.hpp"
|
||||
|
||||
// The following classes are used for operations
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include "runtime/objectMonitor.inline.hpp"
|
||||
#include "runtime/perfData.hpp"
|
||||
#include "runtime/thread.hpp"
|
||||
#include "runtime/threadSMR.hpp"
|
||||
#include "services/management.hpp"
|
||||
#include "services/serviceUtil.hpp"
|
||||
|
||||
|
@ -62,7 +62,7 @@ public class UseCountedLoopSafepointsTest {
|
||||
try {
|
||||
oa = ProcessTools.executeTestJvm("-XX:+UnlockDiagnosticVMOptions", "-Xbootclasspath/a:.",
|
||||
"-XX:" + (enabled ? "+" : "-") + "UseCountedLoopSafepoints",
|
||||
"-XX:LoopStripMiningIter=" + (enabled ? "1" : "0"), "-XX:+WhiteBoxAPI",
|
||||
"-XX:+WhiteBoxAPI",
|
||||
"-XX:-Inline", "-Xbatch", "-XX:+PrintIdeal", "-XX:LoopUnrollLimit=0",
|
||||
"-XX:CompileOnly=" + UseCountedLoopSafepoints.class.getName() + "::testMethod",
|
||||
UseCountedLoopSafepoints.class.getName());
|
||||
|
@ -49,6 +49,14 @@ public class HandshakeTransitionTest {
|
||||
public static void main(String[] args) throws Exception {
|
||||
String lib = System.getProperty("test.nativepath");
|
||||
WhiteBox wb = WhiteBox.getWhiteBox();
|
||||
Boolean useJVMCICompiler = wb.getBooleanVMFlag("UseJVMCICompiler");
|
||||
String useJVMCICompilerStr;
|
||||
if (useJVMCICompiler != null) {
|
||||
useJVMCICompilerStr = useJVMCICompiler ? "-XX:+UseJVMCICompiler" : "-XX:-UseJVMCICompiler";
|
||||
} else {
|
||||
// pass something innocuous
|
||||
useJVMCICompilerStr = "-XX:+UnlockExperimentalVMOptions";
|
||||
}
|
||||
ProcessBuilder pb =
|
||||
ProcessTools.createJavaProcessBuilder(
|
||||
true,
|
||||
@ -60,7 +68,7 @@ public class HandshakeTransitionTest {
|
||||
"-XX:ConcGCThreads=1",
|
||||
"-XX:CICompilerCount=2",
|
||||
"-XX:+UnlockExperimentalVMOptions",
|
||||
(wb.getBooleanVMFlag("UseJVMCICompiler") ? "-XX:+UseJVMCICompiler" : "-XX:-UseJVMCICompiler"),
|
||||
useJVMCICompilerStr,
|
||||
"HandshakeTransitionTest$Test");
|
||||
|
||||
|
||||
|
84
test/hotspot/jtreg/serviceability/sa/ClhsdbSource.java
Normal file
84
test/hotspot/jtreg/serviceability/sa/ClhsdbSource.java
Normal file
@ -0,0 +1,84 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 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.
|
||||
*/
|
||||
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import jdk.test.lib.apps.LingeredApp;
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 8192823
|
||||
* @summary Test clhsdb source command
|
||||
* @library /test/lib
|
||||
* @run main/othervm ClhsdbSource
|
||||
*/
|
||||
|
||||
public class ClhsdbSource {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
System.out.println("Starting ClhsdbSource test");
|
||||
|
||||
LingeredApp theApp = null;
|
||||
try {
|
||||
ClhsdbLauncher test = new ClhsdbLauncher();
|
||||
theApp = LingeredApp.startApp();
|
||||
System.out.println("Started LingeredApp with pid " + theApp.getPid());
|
||||
|
||||
Path file = Paths.get("clhsdb_cmd_file");
|
||||
Files.write(file, "jstack -v\nhelp".getBytes());
|
||||
List<String> cmds = List.of("source clhsdb_cmd_file");
|
||||
|
||||
Map<String, List<String>> expStrMap = new HashMap<>();
|
||||
expStrMap.put("source clhsdb_cmd_file", List.of(
|
||||
"No deadlocks found",
|
||||
"Common-Cleaner",
|
||||
"Signal Dispatcher",
|
||||
"java.lang.ref.Finalizer$FinalizerThread.run",
|
||||
"java.lang.ref.Reference",
|
||||
"Method*",
|
||||
"LingeredApp.main",
|
||||
"Available commands:",
|
||||
"attach pid | exec core",
|
||||
"intConstant [ name [ value ] ]",
|
||||
"type [ type [ name super isOop isInteger isUnsigned size ] ]",
|
||||
"symboltable name"));
|
||||
|
||||
Map<String, List<String>> unExpStrMap = new HashMap<>();
|
||||
unExpStrMap.put("source clhsdb_cmd_file", List.of(
|
||||
"No such file or directory"));
|
||||
|
||||
test.run(theApp.getPid(), cmds, expStrMap, unExpStrMap);
|
||||
Files.delete(file);
|
||||
} catch (Exception ex) {
|
||||
throw new RuntimeException("Test ERROR " + ex, ex);
|
||||
} finally {
|
||||
LingeredApp.stopApp(theApp);
|
||||
}
|
||||
System.out.println("Test PASSED");
|
||||
}
|
||||
}
|
@ -23,7 +23,7 @@
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 8164512
|
||||
* @bug 8164512 8191360
|
||||
* @summary verify if the native library is unloaded when the class loader is GC'ed
|
||||
* @build p.Test
|
||||
* @run main/othervm/native -Xcheck:jni NativeLibraryTest
|
||||
|
Loading…
Reference in New Issue
Block a user