--- a/hotspot/agent/src/os/linux/libproc.h Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/agent/src/os/linux/libproc.h Fri Mar 13 09:18:28 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -30,7 +30,7 @@
#include <stdint.h>
#include "proc_service.h"
-#if defined(arm) || defined(ppc)
+#ifdef ALT_SASRCDIR
#include "libproc_md.h"
#endif
--- a/hotspot/make/defs.make Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/make/defs.make Fri Mar 13 09:18:28 2015 -0700
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 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
@@ -286,7 +286,7 @@
# Use uname output for SRCARCH, but deal with platform differences. If ARCH
# is not explicitly listed below, it is treated as x86.
- SRCARCH = $(ARCH/$(filter sparc sparc64 ia64 amd64 x86_64 arm ppc ppc64 aarch64 zero,$(ARCH)))
+ SRCARCH ?= $(ARCH/$(filter sparc sparc64 ia64 amd64 x86_64 ppc ppc64 aarch64 zero,$(ARCH)))
ARCH/ = x86
ARCH/sparc = sparc
ARCH/sparc64= sparc
@@ -295,12 +295,11 @@
ARCH/x86_64 = x86
ARCH/ppc64 = ppc
ARCH/ppc = ppc
- ARCH/arm = arm
ARCH/aarch64= aarch64
ARCH/zero = zero
# BUILDARCH is usually the same as SRCARCH, except for sparcv9
- BUILDARCH = $(SRCARCH)
+ BUILDARCH ?= $(SRCARCH)
ifeq ($(BUILDARCH), x86)
ifdef LP64
BUILDARCH = amd64
@@ -320,7 +319,7 @@
endif
# LIBARCH is 1:1 mapping from BUILDARCH
- LIBARCH = $(LIBARCH/$(BUILDARCH))
+ LIBARCH ?= $(LIBARCH/$(BUILDARCH))
LIBARCH/i486 = i386
LIBARCH/amd64 = amd64
LIBARCH/sparc = sparc
@@ -328,8 +327,6 @@
LIBARCH/ia64 = ia64
LIBARCH/ppc64 = ppc64
LIBARCH/aarch64 = aarch64
- LIBARCH/ppc = ppc
- LIBARCH/arm = arm
LIBARCH/zero = $(ZERO_LIBARCH)
LP64_ARCH = sparcv9 amd64 ia64 ppc64 aarch64 zero
--- a/hotspot/make/linux/makefiles/arm.make Tue Mar 10 19:56:19 2015 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-#
-# Copyright (c) 2008, 2013, 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.
-#
-#
-
-Obj_Files += linux_arm.o
-
-ifneq ($(EXT_LIBS_PATH),)
- LIBS += $(EXT_LIBS_PATH)/sflt_glibc.a
-endif
-
-CFLAGS += -DVM_LITTLE_ENDIAN
--- a/hotspot/make/linux/makefiles/buildtree.make Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/make/linux/makefiles/buildtree.make Fri Mar 13 09:18:28 2015 -0700
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 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
@@ -70,6 +70,8 @@
PLATFORM_FILE = $(GAMMADIR)/make/$(OS_FAMILY)/platform_$(BUILDARCH).suncc
else
PLATFORM_FILE = $(GAMMADIR)/make/$(OS_FAMILY)/platform_$(BUILDARCH)
+ ALT_PLATFORM_FILE = $(HS_ALT_MAKE)/$(OS_FAMILY)/platform_$(BUILDARCH)
+ PLATFORM_FILE := $(if $(wildcard $(ALT_PLATFORM_FILE)),$(ALT_PLATFORM_FILE),$(PLATFORM_FILE))
endif
endif
@@ -203,7 +205,7 @@
$(QUIETLY) ( \
$(BUILDTREE_COMMENT); \
echo; \
- echo "Platform_file = $(PLATFORM_FILE)" | sed 's|$(GAMMADIR)|$$(GAMMADIR)|'; \
+ echo "Platform_file = $(PLATFORM_FILE)" | sed -e 's|$(HS_ALT_MAKE)|$$(HS_ALT_MAKE)|' -e 's|$(GAMMADIR)|$$(GAMMADIR)|'; \
sed -n '/=/s/^ */Platform_/p' < $(PLATFORM_FILE); \
echo; \
echo "GAMMADIR = $(GAMMADIR)"; \
--- a/hotspot/make/linux/makefiles/defs.make Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/make/linux/makefiles/defs.make Fri Mar 13 09:18:28 2015 -0700
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 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
@@ -105,14 +105,6 @@
HS_ARCH = x86
endif
-# ARM
-ifeq ($(ARCH), arm)
- ARCH_DATA_MODEL = 32
- PLATFORM = linux-arm
- VM_PLATFORM = linux_arm
- HS_ARCH = arm
-endif
-
# PPC
# Notice: after 8046471 ARCH will be 'ppc' for top-level ppc64 builds but
# 'ppc64' for HotSpot-only ppc64 builds. Need to detect both variants here!
@@ -121,10 +113,6 @@
MAKE_ARGS += LP64=1
PLATFORM = linux-ppc64
VM_PLATFORM = linux_ppc64
- else
- ARCH_DATA_MODEL = 32
- PLATFORM = linux-ppc
- VM_PLATFORM = linux_ppc
endif
HS_ARCH = ppc
--- a/hotspot/make/linux/makefiles/gcc.make Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/make/linux/makefiles/gcc.make Fri Mar 13 09:18:28 2015 -0700
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 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
@@ -176,11 +176,7 @@
ARCHFLAG/ia64 =
ARCHFLAG/sparc = -m32 -mcpu=v9
ARCHFLAG/sparcv9 = -m64 -mcpu=v9
-ARCHFLAG/arm = -fsigned-char
ARCHFLAG/zero = $(ZERO_ARCHFLAG)
-ifndef E500V2
-ARCHFLAG/ppc = -mcpu=powerpc
-endif
ARCHFLAG/ppc64 = -m64
CFLAGS += $(ARCHFLAG)
@@ -188,10 +184,6 @@
LFLAGS += $(ARCHFLAG)
ASFLAGS += $(ARCHFLAG)
-ifdef E500V2
-CFLAGS += -DE500V2
-endif
-
# Use C++ Interpreter
ifdef CC_INTERP
CFLAGS += -DCC_INTERP
@@ -391,3 +383,5 @@
ifndef USE_SUNCC
CFLAGS += -fno-omit-frame-pointer
endif
+
+-include $(HS_ALT_MAKE)/linux/makefiles/gcc.make
--- a/hotspot/make/linux/makefiles/ppc.make Tue Mar 10 19:56:19 2015 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-#
-# Copyright (c) 2004, 2012, 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.
-#
-#
-
-# The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized
-OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT)
-
-# Must also specify if CPU is big endian
-CFLAGS += -DVM_BIG_ENDIAN
-
-ifdef E500V2
-ASFLAGS += -Wa,-mspe -Wa,--defsym -Wa,E500V2=1
-endif
--- a/hotspot/make/linux/makefiles/saproc.make Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/make/linux/makefiles/saproc.make Fri Mar 13 09:18:28 2015 -0700
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 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
@@ -69,19 +69,21 @@
endif
ifneq ($(ALT_SASRCDIR),)
-ALT_SAINCDIR=-I$(ALT_SASRCDIR)
+ALT_SAINCDIR=-I$(ALT_SASRCDIR) -DALT_SASRCDIR
else
ALT_SAINCDIR=
endif
SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE)) $(LDFLAGS_HASH_STYLE)
+SAARCH ?= $(BUILDARCH)
+
$(LIBSAPROC): $(SASRCFILES) $(SAMAPFILE)
$(QUIETLY) if [ "$(BOOT_JAVA_HOME)" = "" ]; then \
echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \
exit 1; \
fi
@echo $(LOG_INFO) Making SA debugger back-end...
- $(QUIETLY) $(CC) -D$(BUILDARCH) -D_GNU_SOURCE \
+ $(QUIETLY) $(CC) -D$(SAARCH) -D_GNU_SOURCE \
-D_FILE_OFFSET_BITS=64 \
$(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \
-I$(SASRCDIR) \
--- a/hotspot/make/linux/makefiles/vm.make Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/make/linux/makefiles/vm.make Fri Mar 13 09:18:28 2015 -0700
@@ -45,8 +45,9 @@
ifeq ($(findstring true, $(JVM_VARIANT_ZERO) $(JVM_VARIANT_ZEROSHARK)), true)
include $(MAKEFILES_DIR)/zeroshark.make
else
- include $(MAKEFILES_DIR)/$(BUILDARCH).make
- -include $(HS_ALT_MAKE)/$(Platform_os_family)/makefiles/$(BUILDARCH).make
+ BUILDARCH_MAKE = $(MAKEFILES_DIR)/$(BUILDARCH).make
+ ALT_BUILDARCH_MAKE = $(HS_ALT_MAKE)/$(Platform_os_family)/makefiles/$(BUILDARCH).make
+ include $(if $(wildcard $(ALT_BUILDARCH_MAKE)),$(ALT_BUILDARCH_MAKE),$(BUILDARCH_MAKE))
endif
# set VPATH so make knows where to look for source files
--- a/hotspot/make/linux/platform_arm Tue Mar 10 19:56:19 2015 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-os_family = linux
-
-arch = arm
-
-arch_model = arm
-
-os_arch = linux_arm
-
-os_arch_model = linux_arm
-
-lib_arch = arm
-
-compiler = gcc
-
-gnu_dis_arch = arm
-
-sysdefs = -DLINUX -D_GNU_SOURCE -DARM
--- a/hotspot/make/linux/platform_ppc Tue Mar 10 19:56:19 2015 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-os_family = linux
-
-arch = ppc
-
-arch_model = ppc_32
-
-os_arch = linux_ppc
-
-os_arch_model = linux_ppc_32
-
-lib_arch = ppc
-
-compiler = gcc
-
-gnu_dis_arch = ppc
-
-sysdefs = -DLINUX -D_GNU_SOURCE -DPPC32
--- a/hotspot/src/os/linux/vm/os_linux.cpp Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/src/os/linux/vm/os_linux.cpp Fri Mar 13 09:18:28 2015 -0700
@@ -227,31 +227,7 @@
#endif
// Cpu architecture string
-#if defined(ZERO)
-static char cpu_arch[] = ZERO_LIBARCH;
-#elif defined(IA64)
-static char cpu_arch[] = "ia64";
-#elif defined(IA32)
-static char cpu_arch[] = "i386";
-#elif defined(AMD64)
-static char cpu_arch[] = "amd64";
-#elif defined(ARM)
-static char cpu_arch[] = "arm";
-#elif defined(PPC32)
-static char cpu_arch[] = "ppc";
-#elif defined(PPC64)
-static char cpu_arch[] = "ppc64";
-#elif defined(SPARC)
- #ifdef _LP64
-static char cpu_arch[] = "sparcv9";
- #else
-static char cpu_arch[] = "sparc";
- #endif
-#elif defined(AARCH64)
-static char cpu_arch[] = "aarch64";
-#else
- #error Add appropriate cpu_arch setting
-#endif
+static char cpu_arch[] = HOTSPOT_LIB_ARCH;
// pid_t gettid()
@@ -3296,7 +3272,7 @@
#ifndef ZERO
large_page_size = IA32_ONLY(4 * M) AMD64_ONLY(2 * M) IA64_ONLY(256 * M) SPARC_ONLY(4 * M)
- ARM_ONLY(2 * M) PPC_ONLY(4 * M) AARCH64_ONLY(2 * M);
+ ARM32_ONLY(2 * M) PPC_ONLY(4 * M) AARCH64_ONLY(2 * M);
#endif // ZERO
FILE *fp = fopen("/proc/meminfo", "r");
--- a/hotspot/src/share/vm/c1/c1_LIR.cpp Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/src/share/vm/c1/c1_LIR.cpp Fri Mar 13 09:18:28 2015 -0700
@@ -142,16 +142,11 @@
#ifndef PRODUCT
-void LIR_Address::verify() const {
+void LIR_Address::verify0() const {
#if defined(SPARC) || defined(PPC)
assert(scale() == times_1, "Scaled addressing mode not available on SPARC/PPC and should not be used");
assert(disp() == 0 || index()->is_illegal(), "can't have both");
#endif
-#ifdef ARM
- assert(disp() == 0 || index()->is_illegal(), "can't have both");
- // Note: offsets higher than 4096 must not be rejected here. They can
- // be handled by the back-end or will be rejected if not.
-#endif
#ifdef _LP64
assert(base()->is_cpu_register(), "wrong base operand");
#ifndef AARCH64
--- a/hotspot/src/share/vm/c1/c1_LIR.hpp Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/src/share/vm/c1/c1_LIR.hpp Fri Mar 13 09:18:28 2015 -0700
@@ -25,6 +25,7 @@
#ifndef SHARE_VM_C1_C1_LIR_HPP
#define SHARE_VM_C1_C1_LIR_HPP
+#include "c1/c1_Defs.hpp"
#include "c1/c1_ValueType.hpp"
#include "oops/method.hpp"
@@ -561,7 +562,13 @@
virtual BasicType type() const { return _type; }
virtual void print_value_on(outputStream* out) const PRODUCT_RETURN;
- void verify() const PRODUCT_RETURN;
+ void verify0() const PRODUCT_RETURN;
+#if defined(LIR_ADDRESS_PD_VERIFY) && !defined(PRODUCT)
+ void pd_verify() const;
+ void verify() const { pd_verify(); }
+#else
+ void verify() const { verify0(); }
+#endif
static Scale scale(BasicType type);
};
@@ -610,7 +617,7 @@
LIR_OprDesc::float_type |
LIR_OprDesc::fpu_register |
LIR_OprDesc::single_size); }
-#if defined(ARM)
+#if defined(ARM32)
static LIR_Opr double_fpu(int reg1, int reg2) { return (LIR_Opr)((reg1 << LIR_OprDesc::reg1_shift) | (reg2 << LIR_OprDesc::reg2_shift) | LIR_OprDesc::double_type | LIR_OprDesc::fpu_register | LIR_OprDesc::double_size); }
static LIR_Opr single_softfp(int reg) { return (LIR_Opr)((reg << LIR_OprDesc::reg1_shift) | LIR_OprDesc::float_type | LIR_OprDesc::cpu_register | LIR_OprDesc::single_size); }
static LIR_Opr double_softfp(int reg1, int reg2) { return (LIR_Opr)((reg1 << LIR_OprDesc::reg1_shift) | (reg2 << LIR_OprDesc::reg2_shift) | LIR_OprDesc::double_type | LIR_OprDesc::cpu_register | LIR_OprDesc::double_size); }
--- a/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp Fri Mar 13 09:18:28 2015 -0700
@@ -23,6 +23,7 @@
*/
#include "precompiled.hpp"
+#include "c1/c1_Defs.hpp"
#include "c1/c1_Compilation.hpp"
#include "c1/c1_FrameMap.hpp"
#include "c1/c1_Instruction.hpp"
@@ -49,10 +50,7 @@
#define __ gen()->lir()->
#endif
-// TODO: ARM - Use some recognizable constant which still fits architectural constraints
-#ifdef ARM
-#define PATCHED_ADDR (204)
-#else
+#ifndef PATCHED_ADDR
#define PATCHED_ADDR (max_jint)
#endif
@@ -1600,24 +1598,9 @@
}
assert(addr->is_register(), "must be a register at this point");
-#ifdef ARM
- // TODO: ARM - move to platform-dependent code
- LIR_Opr tmp = FrameMap::R14_opr;
- if (VM_Version::supports_movw()) {
- __ move((LIR_Opr)card_table_base, tmp);
- } else {
- __ move(new LIR_Address(FrameMap::Rthread_opr, in_bytes(JavaThread::card_table_base_offset()), T_ADDRESS), tmp);
- }
-
- LIR_Address *card_addr = new LIR_Address(tmp, addr, (LIR_Address::Scale) -CardTableModRefBS::card_shift, 0, T_BYTE);
- if(((int)ct->byte_map_base & 0xff) == 0) {
- __ move(tmp, card_addr);
- } else {
- LIR_Opr tmp_zero = new_register(T_INT);
- __ move(LIR_OprFact::intConst(0), tmp_zero);
- __ move(tmp_zero, card_addr);
- }
-#else // ARM
+#ifdef CARDTABLEMODREF_POST_BARRIER_HELPER
+ CardTableModRef_post_barrier_helper(addr, card_table_base);
+#else
LIR_Opr tmp = new_pointer_register();
if (TwoOperandLIRForm) {
__ move(addr, tmp);
@@ -1633,7 +1616,7 @@
new LIR_Address(tmp, load_constant(card_table_base),
T_BYTE));
}
-#endif // ARM
+#endif
}
@@ -2123,7 +2106,7 @@
} else {
#ifdef X86
addr = new LIR_Address(base_op, index_op, LIR_Address::Scale(log2_scale), 0, dst_type);
-#elif defined(ARM)
+#elif defined(GENERATE_ADDRESS_IS_PREFERRED)
addr = generate_address(base_op, index_op, log2_scale, 0, dst_type);
#else
if (index_op->is_illegal() || log2_scale == 0) {
@@ -2177,6 +2160,9 @@
LIR_Opr base_op = base.result();
LIR_Opr index_op = idx.result();
+#ifdef GENERATE_ADDRESS_IS_PREFERRED
+ LIR_Address* addr = generate_address(base_op, index_op, log2_scale, 0, x->basic_type());
+#else
#ifndef _LP64
if (base_op->type() == T_LONG) {
base_op = new_register(T_INT);
@@ -2210,6 +2196,7 @@
}
LIR_Address* addr = new LIR_Address(base_op, index_op, x->basic_type());
+#endif // !GENERATE_ADDRESS_IS_PREFERRED
__ move(value.result(), addr);
}
--- a/hotspot/src/share/vm/c1/c1_LIRGenerator.hpp Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/src/share/vm/c1/c1_LIRGenerator.hpp Fri Mar 13 09:18:28 2015 -0700
@@ -275,6 +275,9 @@
void G1SATBCardTableModRef_post_barrier(LIR_OprDesc* addr, LIR_OprDesc* new_val);
void CardTableModRef_post_barrier(LIR_OprDesc* addr, LIR_OprDesc* new_val);
+#ifdef CARDTABLEMODREF_POST_BARRIER_HELPER
+ void CardTableModRef_post_barrier_helper(LIR_OprDesc* addr, LIR_Const* card_table_base);
+#endif
static LIR_Opr result_register_for(ValueType* type, bool callee = false);
@@ -546,6 +549,10 @@
#ifdef ASSERT
virtual void do_Assert (Assert* x);
#endif
+
+#ifdef C1_LIRGENERATOR_MD_HPP
+#include C1_LIRGENERATOR_MD_HPP
+#endif
};
--- a/hotspot/src/share/vm/c1/c1_LinearScan.cpp Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/src/share/vm/c1/c1_LinearScan.cpp Fri Mar 13 09:18:28 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -2123,7 +2123,7 @@
assert(interval->assigned_regHi() >= pd_first_fpu_reg && interval->assigned_regHi() <= pd_last_fpu_reg, "no fpu register");
assert(assigned_reg % 2 == 0 && assigned_reg + 1 == interval->assigned_regHi(), "must be sequential and even");
LIR_Opr result = LIR_OprFact::double_fpu(interval->assigned_regHi() - pd_first_fpu_reg, assigned_reg - pd_first_fpu_reg);
-#elif defined(ARM)
+#elif defined(ARM32)
assert(assigned_reg >= pd_first_fpu_reg && assigned_reg <= pd_last_fpu_reg, "no fpu register");
assert(interval->assigned_regHi() >= pd_first_fpu_reg && interval->assigned_regHi() <= pd_last_fpu_reg, "no fpu register");
assert(assigned_reg % 2 == 0 && assigned_reg + 1 == interval->assigned_regHi(), "must be sequential and even");
@@ -2712,7 +2712,7 @@
#ifdef SPARC
assert(opr->fpu_regnrLo() == opr->fpu_regnrHi() + 1, "assumed in calculation (only fpu_regnrHi is used)");
#endif
-#ifdef ARM
+#ifdef ARM32
assert(opr->fpu_regnrHi() == opr->fpu_regnrLo() + 1, "assumed in calculation (only fpu_regnrLo is used)");
#endif
#ifdef PPC
--- a/hotspot/src/share/vm/c1/c1_Runtime1.cpp Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/src/share/vm/c1/c1_Runtime1.cpp Fri Mar 13 09:18:28 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -1120,7 +1120,7 @@
#ifdef ARM
if((load_klass_or_mirror_patch_id ||
stub_id == Runtime1::load_appendix_patching_id) &&
- !VM_Version::supports_movw()) {
+ nativeMovConstReg_at(copy_buff)->is_pc_relative()) {
nmethod* nm = CodeCache::find_nmethod(instr_pc);
address addr = NULL;
assert(nm != NULL, "invalid nmethod_pc");
--- a/hotspot/src/share/vm/classfile/classLoaderData.cpp Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/src/share/vm/classfile/classLoaderData.cpp Fri Mar 13 09:18:28 2015 -0700
@@ -902,7 +902,7 @@
}
Klass* ClassLoaderDataGraphKlassIteratorAtomic::next_klass() {
- Klass* head = (Klass*)_next_klass;
+ Klass* head = _next_klass;
while (head != NULL) {
Klass* next = next_klass_in_cldg(head);
--- a/hotspot/src/share/vm/classfile/classLoaderData.hpp Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/src/share/vm/classfile/classLoaderData.hpp Fri Mar 13 09:18:28 2015 -0700
@@ -315,7 +315,7 @@
// An iterator that distributes Klasses to parallel worker threads.
class ClassLoaderDataGraphKlassIteratorAtomic : public StackObj {
- volatile Klass* _next_klass;
+ Klass* volatile _next_klass;
public:
ClassLoaderDataGraphKlassIteratorAtomic();
Klass* next_klass();
--- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp Fri Mar 13 09:18:28 2015 -0700
@@ -549,7 +549,7 @@
FLAG_SET_DEFAULT(ConcGCThreads, (ParallelGCThreads + 3)/4);
}
if (ConcGCThreads > 1) {
- _conc_workers = new YieldingFlexibleWorkGang("Parallel CMS Threads",
+ _conc_workers = new YieldingFlexibleWorkGang("CMS Thread",
ConcGCThreads, true);
if (_conc_workers == NULL) {
warning("GC/CMS: _conc_workers allocation failure: "
--- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.cpp Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.cpp Fri Mar 13 09:18:28 2015 -0700
@@ -65,7 +65,7 @@
assert(_collector == NULL, "Collector already set");
_collector = collector;
- set_name("Concurrent Mark-Sweep GC Thread");
+ set_name("CMS Main Thread");
if (os::create_thread(this, os::cgc_thread)) {
// An old comment here said: "Priority should be just less
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentG1RefineThread.cpp Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentG1RefineThread.cpp Fri Mar 13 09:18:28 2015 -0700
@@ -61,7 +61,7 @@
create_and_start();
// set name
- set_name("G1 Concurrent Refinement Thread#%d", worker_id);
+ set_name("G1 Refine#%d", worker_id);
}
void ConcurrentG1RefineThread::initialize() {
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp Fri Mar 13 09:18:28 2015 -0700
@@ -687,7 +687,7 @@
gclog_or_tty->print_cr("CL Sleep Factor %1.4lf", cleanup_sleep_factor());
#endif
- _parallel_workers = new FlexibleWorkGang("G1 Parallel Marking Threads",
+ _parallel_workers = new FlexibleWorkGang("G1 Marker",
_max_parallel_marking_threads, false, true);
if (_parallel_workers == NULL) {
vm_exit_during_initialization("Failed necessary allocation.");
@@ -3561,6 +3561,15 @@
_termination_start_time_ms = 0.0;
#if _MARKING_STATS_
+ _aborted = 0;
+ _aborted_overflow = 0;
+ _aborted_cm_aborted = 0;
+ _aborted_yield = 0;
+ _aborted_timed_out = 0;
+ _aborted_satb = 0;
+ _aborted_termination = 0;
+ _steal_attempts = 0;
+ _steals = 0;
_local_pushes = 0;
_local_pops = 0;
_local_max_size = 0;
@@ -3573,15 +3582,6 @@
_regions_claimed = 0;
_objs_found_on_bitmap = 0;
_satb_buffers_processed = 0;
- _steal_attempts = 0;
- _steals = 0;
- _aborted = 0;
- _aborted_overflow = 0;
- _aborted_cm_aborted = 0;
- _aborted_yield = 0;
- _aborted_timed_out = 0;
- _aborted_satb = 0;
- _aborted_termination = 0;
#endif // _MARKING_STATS_
}
@@ -3742,7 +3742,7 @@
gclog_or_tty->print_cr("[%u] pushed %d entries to the global stack",
_worker_id, n);
}
- statsOnly( int tmp_size = _cm->mark_stack_size();
+ statsOnly( size_t tmp_size = _cm->mark_stack_size();
if (tmp_size > _global_max_size) {
_global_max_size = tmp_size;
}
@@ -3777,7 +3777,7 @@
assert(success, "invariant");
}
- statsOnly( int tmp_size = _task_queue->size();
+ statsOnly( size_t tmp_size = (size_t)_task_queue->size();
if (tmp_size > _local_max_size) {
_local_max_size = tmp_size;
}
@@ -3934,24 +3934,24 @@
gclog_or_tty->print_cr(" max = %1.2lfms, total = %1.2lfms",
_all_clock_intervals_ms.maximum(),
_all_clock_intervals_ms.sum());
- gclog_or_tty->print_cr(" Clock Causes (cum): scanning = %d, marking = %d",
+ gclog_or_tty->print_cr(" Clock Causes (cum): scanning = " SIZE_FORMAT ", marking = " SIZE_FORMAT,
_clock_due_to_scanning, _clock_due_to_marking);
- gclog_or_tty->print_cr(" Objects: scanned = %d, found on the bitmap = %d",
+ gclog_or_tty->print_cr(" Objects: scanned = " SIZE_FORMAT ", found on the bitmap = " SIZE_FORMAT,
_objs_scanned, _objs_found_on_bitmap);
- gclog_or_tty->print_cr(" Local Queue: pushes = %d, pops = %d, max size = %d",
+ gclog_or_tty->print_cr(" Local Queue: pushes = " SIZE_FORMAT ", pops = " SIZE_FORMAT ", max size = " SIZE_FORMAT,
_local_pushes, _local_pops, _local_max_size);
- gclog_or_tty->print_cr(" Global Stack: pushes = %d, pops = %d, max size = %d",
+ gclog_or_tty->print_cr(" Global Stack: pushes = " SIZE_FORMAT ", pops = " SIZE_FORMAT ", max size = " SIZE_FORMAT,
_global_pushes, _global_pops, _global_max_size);
- gclog_or_tty->print_cr(" transfers to = %d, transfers from = %d",
+ gclog_or_tty->print_cr(" transfers to = " SIZE_FORMAT ", transfers from = " SIZE_FORMAT,
_global_transfers_to,_global_transfers_from);
- gclog_or_tty->print_cr(" Regions: claimed = %d", _regions_claimed);
- gclog_or_tty->print_cr(" SATB buffers: processed = %d", _satb_buffers_processed);
- gclog_or_tty->print_cr(" Steals: attempts = %d, successes = %d",
+ gclog_or_tty->print_cr(" Regions: claimed = " SIZE_FORMAT, _regions_claimed);
+ gclog_or_tty->print_cr(" SATB buffers: processed = " SIZE_FORMAT, _satb_buffers_processed);
+ gclog_or_tty->print_cr(" Steals: attempts = " SIZE_FORMAT ", successes = " SIZE_FORMAT,
_steal_attempts, _steals);
- gclog_or_tty->print_cr(" Aborted: %d, due to", _aborted);
- gclog_or_tty->print_cr(" overflow: %d, global abort: %d, yield: %d",
+ gclog_or_tty->print_cr(" Aborted: " SIZE_FORMAT ", due to", _aborted);
+ gclog_or_tty->print_cr(" overflow: " SIZE_FORMAT ", global abort: " SIZE_FORMAT ", yield: " SIZE_FORMAT,
_aborted_overflow, _aborted_cm_aborted, _aborted_yield);
- gclog_or_tty->print_cr(" time out: %d, SATB: %d, termination: %d",
+ gclog_or_tty->print_cr(" time out: " SIZE_FORMAT ", SATB: " SIZE_FORMAT ", termination: " SIZE_FORMAT,
_aborted_timed_out, _aborted_satb, _aborted_termination);
#endif // _MARKING_STATS_
}
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.hpp Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.hpp Fri Mar 13 09:18:28 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -1039,36 +1039,36 @@
NumberSeq _all_clock_intervals_ms;
double _interval_start_time_ms;
- int _aborted;
- int _aborted_overflow;
- int _aborted_cm_aborted;
- int _aborted_yield;
- int _aborted_timed_out;
- int _aborted_satb;
- int _aborted_termination;
+ size_t _aborted;
+ size_t _aborted_overflow;
+ size_t _aborted_cm_aborted;
+ size_t _aborted_yield;
+ size_t _aborted_timed_out;
+ size_t _aborted_satb;
+ size_t _aborted_termination;
- int _steal_attempts;
- int _steals;
+ size_t _steal_attempts;
+ size_t _steals;
- int _clock_due_to_marking;
- int _clock_due_to_scanning;
+ size_t _clock_due_to_marking;
+ size_t _clock_due_to_scanning;
- int _local_pushes;
- int _local_pops;
- int _local_max_size;
- int _objs_scanned;
+ size_t _local_pushes;
+ size_t _local_pops;
+ size_t _local_max_size;
+ size_t _objs_scanned;
- int _global_pushes;
- int _global_pops;
- int _global_max_size;
+ size_t _global_pushes;
+ size_t _global_pops;
+ size_t _global_max_size;
- int _global_transfers_to;
- int _global_transfers_from;
+ size_t _global_transfers_to;
+ size_t _global_transfers_from;
- int _regions_claimed;
- int _objs_found_on_bitmap;
+ size_t _regions_claimed;
+ size_t _objs_found_on_bitmap;
- int _satb_buffers_processed;
+ size_t _satb_buffers_processed;
#endif // _MARKING_STATS_
// it updates the local fields after this task has claimed
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.inline.hpp Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.inline.hpp Fri Mar 13 09:18:28 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -252,7 +252,7 @@
assert(success, "invariant");
}
- statsOnly( int tmp_size = _task_queue->size();
+ statsOnly( size_t tmp_size = (size_t)_task_queue->size();
if (tmp_size > _local_max_size) {
_local_max_size = tmp_size;
}
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp Fri Mar 13 09:18:28 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -48,7 +48,7 @@
_vtime_accum(0.0),
_vtime_mark_accum(0.0) {
- set_name("G1 Main Concurrent Mark GC Thread");
+ set_name("G1 Main Marker");
create_and_start();
}
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Fri Mar 13 09:18:28 2015 -0700
@@ -3538,7 +3538,7 @@
r->rem_set()->clear_locked();
}
assert(r->rem_set()->is_empty(), "At this point any humongous candidate remembered set must be empty.");
- g1h->register_humongous_region_with_in_cset_fast_test(region_idx);
+ g1h->register_humongous_region_with_cset(region_idx);
_candidate_humongous++;
}
_total_humongous++;
@@ -3552,7 +3552,7 @@
void flush_rem_set_entries() { _dcq.flush(); }
};
-void G1CollectedHeap::register_humongous_regions_with_in_cset_fast_test() {
+void G1CollectedHeap::register_humongous_regions_with_cset() {
if (!G1EagerReclaimHumongousObjects) {
g1_policy()->phase_times()->record_fast_reclaim_humongous_stats(0.0, 0, 0);
return;
@@ -3859,7 +3859,7 @@
g1_policy()->finalize_cset(target_pause_time_ms, evacuation_info);
- register_humongous_regions_with_in_cset_fast_test();
+ register_humongous_regions_with_cset();
assert(check_cset_fast_test(), "Inconsistency in the InCSetState table.");
@@ -6077,7 +6077,7 @@
HeapRegion* next = cur->next_in_collection_set();
assert(cur->in_collection_set(), "bad CS");
cur->set_next_in_collection_set(NULL);
- cur->set_in_collection_set(false);
+ clear_in_cset(cur);
if (cur->is_young()) {
int index = cur->young_index_in_cset();
@@ -6303,7 +6303,7 @@
HeapRegion* next = cur->next_in_collection_set();
assert(cur->in_collection_set(), "bad CS");
cur->set_next_in_collection_set(NULL);
- cur->set_in_collection_set(false);
+ clear_in_cset(cur);
cur->set_young_index_in_cset(-1);
cur = next;
}
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp Fri Mar 13 09:18:28 2015 -0700
@@ -110,6 +110,7 @@
void empty_list();
bool is_empty() { return _length == 0; }
uint length() { return _length; }
+ uint eden_length() { return length() - survivor_length(); }
uint survivor_length() { return _survivor_length; }
// Currently we do not keep track of the used byte sum for the
@@ -119,7 +120,7 @@
// we'll report the more accurate information then.
size_t eden_used_bytes() {
assert(length() >= survivor_length(), "invariant");
- return (size_t) (length() - survivor_length()) * HeapRegion::GrainBytes;
+ return (size_t) eden_length() * HeapRegion::GrainBytes;
}
size_t survivor_used_bytes() {
return (size_t) survivor_length() * HeapRegion::GrainBytes;
@@ -644,23 +645,21 @@
// is considered a candidate for eager reclamation.
bool humongous_region_is_candidate(uint index);
// Register the given region to be part of the collection set.
- inline void register_humongous_region_with_in_cset_fast_test(uint index);
+ inline void register_humongous_region_with_cset(uint index);
// Register regions with humongous objects (actually on the start region) in
// the in_cset_fast_test table.
- void register_humongous_regions_with_in_cset_fast_test();
+ void register_humongous_regions_with_cset();
// We register a region with the fast "in collection set" test. We
// simply set to true the array slot corresponding to this region.
- void register_young_region_with_in_cset_fast_test(HeapRegion* r) {
+ void register_young_region_with_cset(HeapRegion* r) {
_in_cset_fast_test.set_in_young(r->hrm_index());
}
- void register_old_region_with_in_cset_fast_test(HeapRegion* r) {
+ void register_old_region_with_cset(HeapRegion* r) {
_in_cset_fast_test.set_in_old(r->hrm_index());
}
-
- // This is a fast test on whether a reference points into the
- // collection set or not. Assume that the reference
- // points into the heap.
- inline bool in_cset_fast_test(oop obj);
+ void clear_in_cset(const HeapRegion* hr) {
+ _in_cset_fast_test.clear(hr);
+ }
void clear_cset_fast_test() {
_in_cset_fast_test.clear();
@@ -1245,6 +1244,7 @@
// set. Slow implementation.
inline bool obj_in_cs(oop obj);
+ inline bool is_in_cset(const HeapRegion *hr);
inline bool is_in_cset(oop obj);
inline bool is_in_cset_or_humongous(const oop obj);
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp Fri Mar 13 09:18:28 2015 -0700
@@ -234,6 +234,10 @@
return ret;
}
+bool G1CollectedHeap::is_in_cset(const HeapRegion* hr) {
+ return _in_cset_fast_test.is_in_cset(hr);
+}
+
bool G1CollectedHeap::is_in_cset_or_humongous(const oop obj) {
return _in_cset_fast_test.is_in_cset_or_humongous((HeapWord*)obj);
}
@@ -242,7 +246,7 @@
return _in_cset_fast_test.at((HeapWord*)obj);
}
-void G1CollectedHeap::register_humongous_region_with_in_cset_fast_test(uint index) {
+void G1CollectedHeap::register_humongous_region_with_cset(uint index) {
_in_cset_fast_test.set_humongous(index);
}
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp Fri Mar 13 09:18:28 2015 -0700
@@ -537,15 +537,12 @@
// This is how many young regions we already have (currently: the survivors).
uint base_min_length = recorded_survivor_regions();
- // This is the absolute minimum young length, which ensures that we
- // can allocate one eden region in the worst-case.
- uint absolute_min_length = base_min_length + 1;
- uint desired_min_length =
- calculate_young_list_desired_min_length(base_min_length);
- if (desired_min_length < absolute_min_length) {
- desired_min_length = absolute_min_length;
- }
-
+ uint desired_min_length = calculate_young_list_desired_min_length(base_min_length);
+ // This is the absolute minimum young length. Ensure that we
+ // will at least have one eden region available for allocation.
+ uint absolute_min_length = base_min_length + MAX2(_g1->young_list()->eden_length(), (uint)1);
+ // If we shrank the young list target it should not shrink below the current size.
+ desired_min_length = MAX2(desired_min_length, absolute_min_length);
// Calculate the absolute and desired max bounds.
// We will try our best not to "eat" into the reserve.
@@ -1610,11 +1607,10 @@
assert(hr->is_old(), "the region should be old");
assert(!hr->in_collection_set(), "should not already be in the CSet");
- hr->set_in_collection_set(true);
+ _g1->register_old_region_with_cset(hr);
hr->set_next_in_collection_set(_collection_set);
_collection_set = hr;
_collection_set_bytes_used_before += hr->used();
- _g1->register_old_region_with_in_cset_fast_test(hr);
size_t rs_length = hr->rem_set()->occupied();
_recorded_rs_lengths += rs_length;
_old_cset_region_length += 1;
@@ -1744,10 +1740,8 @@
_inc_cset_max_finger = MAX2(_inc_cset_max_finger, hr_end);
assert(!hr->in_collection_set(), "invariant");
- hr->set_in_collection_set(true);
- assert( hr->next_in_collection_set() == NULL, "invariant");
-
- _g1->register_young_region_with_in_cset_fast_test(hr);
+ _g1->register_young_region_with_cset(hr);
+ assert(hr->next_in_collection_set() == NULL, "invariant");
}
// Add the region at the RHS of the incremental cset
@@ -1925,7 +1919,7 @@
// [Newly Young Regions ++ Survivors from last pause].
uint survivor_region_length = young_list->survivor_length();
- uint eden_region_length = young_list->length() - survivor_region_length;
+ uint eden_region_length = young_list->eden_length();
init_cset_region_lengths(eden_region_length, survivor_region_length);
HeapRegion* hr = young_list->first_survivor_region();
--- a/hotspot/src/share/vm/gc_implementation/g1/g1InCSetState.hpp Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1InCSetState.hpp Fri Mar 13 09:18:28 2015 -0700
@@ -25,6 +25,7 @@
#ifndef SHARE_VM_GC_IMPLEMENTATION_G1_G1INCSETSTATE_HPP
#define SHARE_VM_GC_IMPLEMENTATION_G1_G1INCSETSTATE_HPP
+#include "gc_implementation/g1/heapRegion.hpp"
#include "gc_implementation/g1/g1BiasedArray.hpp"
#include "memory/allocation.hpp"
@@ -125,8 +126,10 @@
bool is_in_cset_or_humongous(HeapWord* addr) const { return at(addr).is_in_cset_or_humongous(); }
bool is_in_cset(HeapWord* addr) const { return at(addr).is_in_cset(); }
+ bool is_in_cset(const HeapRegion* hr) const { return get_by_index(hr->hrm_index()).is_in_cset(); }
InCSetState at(HeapWord* addr) const { return get_by_address(addr); }
void clear() { G1BiasedMappedArray<InCSetState>::clear(); }
+ void clear(const HeapRegion* hr) { return set_by_index(hr->hrm_index(), InCSetState::NotInCSet); }
};
#endif // SHARE_VM_GC_IMPLEMENTATION_G1_G1INCSETSTATE_HPP
--- a/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupThread.cpp Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupThread.cpp Fri Mar 13 09:18:28 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 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
@@ -34,7 +34,7 @@
G1StringDedupThread::G1StringDedupThread() :
ConcurrentGCThread() {
- set_name("String Deduplication Thread");
+ set_name("G1 StrDedup");
create_and_start();
}
--- a/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp Fri Mar 13 09:18:28 2015 -0700
@@ -162,7 +162,7 @@
"we should have already filtered out humongous regions");
assert(_end == orig_end(),
"we should have already filtered out humongous regions");
- assert(!_in_collection_set,
+ assert(!in_collection_set(),
err_msg("Should not clear heap region %u in the collection set", hrm_index()));
set_allocation_context(AllocationContext::system());
@@ -262,7 +262,6 @@
_hrm_index(hrm_index),
_allocation_context(AllocationContext::system()),
_humongous_start_region(NULL),
- _in_collection_set(false),
_next_in_special_set(NULL),
_evacuation_failed(false),
_prev_marked_bytes(0), _next_marked_bytes(0), _gc_efficiency(0.0),
--- a/hotspot/src/share/vm/gc_implementation/g1/heapRegion.hpp Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegion.hpp Fri Mar 13 09:18:28 2015 -0700
@@ -236,8 +236,6 @@
// For a humongous region, region in which it starts.
HeapRegion* _humongous_start_region;
- // True iff the region is in current collection_set.
- bool _in_collection_set;
// True iff an attempt to evacuate an object in the region failed.
bool _evacuation_failed;
@@ -487,13 +485,8 @@
return _rem_set;
}
- // True iff the region is in current collection_set.
- bool in_collection_set() const {
- return _in_collection_set;
- }
- void set_in_collection_set(bool b) {
- _in_collection_set = b;
- }
+ bool in_collection_set() const;
+
HeapRegion* next_in_collection_set() {
assert(in_collection_set(), "should only invoke on member of CS.");
assert(_next_in_special_set == NULL ||
--- a/hotspot/src/share/vm/gc_implementation/g1/heapRegion.inline.hpp Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegion.inline.hpp Fri Mar 13 09:18:28 2015 -0700
@@ -196,4 +196,8 @@
}
}
+inline bool HeapRegion::in_collection_set() const {
+ return G1CollectedHeap::heap()->is_in_cset(this);
+}
+
#endif // SHARE_VM_GC_IMPLEMENTATION_G1_HEAPREGION_INLINE_HPP
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/gcTaskThread.cpp Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/gcTaskThread.cpp Fri Mar 13 09:18:28 2015 -0700
@@ -53,7 +53,7 @@
guarantee(_time_stamps != NULL, "Sanity");
}
set_id(which);
- set_name("GC task thread#%d (ParallelGC)", which);
+ set_name("ParGC Thread#%d", which);
}
GCTaskThread::~GCTaskThread() {
--- a/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp Fri Mar 13 09:18:28 2015 -0700
@@ -34,6 +34,7 @@
#include "memory/resourceArea.hpp"
#include "oops/methodCounters.hpp"
#include "oops/objArrayKlass.hpp"
+#include "oops/objArrayOop.inline.hpp"
#include "oops/oop.inline.hpp"
#include "prims/jvmtiExport.hpp"
#include "prims/jvmtiThreadState.hpp"
--- a/hotspot/src/share/vm/interpreter/interp_masm.hpp Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/src/share/vm/interpreter/interp_masm.hpp Fri Mar 13 09:18:28 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 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
@@ -27,25 +27,17 @@
#include "asm/macroAssembler.hpp"
-#ifdef TARGET_ARCH_x86
+#if defined INTERP_MASM_MD_HPP
+# include INTERP_MASM_MD_HPP
+#elif defined TARGET_ARCH_x86
# include "interp_masm_x86.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_sparc
+#elif defined TARGET_ARCH_MODEL_sparc
# include "interp_masm_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_zero
+#elif defined TARGET_ARCH_MODEL_zero
# include "interp_masm_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_arm
-# include "interp_masm_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_32
-# include "interp_masm_ppc_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_64
+#elif defined TARGET_ARCH_MODEL_ppc_64
# include "interp_masm_ppc_64.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_aarch64
+#elif defined TARGET_ARCH_MODEL_aarch64
# include "interp_masm_aarch64.hpp"
#endif
--- a/hotspot/src/share/vm/interpreter/templateTable.hpp Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/src/share/vm/interpreter/templateTable.hpp Fri Mar 13 09:18:28 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -341,28 +341,19 @@
static Template* template_for_wide(Bytecodes::Code code) { Bytecodes::wide_check(code); return &_template_table_wide[code]; }
// Platform specifics
-#ifdef TARGET_ARCH_MODEL_x86_32
+#if defined TEMPLATETABLE_MD_HPP
+# include TEMPLATETABLE_MD_HPP
+#elif defined TARGET_ARCH_MODEL_x86_32
# include "templateTable_x86_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_x86_64
+#elif defined TARGET_ARCH_MODEL_x86_64
# include "templateTable_x86_64.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_sparc
+#elif defined TARGET_ARCH_MODEL_sparc
# include "templateTable_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_zero
+#elif defined TARGET_ARCH_MODEL_zero
# include "templateTable_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_arm
-# include "templateTable_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_32
-# include "templateTable_ppc_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_64
+#elif defined TARGET_ARCH_MODEL_ppc_64
# include "templateTable_ppc_64.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_aarch64
+#elif defined TARGET_ARCH_MODEL_aarch64
# include "templateTable_aarch64.hpp"
#endif
--- a/hotspot/src/share/vm/memory/generation.hpp Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/src/share/vm/memory/generation.hpp Fri Mar 13 09:18:28 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -139,7 +139,7 @@
// GenGrain.
// Note: on ARM we add 1 bit for card_table_base to be properly aligned
// (we expect its low byte to be zero - see implementation of post_barrier)
- LogOfGenGrain = 16 ARM_ONLY(+1),
+ LogOfGenGrain = 16 ARM32_ONLY(+1),
GenGrain = 1 << LogOfGenGrain
};
--- a/hotspot/src/share/vm/memory/sharedHeap.cpp Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/src/share/vm/memory/sharedHeap.cpp Fri Mar 13 09:18:28 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 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
@@ -68,7 +68,7 @@
}
_sh = this; // ch is static, should be set only once.
if (UseConcMarkSweepGC || UseG1GC) {
- _workers = new FlexibleWorkGang("Parallel GC Threads", ParallelGCThreads,
+ _workers = new FlexibleWorkGang("GC Thread", ParallelGCThreads,
/* are_GC_task_threads */true,
/* are_ConcurrentGC_threads */false);
if (_workers == NULL) {
--- a/hotspot/src/share/vm/opto/ad.hpp Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/src/share/vm/opto/ad.hpp Fri Mar 13 09:18:28 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 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
@@ -25,28 +25,19 @@
#ifndef SHARE_VM_OPTO_AD_HPP
#define SHARE_VM_OPTO_AD_HPP
-#ifdef TARGET_ARCH_MODEL_x86_32
+#if defined AD_MD_HPP
+# include AD_MD_HPP
+#elif defined TARGET_ARCH_MODEL_x86_32
# include "adfiles/ad_x86_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_x86_64
+#elif defined TARGET_ARCH_MODEL_x86_64
# include "adfiles/ad_x86_64.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_sparc
+#elif defined TARGET_ARCH_MODEL_sparc
# include "adfiles/ad_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_zero
+#elif defined TARGET_ARCH_MODEL_zero
# include "adfiles/ad_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_arm
-# include "adfiles/ad_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_32
-# include "adfiles/ad_ppc_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_64
+#elif defined TARGET_ARCH_MODEL_ppc_64
# include "adfiles/ad_ppc_64.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_aarch64
+#elif defined TARGET_ARCH_MODEL_aarch64
# include "adfiles/ad_aarch64.hpp"
#endif
--- a/hotspot/src/share/vm/opto/chaitin.cpp Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/src/share/vm/opto/chaitin.cpp Fri Mar 13 09:18:28 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 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
@@ -847,7 +847,7 @@
case Op_RegD:
lrg.set_num_regs(2);
// Define platform specific register pressure
-#if defined(SPARC) || defined(ARM)
+#if defined(SPARC) || defined(ARM32)
lrg.set_reg_pressure(2);
#elif defined(IA32)
if( ireg == Op_RegL ) {
--- a/hotspot/src/share/vm/opto/optoreg.hpp Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/src/share/vm/opto/optoreg.hpp Fri Mar 13 09:18:28 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 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
@@ -27,28 +27,19 @@
// AdGlobals contains c2 specific register handling code as specified
// in the .ad files.
-#ifdef TARGET_ARCH_MODEL_x86_32
+#if defined ADGLOBALS_MD_HPP
+# include ADGLOBALS_MD_HPP
+#elif defined TARGET_ARCH_MODEL_x86_32
# include "adfiles/adGlobals_x86_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_x86_64
+#elif defined TARGET_ARCH_MODEL_x86_64
# include "adfiles/adGlobals_x86_64.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_sparc
+#elif defined TARGET_ARCH_MODEL_sparc
# include "adfiles/adGlobals_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_zero
+#elif defined TARGET_ARCH_MODEL_zero
# include "adfiles/adGlobals_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_arm
-# include "adfiles/adGlobals_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_32
-# include "adfiles/adGlobals_ppc_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_64
+#elif defined TARGET_ARCH_MODEL_ppc_64
# include "adfiles/adGlobals_ppc_64.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_aarch64
+#elif defined TARGET_ARCH_MODEL_aarch64
# include "adfiles/adGlobals_aarch64.hpp"
#endif
--- a/hotspot/src/share/vm/prims/whitebox.cpp Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/src/share/vm/prims/whitebox.cpp Fri Mar 13 09:18:28 2015 -0700
@@ -1129,6 +1129,75 @@
VMThread::execute(&force_safepoint_op);
WB_END
+template <typename T>
+static bool GetMethodOption(JavaThread* thread, JNIEnv* env, jobject method, jstring name, T* value) {
+ assert(value != NULL, "sanity");
+ if (method == NULL || name == NULL) {
+ return false;
+ }
+ jmethodID jmid = reflected_method_to_jmid(thread, env, method);
+ CHECK_JNI_EXCEPTION_(env, false);
+ methodHandle mh(thread, Method::checked_resolve_jmethod_id(jmid));
+ // can't be in VM when we call JNI
+ ThreadToNativeFromVM ttnfv(thread);
+ const char* flag_name = env->GetStringUTFChars(name, NULL);
+ bool result = CompilerOracle::has_option_value(mh, flag_name, *value);
+ env->ReleaseStringUTFChars(name, flag_name);
+ return result;
+}
+
+WB_ENTRY(jobject, WB_GetMethodBooleaneOption(JNIEnv* env, jobject wb, jobject method, jstring name))
+ bool result;
+ if (GetMethodOption<bool> (thread, env, method, name, &result)) {
+ // can't be in VM when we call JNI
+ ThreadToNativeFromVM ttnfv(thread);
+ return booleanBox(thread, env, result);
+ }
+ return NULL;
+WB_END
+
+WB_ENTRY(jobject, WB_GetMethodIntxOption(JNIEnv* env, jobject wb, jobject method, jstring name))
+ intx result;
+ if (GetMethodOption <intx> (thread, env, method, name, &result)) {
+ // can't be in VM when we call JNI
+ ThreadToNativeFromVM ttnfv(thread);
+ return longBox(thread, env, result);
+ }
+ return NULL;
+WB_END
+
+WB_ENTRY(jobject, WB_GetMethodUintxOption(JNIEnv* env, jobject wb, jobject method, jstring name))
+ uintx result;
+ if (GetMethodOption <uintx> (thread, env, method, name, &result)) {
+ // can't be in VM when we call JNI
+ ThreadToNativeFromVM ttnfv(thread);
+ return longBox(thread, env, result);
+ }
+ return NULL;
+WB_END
+
+WB_ENTRY(jobject, WB_GetMethodDoubleOption(JNIEnv* env, jobject wb, jobject method, jstring name))
+ double result;
+ if (GetMethodOption <double> (thread, env, method, name, &result)) {
+ // can't be in VM when we call JNI
+ ThreadToNativeFromVM ttnfv(thread);
+ return doubleBox(thread, env, result);
+ }
+ return NULL;
+WB_END
+
+WB_ENTRY(jobject, WB_GetMethodStringOption(JNIEnv* env, jobject wb, jobject method, jstring name))
+ ccstr ccstrResult;
+ if (GetMethodOption <ccstr> (thread, env, method, name, &ccstrResult)) {
+ // can't be in VM when we call JNI
+ ThreadToNativeFromVM ttnfv(thread);
+ jstring result = env->NewStringUTF(ccstrResult);
+ CHECK_JNI_EXCEPTION_(env, NULL);
+ return result;
+ }
+ return NULL;
+WB_END
+
//Some convenience methods to deal with objects from java
int WhiteBox::offset_for_field(const char* field_name, oop object,
Symbol* signature_symbol) {
@@ -1328,6 +1397,21 @@
{CC"assertMatchingSafepointCalls", CC"(ZZ)V", (void*)&WB_AssertMatchingSafepointCalls },
{CC"isMonitorInflated", CC"(Ljava/lang/Object;)Z", (void*)&WB_IsMonitorInflated },
{CC"forceSafepoint", CC"()V", (void*)&WB_ForceSafepoint },
+ {CC"getMethodBooleanOption",
+ CC"(Ljava/lang/reflect/Executable;Ljava/lang/String;)Ljava/lang/Boolean;",
+ (void*)&WB_GetMethodBooleaneOption},
+ {CC"getMethodIntxOption",
+ CC"(Ljava/lang/reflect/Executable;Ljava/lang/String;)Ljava/lang/Long;",
+ (void*)&WB_GetMethodIntxOption},
+ {CC"getMethodUintxOption",
+ CC"(Ljava/lang/reflect/Executable;Ljava/lang/String;)Ljava/lang/Long;",
+ (void*)&WB_GetMethodUintxOption},
+ {CC"getMethodDoubleOption",
+ CC"(Ljava/lang/reflect/Executable;Ljava/lang/String;)Ljava/lang/Double;",
+ (void*)&WB_GetMethodDoubleOption},
+ {CC"getMethodStringOption",
+ CC"(Ljava/lang/reflect/Executable;Ljava/lang/String;)Ljava/lang/String;",
+ (void*)&WB_GetMethodStringOption},
};
#undef CC
--- a/hotspot/src/share/vm/runtime/stubRoutines.hpp Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/src/share/vm/runtime/stubRoutines.hpp Fri Mar 13 09:18:28 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -84,32 +84,22 @@
// Dependencies
friend class StubGenerator;
-#ifdef TARGET_ARCH_MODEL_x86_32
+#if defined STUBROUTINES_MD_HPP
+# include STUBROUTINES_MD_HPP
+#elif defined TARGET_ARCH_MODEL_x86_32
# include "stubRoutines_x86_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_x86_64
+#elif defined TARGET_ARCH_MODEL_x86_64
# include "stubRoutines_x86_64.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_sparc
+#elif defined TARGET_ARCH_MODEL_sparc
# include "stubRoutines_sparc.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_zero
+#elif defined TARGET_ARCH_MODEL_zero
# include "stubRoutines_zero.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_arm
-# include "stubRoutines_arm.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_32
-# include "stubRoutines_ppc_32.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_ppc_64
+#elif defined TARGET_ARCH_MODEL_ppc_64
# include "stubRoutines_ppc_64.hpp"
-#endif
-#ifdef TARGET_ARCH_MODEL_aarch64
+#elif defined TARGET_ARCH_MODEL_aarch64
# include "stubRoutines_aarch64.hpp"
#endif
-
static jint _verify_oop_count;
static address _verify_oop_subroutine_entry;
--- a/hotspot/src/share/vm/runtime/vm_version.cpp Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/src/share/vm/runtime/vm_version.cpp Fri Mar 13 09:18:28 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -187,18 +187,18 @@
AIX_ONLY("aix") \
BSD_ONLY("bsd")
+#ifndef CPU
#ifdef ZERO
#define CPU ZERO_LIBARCH
#else
#define CPU IA32_ONLY("x86") \
IA64_ONLY("ia64") \
AMD64_ONLY("amd64") \
- ARM_ONLY("arm") \
- PPC32_ONLY("ppc") \
PPC64_ONLY("ppc64") \
AARCH64_ONLY("aarch64") \
SPARC_ONLY("sparc")
#endif // ZERO
+#endif
const char *Abstract_VM_Version::vm_platform_string() {
return OS "-" CPU;
@@ -251,12 +251,6 @@
#ifndef FLOAT_ARCH
#if defined(__SOFTFP__)
#define FLOAT_ARCH_STR "-sflt"
- #elif defined(E500V2)
- #define FLOAT_ARCH_STR "-e500v2"
- #elif defined(ARM)
- #define FLOAT_ARCH_STR "-vfp"
- #elif defined(PPC32)
- #define FLOAT_ARCH_STR "-hflt"
#else
#define FLOAT_ARCH_STR ""
#endif
--- a/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp Fri Mar 13 09:18:28 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -220,7 +220,7 @@
#define DEBUG_EXCEPTION ::abort();
-#ifdef ARM
+#ifdef ARM32
#ifdef SOLARIS
#define BREAKPOINT __asm__ volatile (".long 0xe1200070")
#else
--- a/hotspot/src/share/vm/utilities/macros.hpp Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/src/share/vm/utilities/macros.hpp Fri Mar 13 09:18:28 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -392,7 +392,6 @@
#define NOT_E500V2(code) code
#endif
-
#ifdef ARM
#define ARM_ONLY(code) code
#define NOT_ARM(code)
@@ -401,6 +400,14 @@
#define NOT_ARM(code) code
#endif
+#ifdef ARM32
+#define ARM32_ONLY(code) code
+#define NOT_ARM32(code)
+#else
+#define ARM32_ONLY(code)
+#define NOT_ARM32(code) code
+#endif
+
#ifdef AARCH64
#define AARCH64_ONLY(code) code
#define NOT_AARCH64(code)
--- a/hotspot/src/share/vm/utilities/workgroup.cpp Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/src/share/vm/utilities/workgroup.cpp Fri Mar 13 09:18:28 2015 -0700
@@ -236,7 +236,7 @@
GangWorker::GangWorker(AbstractWorkGang* gang, uint id) {
_gang = gang;
set_id(id);
- set_name("Gang worker#%d (%s)", id, gang->name());
+ set_name("%s#%d", gang->name(), id);
}
void GangWorker::run() {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/compiler/oracle/GetMethodOptionTest.java Fri Mar 13 09:18:28 2015 -0700
@@ -0,0 +1,104 @@
+/*
+ * 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.
+ */
+
+import java.lang.reflect.Executable;
+import java.util.function.BiFunction;
+
+import com.oracle.java.testlibrary.Asserts;
+import sun.hotspot.WhiteBox;
+
+/*
+ * @test
+ * @bug 8074980
+ * @library /testlibrary /../../test/lib
+ * @build sun.hotspot.WhiteBox com.oracle.java.testlibrary.Asserts GetMethodOptionTest
+ * @run main ClassFileInstaller sun.hotspot.WhiteBox
+ * sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
+ * -XX:CompileCommand=option,GetMethodOptionTest::test,ccstrlist,MyListOption,_foo,_bar
+ * -XX:CompileCommand=option,GetMethodOptionTest::test,ccstr,MyStrOption,_foo
+ * -XX:CompileCommand=option,GetMethodOptionTest::test,bool,MyBoolOption,false
+ * -XX:CompileCommand=option,GetMethodOptionTest::test,intx,MyIntxOption,-1
+ * -XX:CompileCommand=option,GetMethodOptionTest::test,uintx,MyUintxOption,1
+ * -XX:CompileCommand=option,GetMethodOptionTest::test,MyFlag
+ * -XX:CompileCommand=option,GetMethodOptionTest::test,double,MyDoubleOption1,1.123
+ * -XX:CompileCommand=option,GetMethodOptionTest.test,double,MyDoubleOption2,1.123
+ * -XX:CompileCommand=option,GetMethodOptionTest::test,bool,MyBoolOptionX,false,intx,MyIntxOptionX,-1,uintx,MyUintxOptionX,1,MyFlagX,double,MyDoubleOptionX,1.123
+ * GetMethodOptionTest
+ */
+
+public class GetMethodOptionTest {
+ private static final WhiteBox WB = WhiteBox.getWhiteBox();
+ public static void main(String[] args) {
+ Executable test = getMethod("test");
+ Executable test2 = getMethod("test2");
+ BiFunction<Executable, String, Object> getter = WB::getMethodOption;
+ for (TestCase testCase : TestCase.values()) {
+ Object expected = testCase.value;
+ String name = testCase.name();
+ Asserts.assertEQ(expected, getter.apply(test, name),
+ testCase + ": universal getter returns wrong value");
+ Asserts.assertEQ(expected, testCase.getter.apply(test, name),
+ testCase + ": specific getter returns wrong value");
+ Asserts.assertEQ(null, getter.apply(test2, name),
+ testCase + ": universal getter returns value for unused method");
+ Asserts.assertEQ(null, testCase.getter.apply(test2, name),
+ testCase + ": type specific getter returns value for unused method");
+ }
+ }
+ private static void test() { }
+ private static void test2() { }
+
+ private static enum TestCase {
+ MyListOption("_foo _bar", WB::getMethodStringOption),
+ MyStrOption("_foo", WB::getMethodStringOption),
+ MyBoolOption(false, WB::getMethodBooleanOption),
+ MyIntxOption(-1L, WB::getMethodIntxOption),
+ MyUintxOption(1L, WB::getMethodUintxOption),
+ MyFlag(true, WB::getMethodBooleanOption),
+ MyDoubleOption1(1.123d, WB::getMethodDoubleOption),
+ MyDoubleOption2(1.123d, WB::getMethodDoubleOption),
+ MyBoolOptionX(false, WB::getMethodBooleanOption),
+ MyIntxOptionX(-1L, WB::getMethodIntxOption),
+ MyUintxOptionX(1L, WB::getMethodUintxOption),
+ MyFlagX(true, WB::getMethodBooleanOption),
+ MyDoubleOptionX(1.123d, WB::getMethodDoubleOption);
+
+ public final Object value;
+ public final BiFunction<Executable, String, Object> getter;
+ private TestCase(Object value, BiFunction<Executable, String, Object> getter) {
+ this.value = value;
+ this.getter = getter;
+ }
+ }
+
+ private static Executable getMethod(String name) {
+ Executable result;
+ try {
+ result = GetMethodOptionTest.class.getDeclaredMethod(name);
+ } catch (NoSuchMethodException | SecurityException e) {
+ throw new Error("TESTBUG : can't get method " + name, e);
+ }
+ return result;
+ }
+}
--- a/hotspot/test/compiler/whitebox/DeoptimizeFramesTest.java Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/test/compiler/whitebox/DeoptimizeFramesTest.java Fri Mar 13 09:18:28 2015 -0700
@@ -31,11 +31,13 @@
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -Xmixed
* -XX:CompileCommand=compileonly,DeoptimizeFramesTest$TestCaseImpl::method
- * -XX:-DeoptimizeRandom -XX:-DeoptimizeALot DeoptimizeFramesTest true
+ * -XX:+IgnoreUnexpectedVMOptions -XX:-DeoptimizeRandom -XX:-DeoptimizeALot
+ * DeoptimizeFramesTest true
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI -Xmixed
* -XX:CompileCommand=compileonly,DeoptimizeFramesTest$TestCaseImpl::method
- * -XX:-DeoptimizeRandom -XX:-DeoptimizeALot DeoptimizeFramesTest false
+ * -XX:+IgnoreUnexpectedVMOptions -XX:-DeoptimizeRandom -XX:-DeoptimizeALot
+ * DeoptimizeFramesTest false
* @summary testing of WB::deoptimizeFrames()
*/
import java.lang.reflect.Executable;
--- a/hotspot/test/gc/parallelScavenge/TestDynShrinkHeap.java Tue Mar 10 19:56:19 2015 -0700
+++ b/hotspot/test/gc/parallelScavenge/TestDynShrinkHeap.java Fri Mar 13 09:18:28 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 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
@@ -22,7 +22,6 @@
*/
/**
- * @ignore 8019361
* @test TestDynShrinkHeap
* @bug 8016479
* @requires vm.gc=="Parallel" | vm.gc=="null"
@@ -35,7 +34,7 @@
import java.lang.management.MemoryUsage;
import java.util.ArrayList;
import sun.management.ManagementFactoryHelper;
-import static com.oracle.java.testlibrary.Asserts.*;
+import static com.oracle.java.testlibrary.Asserts.assertLessThan;
public class TestDynShrinkHeap {