--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotAgent.java Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotAgent.java Fri Jul 18 11:22:49 2014 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -33,6 +33,7 @@
import sun.jvm.hotspot.debugger.JVMDebugger;
import sun.jvm.hotspot.debugger.MachineDescription;
import sun.jvm.hotspot.debugger.MachineDescriptionAMD64;
+import sun.jvm.hotspot.debugger.MachineDescriptionPPC64;
import sun.jvm.hotspot.debugger.MachineDescriptionIA64;
import sun.jvm.hotspot.debugger.MachineDescriptionIntelX86;
import sun.jvm.hotspot.debugger.MachineDescriptionSPARC32Bit;
@@ -588,6 +589,8 @@
machDesc = new MachineDescriptionIA64();
} else if (cpu.equals("amd64")) {
machDesc = new MachineDescriptionAMD64();
+ } else if (cpu.equals("ppc64")) {
+ machDesc = new MachineDescriptionPPC64();
} else if (cpu.equals("sparc")) {
if (LinuxDebuggerLocal.getAddressSize()==8) {
machDesc = new MachineDescriptionSPARC64Bit();
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/MachineDescriptionPPC64.java Fri Jul 18 11:22:49 2014 -0400
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ */
+
+package sun.jvm.hotspot.debugger;
+
+public class MachineDescriptionPPC64 extends MachineDescriptionTwosComplement implements MachineDescription {
+ public long getAddressSize() {
+ return 8;
+ }
+
+ public boolean isLP64() {
+ return true;
+ }
+
+ public boolean isBigEndian() {
+ return true;
+ }
+}
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/PlatformInfo.java Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/PlatformInfo.java Fri Jul 18 11:22:49 2014 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -61,7 +61,7 @@
return "x86";
} else if (cpu.equals("sparc") || cpu.equals("sparcv9")) {
return "sparc";
- } else if (cpu.equals("ia64") || cpu.equals("amd64") || cpu.equals("x86_64")) {
+ } else if (cpu.equals("ia64") || cpu.equals("amd64") || cpu.equals("x86_64") || cpu.equals("ppc64")) {
return cpu;
} else {
try {
--- a/hotspot/make/jprt.properties Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/make/jprt.properties Fri Jul 18 11:22:49 2014 -0400
@@ -126,7 +126,7 @@
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-jvm98, \
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-jvm98_nontiered, \
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-scimark, \
- ${jprt.my.solaris.sparcv9}-product-c2-runThese, \
+ ${jprt.my.solaris.sparcv9}-product-c2-runThese8, \
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCBasher_SerialGC, \
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCBasher_ParallelGC, \
${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GCBasher_ParNewGC, \
@@ -150,8 +150,9 @@
${jprt.my.solaris.x64}-{product|fastdebug}-c2-jvm98, \
${jprt.my.solaris.x64}-{product|fastdebug}-c2-jvm98_nontiered, \
${jprt.my.solaris.x64}-{product|fastdebug}-c2-scimark, \
- ${jprt.my.solaris.x64}-product-c2-runThese, \
- ${jprt.my.solaris.x64}-product-c2-runThese_Xcomp, \
+ ${jprt.my.solaris.x64}-product-c2-runThese8, \
+ ${jprt.my.solaris.x64}-product-c2-runThese8_Xcomp_lang, \
+ ${jprt.my.solaris.x64}-product-c2-runThese8_Xcomp_vm, \
${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCBasher_SerialGC, \
${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCBasher_ParallelGC, \
${jprt.my.solaris.x64}-{product|fastdebug}-c2-GCBasher_ParNewGC, \
@@ -175,9 +176,11 @@
${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-jvm98, \
${jprt.my.linux.i586}-{product|fastdebug}-c2-jvm98_nontiered, \
${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-scimark, \
- ${jprt.my.linux.i586}-product-c1-runThese_Xcomp, \
- ${jprt.my.linux.i586}-fastdebug-c1-runThese_Xshare, \
- ${jprt.my.linux.i586}-fastdebug-c2-runThese_Xcomp, \
+ ${jprt.my.linux.i586}-product-c1-runThese8_Xcomp_lang, \
+ ${jprt.my.linux.i586}-product-c1-runThese8_Xcomp_vm, \
+ ${jprt.my.linux.i586}-fastdebug-c1-runThese8_Xshare, \
+ ${jprt.my.linux.i586}-fastdebug-c2-runThese8_Xcomp_lang, \
+ ${jprt.my.linux.i586}-fastdebug-c2-runThese8_Xcomp_vm, \
${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC, \
${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC, \
${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParNewGC, \
@@ -243,9 +246,10 @@
${jprt.my.windows.i586}-{product|fastdebug}-{c1|c2}-jvm98, \
${jprt.my.windows.i586}-{product|fastdebug}-c2-jvm98_nontiered, \
${jprt.my.windows.i586}-{product|fastdebug}-{c1|c2}-scimark, \
- ${jprt.my.windows.i586}-product-{c1|c2}-runThese, \
- ${jprt.my.windows.i586}-product-{c1|c2}-runThese_Xcomp, \
- ${jprt.my.windows.i586}-fastdebug-c1-runThese_Xshare, \
+ ${jprt.my.windows.i586}-product-{c1|c2}-runThese8, \
+ ${jprt.my.windows.i586}-product-{c1|c2}-runThese8_Xcomp_lang, \
+ ${jprt.my.windows.i586}-product-{c1|c2}-runThese8_Xcomp_vm, \
+ ${jprt.my.windows.i586}-fastdebug-c1-runThese8_Xshare, \
${jprt.my.windows.i586}-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC, \
${jprt.my.windows.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC, \
${jprt.my.windows.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParNewGC, \
@@ -269,8 +273,9 @@
${jprt.my.windows.x64}-{product|fastdebug}-c2-jvm98, \
${jprt.my.windows.x64}-{product|fastdebug}-c2-jvm98_nontiered, \
${jprt.my.windows.x64}-{product|fastdebug}-c2-scimark, \
- ${jprt.my.windows.x64}-product-c2-runThese, \
- ${jprt.my.windows.x64}-product-c2-runThese_Xcomp, \
+ ${jprt.my.windows.x64}-product-c2-runThese8, \
+ ${jprt.my.windows.x64}-product-c2-runThese8_Xcomp_lang, \
+ ${jprt.my.windows.x64}-product-c2-runThese8_Xcomp_vm, \
${jprt.my.windows.x64}-{product|fastdebug}-c2-GCBasher_SerialGC, \
${jprt.my.windows.x64}-{product|fastdebug}-c2-GCBasher_ParallelGC, \
${jprt.my.windows.x64}-{product|fastdebug}-c2-GCBasher_ParNewGC, \
--- a/hotspot/make/linux/makefiles/defs.make Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/make/linux/makefiles/defs.make Fri Jul 18 11:22:49 2014 -0400
@@ -297,27 +297,23 @@
endif
# Serviceability Binaries
-# No SA Support for PPC, IA64, ARM or zero
-ADD_SA_BINARIES/x86 = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \
- $(EXPORT_LIB_DIR)/sa-jdi.jar
-ADD_SA_BINARIES/sparc = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \
- $(EXPORT_LIB_DIR)/sa-jdi.jar
+
+ADD_SA_BINARIES/DEFAULT = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \
+ $(EXPORT_LIB_DIR)/sa-jdi.jar
+
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
ifeq ($(ZIP_DEBUGINFO_FILES),1)
- ADD_SA_BINARIES/x86 += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz
- ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz
+ ADD_SA_BINARIES/DEFAULT += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz
else
- ADD_SA_BINARIES/x86 += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
- ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
+ ADD_SA_BINARIES/DEFAULT += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
endif
endif
-ADD_SA_BINARIES/ppc =
-ADD_SA_BINARIES/ia64 =
-ADD_SA_BINARIES/arm =
+
+ADD_SA_BINARIES/$(HS_ARCH) = $(ADD_SA_BINARIES/DEFAULT)
+
+# No SA Support for zero
ADD_SA_BINARIES/zero =
-include $(HS_ALT_MAKE)/linux/makefiles/defs.make
EXPORT_LIST += $(ADD_SA_BINARIES/$(HS_ARCH))
-
-
--- a/hotspot/src/cpu/ppc/vm/frame_ppc.cpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/cpu/ppc/vm/frame_ppc.cpp Fri Jul 18 11:22:49 2014 -0400
@@ -154,15 +154,6 @@
}
}
-void frame::pd_gc_epilog() {
- if (is_interpreted_frame()) {
- // Set constant pool cache entry for interpreter.
- Method* m = interpreter_frame_method();
-
- *interpreter_frame_cpoolcache_addr() = m->constants()->cache();
- }
-}
-
bool frame::is_interpreted_frame_valid(JavaThread* thread) const {
// Is there anything to do?
assert(is_interpreted_frame(), "Not an interpreted frame");
--- a/hotspot/src/cpu/ppc/vm/frame_ppc.inline.hpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/cpu/ppc/vm/frame_ppc.inline.hpp Fri Jul 18 11:22:49 2014 -0400
@@ -135,12 +135,12 @@
return (intptr_t**)&istate->_locals;
}
-inline intptr_t* frame::interpreter_frame_bcx_addr() const {
+inline intptr_t* frame::interpreter_frame_bcp_addr() const {
interpreterState istate = get_interpreterState();
return (intptr_t*)&istate->_bcp;
}
-inline intptr_t* frame::interpreter_frame_mdx_addr() const {
+inline intptr_t* frame::interpreter_frame_mdp_addr() const {
interpreterState istate = get_interpreterState();
return (intptr_t*)&istate->_mdx;
}
@@ -210,10 +210,10 @@
inline intptr_t** frame::interpreter_frame_locals_addr() const {
return (intptr_t**) &(get_ijava_state()->locals);
}
-inline intptr_t* frame::interpreter_frame_bcx_addr() const {
+inline intptr_t* frame::interpreter_frame_bcp_addr() const {
return (intptr_t*) &(get_ijava_state()->bcp);
}
-inline intptr_t* frame::interpreter_frame_mdx_addr() const {
+inline intptr_t* frame::interpreter_frame_mdp_addr() const {
return (intptr_t*) &(get_ijava_state()->mdx);
}
// Pointer beyond the "oldest/deepest" BasicObjectLock on stack.
--- a/hotspot/src/cpu/ppc/vm/icache_ppc.cpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/cpu/ppc/vm/icache_ppc.cpp Fri Jul 18 11:22:49 2014 -0400
@@ -68,7 +68,6 @@
}
void ICacheStubGenerator::generate_icache_flush(ICache::flush_icache_stub_t* flush_icache_stub) {
- StubCodeMark mark(this, "ICache", "flush_icache_stub");
*flush_icache_stub = (ICache::flush_icache_stub_t)ICache::ppc64_flush_icache;
--- a/hotspot/src/cpu/ppc/vm/stubGenerator_ppc.cpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/cpu/ppc/vm/stubGenerator_ppc.cpp Fri Jul 18 11:22:49 2014 -0400
@@ -524,8 +524,6 @@
int frame_size_in_bytes = frame::abi_reg_args_size;
OopMap* map = new OopMap(frame_size_in_bytes / sizeof(jint), 0);
- StubCodeMark mark(this, "StubRoutines", "throw_exception");
-
address start = __ pc();
__ save_LR_CR(R11_scratch1);
@@ -846,8 +844,6 @@
//
// Don't generate, rather use C++ code.
address generate_verify_oop() {
- StubCodeMark mark(this, "StubRoutines", "verify_oop");
-
// this is actually a `FunctionDescriptor*'.
address start = 0;
--- a/hotspot/src/cpu/sparc/vm/frame_sparc.cpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/cpu/sparc/vm/frame_sparc.cpp Fri Jul 18 11:22:49 2014 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -594,17 +594,6 @@
return this->fp() == fp;
}
-
-void frame::pd_gc_epilog() {
- if (is_interpreted_frame()) {
- // set constant pool cache entry for interpreter
- Method* m = interpreter_frame_method();
-
- *interpreter_frame_cpoolcache_addr() = m->constants()->cache();
- }
-}
-
-
bool frame::is_interpreted_frame_valid(JavaThread* thread) const {
#ifdef CC_INTERP
// Is there anything to do?
@@ -642,10 +631,10 @@
return false;
}
- // validate bci/bcx
+ // validate bci/bcp
- intptr_t bcx = interpreter_frame_bcx();
- if (m->validate_bci_from_bcx(bcx) < 0) {
+ address bcp = interpreter_frame_bcp();
+ if (m->validate_bci_from_bcp(bcp) < 0) {
return false;
}
--- a/hotspot/src/cpu/sparc/vm/frame_sparc.hpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/cpu/sparc/vm/frame_sparc.hpp Fri Jul 18 11:22:49 2014 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -78,7 +78,6 @@
// Lesp first free element of expression stack
// (which grows towards __higher__ addresses)
// Lbcp is set to address of bytecode to execute
-// It is accessed in the frame under the name "bcx".
// It may at times (during GC) be an index instead.
// Lmethod the method being interpreted
// Llocals the base pointer for accessing the locals array
--- a/hotspot/src/cpu/sparc/vm/frame_sparc.inline.hpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/cpu/sparc/vm/frame_sparc.inline.hpp Fri Jul 18 11:22:49 2014 -0400
@@ -99,12 +99,12 @@
return (intptr_t**) &istate->_locals;
}
-inline intptr_t* frame::interpreter_frame_bcx_addr() const {
+inline intptr_t* frame::interpreter_frame_bcp_addr() const {
interpreterState istate = get_interpreterState();
return (intptr_t*) &istate->_bcp;
}
-inline intptr_t* frame::interpreter_frame_mdx_addr() const {
+inline intptr_t* frame::interpreter_frame_mdp_addr() const {
interpreterState istate = get_interpreterState();
return (intptr_t*) &istate->_mdx;
}
@@ -166,12 +166,11 @@
return (intptr_t**) sp_addr_at( Llocals->sp_offset_in_saved_window());
}
-inline intptr_t* frame::interpreter_frame_bcx_addr() const {
- // %%%%% reinterpreting Lbcp as a bcx
+inline intptr_t* frame::interpreter_frame_bcp_addr() const {
return (intptr_t*) sp_addr_at( Lbcp->sp_offset_in_saved_window());
}
-inline intptr_t* frame::interpreter_frame_mdx_addr() const {
+inline intptr_t* frame::interpreter_frame_mdp_addr() const {
// %%%%% reinterpreting ImethodDataPtr as a mdx
return (intptr_t*) sp_addr_at( ImethodDataPtr->sp_offset_in_saved_window());
}
--- a/hotspot/src/cpu/sparc/vm/macroAssembler_sparc.hpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/cpu/sparc/vm/macroAssembler_sparc.hpp Fri Jul 18 11:22:49 2014 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -186,8 +186,7 @@
// the interpreter to work right
// (These assignments must be compatible with L7_thread_cache; see above.)
-// Since Lbcp points into the middle of the method object,
-// it is temporarily converted into a "bcx" during GC.
+// Lbcp points into the middle of the method object.
// Exception processing
// These registers are passed into exception handlers.
--- a/hotspot/src/cpu/sparc/vm/templateInterpreter_sparc.cpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/cpu/sparc/vm/templateInterpreter_sparc.cpp Fri Jul 18 11:22:49 2014 -0400
@@ -1786,7 +1786,7 @@
__ verify_thread();
// expression stack is undefined here
// O0: exception, i.e. Oexception
- // Lbcp: exception bcx
+ // Lbcp: exception bcp
__ verify_oop(Oexception);
--- a/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp Fri Jul 18 11:22:49 2014 -0400
@@ -251,6 +251,49 @@
// buf is started with ", " or is empty
_features_str = strdup(strlen(buf) > 2 ? buf + 2 : buf);
+ // There are three 64-bit SPARC families that do not overlap, e.g.,
+ // both is_ultra3() and is_sparc64() cannot be true at the same time.
+ // Within these families, there can be more than one chip, e.g.,
+ // is_T4() and is_T7() machines are also is_niagara().
+ if (is_ultra3()) {
+ assert(_L1_data_cache_line_size == 0, "overlap with Ultra3 family");
+ // Ref: UltraSPARC III Cu Processor
+ _L1_data_cache_line_size = 64;
+ }
+ if (is_niagara()) {
+ assert(_L1_data_cache_line_size == 0, "overlap with niagara family");
+ // All Niagara's are sun4v's, but not all sun4v's are Niagaras, e.g.,
+ // Fujitsu SPARC64 is sun4v, but we don't want it in this block.
+ //
+ // Ref: UltraSPARC T1 Supplement to the UltraSPARC Architecture 2005
+ // Appendix F.1.3.1 Cacheable Accesses
+ // -> 16-byte L1 cache line size
+ //
+ // Ref: UltraSPARC T2: A Highly-Threaded, Power-Efficient, SPARC SOC
+ // Section III: SPARC Processor Core
+ // -> 16-byte L1 cache line size
+ //
+ // Ref: Oracle's SPARC T4-1, SPARC T4-2, SPARC T4-4, and SPARC T4-1B Server Architecture
+ // Section SPARC T4 Processor Cache Architecture
+ // -> 32-byte L1 cache line size (no longer see that info on this ref)
+ //
+ // XXX - still need a T7 reference here
+ //
+ if (is_T7()) { // T7 or newer
+ _L1_data_cache_line_size = 64;
+ } else if (is_T4()) { // T4 or newer (until T7)
+ _L1_data_cache_line_size = 32;
+ } else { // T1 or newer (until T4)
+ _L1_data_cache_line_size = 16;
+ }
+ }
+ if (is_sparc64()) {
+ guarantee(_L1_data_cache_line_size == 0, "overlap with SPARC64 family");
+ // Ref: Fujitsu SPARC64 VII Processor
+ // Section 4 Cache System
+ _L1_data_cache_line_size = 64;
+ }
+
// UseVIS is set to the smallest of what hardware supports and what
// the command line requires. I.e., you cannot set UseVIS to 3 on
// older UltraSparc which do not support it.
@@ -356,6 +399,7 @@
#ifndef PRODUCT
if (PrintMiscellaneous && Verbose) {
+ tty->print_cr("L1 data cache line size: %u", L1_data_cache_line_size());
tty->print("Allocation");
if (AllocatePrefetchStyle <= 0) {
tty->print_cr(": no prefetching");
--- a/hotspot/src/cpu/x86/vm/frame_x86.cpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/cpu/x86/vm/frame_x86.cpp Fri Jul 18 11:22:49 2014 -0400
@@ -537,10 +537,6 @@
return _fp == (fp - diff);
}
-void frame::pd_gc_epilog() {
- // nothing done here now
-}
-
bool frame::is_interpreted_frame_valid(JavaThread* thread) const {
// QQQ
#ifdef CC_INTERP
@@ -577,10 +573,10 @@
return false;
}
- // validate bci/bcx
+ // validate bci/bcp
- intptr_t bcx = interpreter_frame_bcx();
- if (m->validate_bci_from_bcx(bcx) < 0) {
+ address bcp = interpreter_frame_bcp();
+ if (m->validate_bci_from_bcp(bcp) < 0) {
return false;
}
@@ -692,10 +688,10 @@
DESCRIBE_FP_OFFSET(interpreter_frame_sender_sp);
DESCRIBE_FP_OFFSET(interpreter_frame_last_sp);
DESCRIBE_FP_OFFSET(interpreter_frame_method);
- DESCRIBE_FP_OFFSET(interpreter_frame_mdx);
+ DESCRIBE_FP_OFFSET(interpreter_frame_mdp);
DESCRIBE_FP_OFFSET(interpreter_frame_cache);
DESCRIBE_FP_OFFSET(interpreter_frame_locals);
- DESCRIBE_FP_OFFSET(interpreter_frame_bcx);
+ DESCRIBE_FP_OFFSET(interpreter_frame_bcp);
DESCRIBE_FP_OFFSET(interpreter_frame_initial_sp);
#endif
}
--- a/hotspot/src/cpu/x86/vm/frame_x86.hpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/cpu/x86/vm/frame_x86.hpp Fri Jul 18 11:22:49 2014 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -40,7 +40,7 @@
// ... | monitor block size
// [monitors ] /
// [monitor block size ]
-// [byte code index/pointr] = bcx() bcx_offset
+// [byte code pointer ] = bcp() bcp_offset
// [pointer to locals ] = locals() locals_offset
// [constant pool cache ] = cache() cache_offset
// [methodData ] = mdp() mdx_offset
@@ -111,11 +111,11 @@
// outgoing sp before a call to an invoked method
interpreter_frame_last_sp_offset = interpreter_frame_sender_sp_offset - 1,
interpreter_frame_method_offset = interpreter_frame_last_sp_offset - 1,
- interpreter_frame_mdx_offset = interpreter_frame_method_offset - 1,
- interpreter_frame_cache_offset = interpreter_frame_mdx_offset - 1,
+ interpreter_frame_mdp_offset = interpreter_frame_method_offset - 1,
+ interpreter_frame_cache_offset = interpreter_frame_mdp_offset - 1,
interpreter_frame_locals_offset = interpreter_frame_cache_offset - 1,
- interpreter_frame_bcx_offset = interpreter_frame_locals_offset - 1,
- interpreter_frame_initial_sp_offset = interpreter_frame_bcx_offset - 1,
+ interpreter_frame_bcp_offset = interpreter_frame_locals_offset - 1,
+ interpreter_frame_initial_sp_offset = interpreter_frame_bcp_offset - 1,
interpreter_frame_monitor_block_top_offset = interpreter_frame_initial_sp_offset,
interpreter_frame_monitor_block_bottom_offset = interpreter_frame_initial_sp_offset,
--- a/hotspot/src/cpu/x86/vm/frame_x86.inline.hpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/cpu/x86/vm/frame_x86.inline.hpp Fri Jul 18 11:22:49 2014 -0400
@@ -169,7 +169,7 @@
return &(get_interpreterState()->_locals);
}
-inline intptr_t* frame::interpreter_frame_bcx_addr() const {
+inline intptr_t* frame::interpreter_frame_bcp_addr() const {
assert(is_interpreted_frame(), "must be interpreted");
return (intptr_t*) &(get_interpreterState()->_bcp);
}
@@ -189,7 +189,7 @@
return &(get_interpreterState()->_method);
}
-inline intptr_t* frame::interpreter_frame_mdx_addr() const {
+inline intptr_t* frame::interpreter_frame_mdp_addr() const {
assert(is_interpreted_frame(), "must be interpreted");
return (intptr_t*) &(get_interpreterState()->_mdx);
}
@@ -211,13 +211,13 @@
return *(intptr_t**)addr_at(interpreter_frame_last_sp_offset);
}
-inline intptr_t* frame::interpreter_frame_bcx_addr() const {
- return (intptr_t*)addr_at(interpreter_frame_bcx_offset);
+inline intptr_t* frame::interpreter_frame_bcp_addr() const {
+ return (intptr_t*)addr_at(interpreter_frame_bcp_offset);
}
-inline intptr_t* frame::interpreter_frame_mdx_addr() const {
- return (intptr_t*)addr_at(interpreter_frame_mdx_offset);
+inline intptr_t* frame::interpreter_frame_mdp_addr() const {
+ return (intptr_t*)addr_at(interpreter_frame_mdp_offset);
}
--- a/hotspot/src/cpu/x86/vm/interp_masm_x86.cpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/cpu/x86/vm/interp_masm_x86.cpp Fri Jul 18 11:22:49 2014 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -134,7 +134,7 @@
shll(tmp, exact_log2(DataLayout::cell_size));
addptr(mdp, tmp);
}
- movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), mdp);
+ movptr(Address(rbp, frame::interpreter_frame_mdp_offset * wordSize), mdp);
} else {
assert(MethodData::profile_return(), "either profile call args or call ret");
update_mdp_by_constant(mdp, in_bytes(TypeEntriesAtCall::return_only_size()));
--- a/hotspot/src/cpu/x86/vm/interp_masm_x86_32.cpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/cpu/x86/vm/interp_masm_x86_32.cpp Fri Jul 18 11:22:49 2014 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -826,7 +826,7 @@
// Test ImethodDataPtr. If it is null, continue at the specified label
void InterpreterMacroAssembler::test_method_data_pointer(Register mdp, Label& zero_continue) {
assert(ProfileInterpreter, "must be profiling interpreter");
- movptr(mdp, Address(rbp, frame::interpreter_frame_mdx_offset * wordSize));
+ movptr(mdp, Address(rbp, frame::interpreter_frame_mdp_offset * wordSize));
testptr(mdp, mdp);
jcc(Assembler::zero, zero_continue);
}
@@ -853,7 +853,7 @@
addptr(rbx, in_bytes(MethodData::data_offset()));
addptr(rax, rbx);
bind(set_mdp);
- movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), rax);
+ movptr(Address(rbp, frame::interpreter_frame_mdp_offset * wordSize), rax);
pop(rbx);
pop(rax);
}
@@ -975,7 +975,7 @@
assert(ProfileInterpreter, "must be profiling interpreter");
Address disp_address(mdp_in, offset_of_disp);
addptr(mdp_in,disp_address);
- movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), mdp_in);
+ movptr(Address(rbp, frame::interpreter_frame_mdp_offset * wordSize), mdp_in);
}
@@ -983,14 +983,14 @@
assert(ProfileInterpreter, "must be profiling interpreter");
Address disp_address(mdp_in, reg, Address::times_1, offset_of_disp);
addptr(mdp_in, disp_address);
- movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), mdp_in);
+ movptr(Address(rbp, frame::interpreter_frame_mdp_offset * wordSize), mdp_in);
}
void InterpreterMacroAssembler::update_mdp_by_constant(Register mdp_in, int constant) {
assert(ProfileInterpreter, "must be profiling interpreter");
addptr(mdp_in, constant);
- movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), mdp_in);
+ movptr(Address(rbp, frame::interpreter_frame_mdp_offset * wordSize), mdp_in);
}
--- a/hotspot/src/cpu/x86/vm/interp_masm_x86_32.hpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/cpu/x86/vm/interp_masm_x86_32.hpp Fri Jul 18 11:22:49 2014 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -61,8 +61,8 @@
#else
- void save_bcp() { movptr(Address(rbp, frame::interpreter_frame_bcx_offset * wordSize), rsi); }
- void restore_bcp() { movptr(rsi, Address(rbp, frame::interpreter_frame_bcx_offset * wordSize)); }
+ void save_bcp() { movptr(Address(rbp, frame::interpreter_frame_bcp_offset * wordSize), rsi); }
+ void restore_bcp() { movptr(rsi, Address(rbp, frame::interpreter_frame_bcp_offset * wordSize)); }
void restore_locals() { movptr(rdi, Address(rbp, frame::interpreter_frame_locals_offset * wordSize)); }
// Helpers for runtime call arguments/results
--- a/hotspot/src/cpu/x86/vm/interp_masm_x86_64.cpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/cpu/x86/vm/interp_masm_x86_64.cpp Fri Jul 18 11:22:49 2014 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -841,7 +841,7 @@
void InterpreterMacroAssembler::test_method_data_pointer(Register mdp,
Label& zero_continue) {
assert(ProfileInterpreter, "must be profiling interpreter");
- movptr(mdp, Address(rbp, frame::interpreter_frame_mdx_offset * wordSize));
+ movptr(mdp, Address(rbp, frame::interpreter_frame_mdp_offset * wordSize));
testptr(mdp, mdp);
jcc(Assembler::zero, zero_continue);
}
@@ -868,7 +868,7 @@
addptr(rbx, in_bytes(MethodData::data_offset()));
addptr(rax, rbx);
bind(set_mdp);
- movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), rax);
+ movptr(Address(rbp, frame::interpreter_frame_mdp_offset * wordSize), rax);
pop(rbx);
pop(rax);
}
@@ -991,7 +991,7 @@
assert(ProfileInterpreter, "must be profiling interpreter");
Address disp_address(mdp_in, offset_of_disp);
addptr(mdp_in, disp_address);
- movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), mdp_in);
+ movptr(Address(rbp, frame::interpreter_frame_mdp_offset * wordSize), mdp_in);
}
@@ -1001,7 +1001,7 @@
assert(ProfileInterpreter, "must be profiling interpreter");
Address disp_address(mdp_in, reg, Address::times_1, offset_of_disp);
addptr(mdp_in, disp_address);
- movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), mdp_in);
+ movptr(Address(rbp, frame::interpreter_frame_mdp_offset * wordSize), mdp_in);
}
@@ -1009,7 +1009,7 @@
int constant) {
assert(ProfileInterpreter, "must be profiling interpreter");
addptr(mdp_in, constant);
- movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), mdp_in);
+ movptr(Address(rbp, frame::interpreter_frame_mdp_offset * wordSize), mdp_in);
}
--- a/hotspot/src/cpu/x86/vm/interp_masm_x86_64.hpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/cpu/x86/vm/interp_masm_x86_64.hpp Fri Jul 18 11:22:49 2014 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -58,11 +58,11 @@
// Interpreter-specific registers
void save_bcp() {
- movptr(Address(rbp, frame::interpreter_frame_bcx_offset * wordSize), r13);
+ movptr(Address(rbp, frame::interpreter_frame_bcp_offset * wordSize), r13);
}
void restore_bcp() {
- movptr(r13, Address(rbp, frame::interpreter_frame_bcx_offset * wordSize));
+ movptr(r13, Address(rbp, frame::interpreter_frame_bcp_offset * wordSize));
}
void restore_locals() {
--- a/hotspot/src/cpu/x86/vm/templateInterpreter_x86_32.cpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/cpu/x86/vm/templateInterpreter_x86_32.cpp Fri Jul 18 11:22:49 2014 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 201,4 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -52,7 +52,7 @@
#ifndef CC_INTERP
const int method_offset = frame::interpreter_frame_method_offset * wordSize;
-const int bci_offset = frame::interpreter_frame_bcx_offset * wordSize;
+const int bcp_offset = frame::interpreter_frame_bcp_offset * wordSize;
const int locals_offset = frame::interpreter_frame_locals_offset * wordSize;
//------------------------------------------------------------------------------------------------------------------------
--- a/hotspot/src/cpu/x86/vm/templateInterpreter_x86_64.cpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/cpu/x86/vm/templateInterpreter_x86_64.cpp Fri Jul 18 11:22:49 2014 -0400
@@ -52,7 +52,7 @@
#ifndef CC_INTERP
const int method_offset = frame::interpreter_frame_method_offset * wordSize;
-const int bci_offset = frame::interpreter_frame_bcx_offset * wordSize;
+const int bcp_offset = frame::interpreter_frame_bcp_offset * wordSize;
const int locals_offset = frame::interpreter_frame_locals_offset * wordSize;
//-----------------------------------------------------------------------------
--- a/hotspot/src/cpu/x86/vm/vm_version_x86.cpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/cpu/x86/vm/vm_version_x86.cpp Fri Jul 18 11:22:49 2014 -0400
@@ -394,6 +394,8 @@
_stepping = 0;
_cpuFeatures = 0;
_logical_processors_per_package = 1;
+ // i486 internal cache is both I&D and has a 16-byte line size
+ _L1_data_cache_line_size = 16;
if (!Use486InstrsOnly) {
// Get raw processor info
@@ -412,6 +414,7 @@
// Logical processors are only available on P4s and above,
// and only if hyperthreading is available.
_logical_processors_per_package = logical_processor_count();
+ _L1_data_cache_line_size = L1_line_size();
}
}
@@ -924,6 +927,7 @@
if (PrintMiscellaneous && Verbose) {
tty->print_cr("Logical CPUs per core: %u",
logical_processors_per_package());
+ tty->print_cr("L1 data cache line size: %u", L1_data_cache_line_size());
tty->print("UseSSE=%d", (int) UseSSE);
if (UseAVX > 0) {
tty->print(" UseAVX=%d", (int) UseAVX);
--- a/hotspot/src/cpu/x86/vm/vm_version_x86.hpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/cpu/x86/vm/vm_version_x86.hpp Fri Jul 18 11:22:49 2014 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -581,7 +581,7 @@
return result;
}
- static intx prefetch_data_size() {
+ static intx L1_line_size() {
intx result = 0;
if (is_intel()) {
result = (_cpuid_info.dcp_cpuid4_ebx.bits.L1_line_size + 1);
@@ -593,6 +593,10 @@
return result;
}
+ static intx prefetch_data_size() {
+ return L1_line_size();
+ }
+
//
// Feature identification
//
--- a/hotspot/src/cpu/zero/vm/frame_zero.cpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/cpu/zero/vm/frame_zero.cpp Fri Jul 18 11:22:49 2014 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright 2007, 2008, 2009, 2010, 2011 Red Hat, Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -119,9 +119,6 @@
return false;
}
-void frame::pd_gc_epilog() {
-}
-
bool frame::is_interpreted_frame_valid(JavaThread *thread) const {
ShouldNotCallThis();
return false;
--- a/hotspot/src/cpu/zero/vm/frame_zero.inline.hpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/cpu/zero/vm/frame_zero.inline.hpp Fri Jul 18 11:22:49 2014 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright 2007, 2008, 2009, 2010 Red Hat, Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -101,7 +101,7 @@
return &(get_interpreterState()->_locals);
}
-inline intptr_t* frame::interpreter_frame_bcx_addr() const {
+inline intptr_t* frame::interpreter_frame_bcp_addr() const {
return (intptr_t*) &(get_interpreterState()->_bcp);
}
@@ -113,7 +113,7 @@
return &(get_interpreterState()->_method);
}
-inline intptr_t* frame::interpreter_frame_mdx_addr() const {
+inline intptr_t* frame::interpreter_frame_mdp_addr() const {
return (intptr_t*) &(get_interpreterState()->_mdx);
}
--- a/hotspot/src/os/bsd/dtrace/generateJvmOffsets.cpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/os/bsd/dtrace/generateJvmOffsets.cpp Fri Jul 18 11:22:49 2014 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -202,11 +202,11 @@
GEN_VALUE(OFFSET_interpreter_frame_method, 2 * pointer_size); /* L2 in saved window */
GEN_VALUE(OFFSET_interpreter_frame_sender_sp, 13 * pointer_size); /* I5 in saved window */
// Fake value for consistency. It is not going to be used.
- GEN_VALUE(OFFSET_interpreter_frame_bcx_offset, 0xFFFF);
+ GEN_VALUE(OFFSET_interpreter_frame_bcp_offset, 0xFFFF);
#elif defined(i386) || defined(__i386) || defined(__amd64)
GEN_VALUE(OFFSET_interpreter_frame_sender_sp, -1 * pointer_size);
GEN_VALUE(OFFSET_interpreter_frame_method, -3 * pointer_size);
- GEN_VALUE(OFFSET_interpreter_frame_bcx_offset, -7 * pointer_size);
+ GEN_VALUE(OFFSET_interpreter_frame_bcp_offset, -7 * pointer_size);
#endif
GEN_OFFS(Klass, _name);
--- a/hotspot/src/os/bsd/dtrace/libjvm_db.c Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/os/bsd/dtrace/libjvm_db.c Fri Jul 18 11:22:49 2014 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -164,7 +164,7 @@
int32_t SIZE_CodeCache_log2_segment;
uint64_t methodPtr;
- uint64_t bcx;
+ uint64_t bcp;
Nmethod_t *N; /*Inlined methods support */
Frame_t prev_fr;
@@ -1068,19 +1068,9 @@
return err;
}
-int is_bci(intptr_t bcx) {
- switch (DATA_MODEL) {
- case PR_MODEL_LP64:
- return ((uintptr_t) bcx) <= ((uintptr_t) MAX_METHOD_CODE_SIZE) ;
- case PR_MODEL_ILP32:
- default:
- return 0 <= bcx && bcx <= MAX_METHOD_CODE_SIZE;
- }
-}
-
static int
name_for_imethod(jvm_agent_t* J,
- uint64_t bcx,
+ uint64_t bcp,
uint64_t method,
char *result,
size_t size,
@@ -1095,7 +1085,7 @@
err = read_pointer(J, method + OFFSET_Method_constMethod, &constMethod);
CHECK_FAIL(err);
- bci = is_bci(bcx) ? bcx : bcx - (constMethod + (uint64_t) SIZE_ConstMethod);
+ bci = bcp - (constMethod + (uint64_t) SIZE_ConstMethod);
if (debug)
fprintf(stderr, "\t name_for_imethod: BEGIN: method: %#llx\n", method);
@@ -1169,7 +1159,7 @@
if (err == PS_OK && strncmp(name, "Interpreter", 11) == 0) {
*is_interpreted = 1;
if (is_method(J, J->methodPtr)) {
- return name_for_imethod(J, J->bcx, J->methodPtr, result, size, jframe);
+ return name_for_imethod(J, J->bcp, J->methodPtr, result, size, jframe);
}
}
@@ -1326,7 +1316,7 @@
/* arguments given to read_pointer need to be worst case sized */
uint64_t methodPtr = 0;
uint64_t sender_sp;
- uint64_t bcx = 0;
+ uint64_t bcp = 0;
int is_interpreted = 0;
int result = PS_OK;
int err = PS_OK;
@@ -1357,7 +1347,7 @@
* regs[R_PC] contains a CALL instruction pc offset.
*/
pc += 8;
- bcx = (uintptr_t) regs[R_L1];
+ bcp = (uintptr_t) regs[R_L1];
methodPtr = (uintptr_t) regs[R_L2];
sender_sp = regs[R_I5];
if (debug > 2) {
@@ -1385,13 +1375,13 @@
if (read_pointer(J, fp + OFFSET_interpreter_frame_sender_sp, &sender_sp) != PS_OK) {
sender_sp = 0;
}
- if (read_pointer(J, fp + OFFSET_interpreter_frame_bcx_offset, &bcx) != PS_OK) {
- bcx = 0;
+ if (read_pointer(J, fp + OFFSET_interpreter_frame_bcp_offset, &bcp) != PS_OK) {
+ bcp = 0;
}
#endif /* i386 */
J->methodPtr = methodPtr;
- J->bcx = bcx;
+ J->bcp = bcp;
/* On x86 with C2 JVM: native frame may have wrong regs[R_FP]
* For example: JVM_SuspendThread frame poins to the top interpreted frame.
@@ -1402,7 +1392,7 @@
*/
#ifndef X86_COMPILER2
if (is_method(J, J->methodPtr)) {
- result = name_for_imethod(J, bcx, J->methodPtr, name, size, jframe);
+ result = name_for_imethod(J, bcp, J->methodPtr, name, size, jframe);
/* If the methodPtr is a method then this is highly likely to be
an interpreter frame */
if (result >= 0) {
@@ -1416,7 +1406,7 @@
}
#ifdef X86_COMPILER2
else if (is_method(J, J->methodPtr)) {
- result = name_for_imethod(J, bcx, J->methodPtr, name, size, jframe);
+ result = name_for_imethod(J, bcp, J->methodPtr, name, size, jframe);
/* If the methodPtr is a method then this is highly likely to be
an interpreter frame */
if (result >= 0) {
--- a/hotspot/src/os/solaris/dtrace/generateJvmOffsets.cpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/os/solaris/dtrace/generateJvmOffsets.cpp Fri Jul 18 11:22:49 2014 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -197,11 +197,11 @@
GEN_VALUE(OFFSET_interpreter_frame_method, 2 * pointer_size); /* L2 in saved window */
GEN_VALUE(OFFSET_interpreter_frame_sender_sp, 13 * pointer_size); /* I5 in saved window */
// Fake value for consistency. It is not going to be used.
- GEN_VALUE(OFFSET_interpreter_frame_bcx_offset, 0xFFFF);
+ GEN_VALUE(OFFSET_interpreter_frame_bcp_offset, 0xFFFF);
#elif defined(i386) || defined(__i386) || defined(__amd64)
GEN_VALUE(OFFSET_interpreter_frame_sender_sp, -1 * pointer_size);
GEN_VALUE(OFFSET_interpreter_frame_method, -3 * pointer_size);
- GEN_VALUE(OFFSET_interpreter_frame_bcx_offset, -7 * pointer_size);
+ GEN_VALUE(OFFSET_interpreter_frame_bcp_offset, -7 * pointer_size);
#endif
GEN_OFFS(Klass, _name);
--- a/hotspot/src/os/solaris/dtrace/libjvm_db.c Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/os/solaris/dtrace/libjvm_db.c Fri Jul 18 11:22:49 2014 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -164,7 +164,7 @@
int32_t SIZE_CodeCache_log2_segment;
uint64_t methodPtr;
- uint64_t bcx;
+ uint64_t bcp;
Nmethod_t *N; /*Inlined methods support */
Frame_t prev_fr;
@@ -1068,19 +1068,9 @@
return err;
}
-int is_bci(intptr_t bcx) {
- switch (DATA_MODEL) {
- case PR_MODEL_LP64:
- return ((uintptr_t) bcx) <= ((uintptr_t) MAX_METHOD_CODE_SIZE) ;
- case PR_MODEL_ILP32:
- default:
- return 0 <= bcx && bcx <= MAX_METHOD_CODE_SIZE;
- }
-}
-
static int
name_for_imethod(jvm_agent_t* J,
- uint64_t bcx,
+ uint64_t bcp,
uint64_t method,
char *result,
size_t size,
@@ -1095,7 +1085,7 @@
err = read_pointer(J, method + OFFSET_Method_constMethod, &constMethod);
CHECK_FAIL(err);
- bci = is_bci(bcx) ? bcx : bcx - (constMethod + (uint64_t) SIZE_ConstMethod);
+ bci = bcp - (constMethod + (uint64_t) SIZE_ConstMethod);
if (debug)
fprintf(stderr, "\t name_for_imethod: BEGIN: method: %#llx\n", method);
@@ -1169,7 +1159,7 @@
if (err == PS_OK && strncmp(name, "Interpreter", 11) == 0) {
*is_interpreted = 1;
if (is_method(J, J->methodPtr)) {
- return name_for_imethod(J, J->bcx, J->methodPtr, result, size, jframe);
+ return name_for_imethod(J, J->bcp, J->methodPtr, result, size, jframe);
}
}
@@ -1326,7 +1316,7 @@
/* arguments given to read_pointer need to be worst case sized */
uint64_t methodPtr = 0;
uint64_t sender_sp;
- uint64_t bcx = 0;
+ uint64_t bcp = 0;
int is_interpreted = 0;
int result = PS_OK;
int err = PS_OK;
@@ -1357,7 +1347,7 @@
* regs[R_PC] contains a CALL instruction pc offset.
*/
pc += 8;
- bcx = (uintptr_t) regs[R_L1];
+ bcp = (uintptr_t) regs[R_L1];
methodPtr = (uintptr_t) regs[R_L2];
sender_sp = regs[R_I5];
if (debug > 2) {
@@ -1385,13 +1375,13 @@
if (read_pointer(J, fp + OFFSET_interpreter_frame_sender_sp, &sender_sp) != PS_OK) {
sender_sp = 0;
}
- if (read_pointer(J, fp + OFFSET_interpreter_frame_bcx_offset, &bcx) != PS_OK) {
- bcx = 0;
+ if (read_pointer(J, fp + OFFSET_interpreter_frame_bcp_offset, &bcp) != PS_OK) {
+ bcp = 0;
}
#endif /* i386 */
J->methodPtr = methodPtr;
- J->bcx = bcx;
+ J->bcp = bcp;
/* On x86 with C2 JVM: native frame may have wrong regs[R_FP]
* For example: JVM_SuspendThread frame poins to the top interpreted frame.
@@ -1402,7 +1392,7 @@
*/
#ifndef X86_COMPILER2
if (is_method(J, J->methodPtr)) {
- result = name_for_imethod(J, bcx, J->methodPtr, name, size, jframe);
+ result = name_for_imethod(J, bcp, J->methodPtr, name, size, jframe);
/* If the methodPtr is a method then this is highly likely to be
an interpreter frame */
if (result >= 0) {
@@ -1416,7 +1406,7 @@
}
#ifdef X86_COMPILER2
else if (is_method(J, J->methodPtr)) {
- result = name_for_imethod(J, bcx, J->methodPtr, name, size, jframe);
+ result = name_for_imethod(J, bcp, J->methodPtr, name, size, jframe);
/* If the methodPtr is a method then this is highly likely to be
an interpreter frame */
if (result >= 0) {
--- a/hotspot/src/share/vm/classfile/javaClasses.cpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/share/vm/classfile/javaClasses.cpp Fri Jul 18 11:22:49 2014 -0400
@@ -1639,9 +1639,9 @@
if (fr.is_first_frame()) break;
address pc = fr.pc();
if (fr.is_interpreted_frame()) {
- intptr_t bcx = fr.interpreter_frame_bcx();
+ address bcp = fr.interpreter_frame_bcp();
method = fr.interpreter_frame_method();
- bci = fr.is_bci(bcx) ? bcx : method->bci_from((address)bcx);
+ bci = method->bci_from(bcp);
fr = fr.sender(&map);
} else {
CodeBlob* cb = fr.cb();
--- a/hotspot/src/share/vm/classfile/verifier.cpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/share/vm/classfile/verifier.cpp Fri Jul 18 11:22:49 2014 -0400
@@ -425,7 +425,7 @@
if (_bci != -1 && method != NULL) {
streamIndentor si(ss);
const char* bytecode_name = "<invalid>";
- if (method->validate_bci_from_bcx(_bci) != -1) {
+ if (method->validate_bci(_bci) != -1) {
Bytecodes::Code code = Bytecodes::code_or_bp_at(method->bcp_from(_bci));
if (Bytecodes::is_defined(code)) {
bytecode_name = Bytecodes::name(code);
--- a/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp Fri Jul 18 11:22:49 2014 -0400
@@ -76,7 +76,6 @@
// When collecting the permanent generation Method*s may be moving,
// so we either have to flush all bcp data or convert it into bci.
CodeCache::gc_prologue();
- Threads::gc_prologue();
bool marked_for_unloading = false;
@@ -106,7 +105,6 @@
// Universe::set_heap_capacity_at_last_gc(Universe::heap()->capacity());
// Universe::set_heap_used_at_last_gc(Universe::heap()->used());
- Threads::gc_epilogue();
CodeCache::gc_epilogue();
JvmtiExport::gc_epilogue();
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp Fri Jul 18 11:22:49 2014 -0400
@@ -180,7 +180,6 @@
size_policy->major_collection_begin();
CodeCache::gc_prologue();
- Threads::gc_prologue();
BiasedLocking::preserve_marks();
// Capture heap size before collection for printing.
@@ -251,7 +250,6 @@
MetaspaceAux::verify_metrics();
BiasedLocking::restore_marks();
- Threads::gc_epilogue();
CodeCache::gc_epilogue();
JvmtiExport::gc_epilogue();
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp Fri Jul 18 11:22:49 2014 -0400
@@ -1066,7 +1066,6 @@
ClassLoaderDataGraph::purge();
MetaspaceAux::verify_metrics();
- Threads::gc_epilogue();
CodeCache::gc_epilogue();
JvmtiExport::gc_epilogue();
@@ -2068,7 +2067,6 @@
size_policy->major_collection_begin();
CodeCache::gc_prologue();
- Threads::gc_prologue();
COMPILER2_PRESENT(DerivedPointerTable::clear());
--- a/hotspot/src/share/vm/memory/genMarkSweep.cpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/share/vm/memory/genMarkSweep.cpp Fri Jul 18 11:22:49 2014 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2014, 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
@@ -76,7 +76,6 @@
// When collecting the permanent generation Method*s may be moving,
// so we either have to flush all bcp data or convert it into bci.
CodeCache::gc_prologue();
- Threads::gc_prologue();
// Increment the invocation count
_total_invocations++;
@@ -132,7 +131,6 @@
rs->invalidate_or_clear(old_gen);
}
- Threads::gc_epilogue();
CodeCache::gc_epilogue();
JvmtiExport::gc_epilogue();
--- a/hotspot/src/share/vm/oops/method.cpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/share/vm/oops/method.cpp Fri Jul 18 11:22:49 2014 -0400
@@ -240,6 +240,9 @@
int Method::bci_from(address bcp) const {
+ if (is_native() && bcp == 0) {
+ return 0;
+ }
#ifdef ASSERT
{ ResourceMark rm;
assert(is_native() && bcp == code_base() || contains(bcp) || is_error_reported(),
@@ -250,24 +253,23 @@
}
-// Return (int)bcx if it appears to be a valid BCI.
-// Return bci_from((address)bcx) if it appears to be a valid BCP.
+int Method::validate_bci(int bci) const {
+ return (bci == 0 || bci < code_size()) ? bci : -1;
+}
+
+// Return bci if it appears to be a valid bcp
// Return -1 otherwise.
// Used by profiling code, when invalid data is a possibility.
// The caller is responsible for validating the Method* itself.
-int Method::validate_bci_from_bcx(intptr_t bcx) const {
+int Method::validate_bci_from_bcp(address bcp) const {
// keep bci as -1 if not a valid bci
int bci = -1;
- if (bcx == 0 || (address)bcx == code_base()) {
+ if (bcp == 0 || bcp == code_base()) {
// code_size() may return 0 and we allow 0 here
// the method may be native
bci = 0;
- } else if (frame::is_bci(bcx)) {
- if (bcx < code_size()) {
- bci = (int)bcx;
- }
- } else if (contains((address)bcx)) {
- bci = (address)bcx - code_base();
+ } else if (contains(bcp)) {
+ bci = bcp - code_base();
}
// Assert that if we have dodged any asserts, bci is negative.
assert(bci == -1 || bci == bci_from(bcp_from(bci)), "sane bci if >=0");
--- a/hotspot/src/share/vm/oops/method.hpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/share/vm/oops/method.hpp Fri Jul 18 11:22:49 2014 -0400
@@ -649,7 +649,8 @@
// Returns the byte code index from the byte code pointer
int bci_from(address bcp) const;
address bcp_from(int bci) const;
- int validate_bci_from_bcx(intptr_t bcx) const;
+ int validate_bci_from_bcp(address bcp) const;
+ int validate_bci(int bci) const;
// Returns the line number for a bci if debugging information for the method is prowided,
// -1 is returned otherwise.
--- a/hotspot/src/share/vm/oops/methodData.hpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/share/vm/oops/methodData.hpp Fri Jul 18 11:22:49 2014 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -2338,10 +2338,6 @@
return dp - ((address)_data);
}
- address di_to_dp(int di) {
- return (address)data_layout_at(di);
- }
-
// bci to di/dp conversion.
address bci_to_dp(int bci);
int bci_to_di(int bci) {
--- a/hotspot/src/share/vm/prims/forte.cpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/share/vm/prims/forte.cpp Fri Jul 18 11:22:49 2014 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -234,9 +234,8 @@
*method_p = method;
if (!method->is_valid_method()) return false;
- intptr_t bcx = fr->interpreter_frame_bcx();
-
- int bci = method->validate_bci_from_bcx(bcx);
+ address bcp = fr->interpreter_frame_bcp();
+ int bci = method->validate_bci_from_bcp(bcp);
// note: bci is set to -1 if not a valid bci
*bci_p = bci;
--- a/hotspot/src/share/vm/prims/jni.cpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/share/vm/prims/jni.cpp Fri Jul 18 11:22:49 2014 -0400
@@ -3886,6 +3886,7 @@
run_unit_test(TestKlass_test());
run_unit_test(TestBitMap_test());
run_unit_test(TestAsUtf8());
+ run_unit_test(ObjectMonitor::sanity_checks());
#if INCLUDE_VM_STRUCTS
run_unit_test(VMStructs::test());
#endif
--- a/hotspot/src/share/vm/runtime/frame.cpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/share/vm/runtime/frame.cpp Fri Jul 18 11:22:49 2014 -0400
@@ -399,91 +399,32 @@
*interpreter_frame_method_addr() = method;
}
-void frame::interpreter_frame_set_bcx(intptr_t bcx) {
- assert(is_interpreted_frame(), "Not an interpreted frame");
- if (ProfileInterpreter) {
- bool formerly_bci = is_bci(interpreter_frame_bcx());
- bool is_now_bci = is_bci(bcx);
- *interpreter_frame_bcx_addr() = bcx;
-
- intptr_t mdx = interpreter_frame_mdx();
-
- if (mdx != 0) {
- if (formerly_bci) {
- if (!is_now_bci) {
- // The bcx was just converted from bci to bcp.
- // Convert the mdx in parallel.
- MethodData* mdo = interpreter_frame_method()->method_data();
- assert(mdo != NULL, "");
- int mdi = mdx - 1; // We distinguish valid mdi from zero by adding one.
- address mdp = mdo->di_to_dp(mdi);
- interpreter_frame_set_mdx((intptr_t)mdp);
- }
- } else {
- if (is_now_bci) {
- // The bcx was just converted from bcp to bci.
- // Convert the mdx in parallel.
- MethodData* mdo = interpreter_frame_method()->method_data();
- assert(mdo != NULL, "");
- int mdi = mdo->dp_to_di((address)mdx);
- interpreter_frame_set_mdx((intptr_t)mdi + 1); // distinguish valid from 0.
- }
- }
- }
- } else {
- *interpreter_frame_bcx_addr() = bcx;
- }
-}
-
jint frame::interpreter_frame_bci() const {
assert(is_interpreted_frame(), "interpreted frame expected");
- intptr_t bcx = interpreter_frame_bcx();
- return is_bci(bcx) ? bcx : interpreter_frame_method()->bci_from((address)bcx);
-}
-
-void frame::interpreter_frame_set_bci(jint bci) {
- assert(is_interpreted_frame(), "interpreted frame expected");
- assert(!is_bci(interpreter_frame_bcx()), "should not set bci during GC");
- interpreter_frame_set_bcx((intptr_t)interpreter_frame_method()->bcp_from(bci));
+ address bcp = interpreter_frame_bcp();
+ return interpreter_frame_method()->bci_from(bcp);
}
address frame::interpreter_frame_bcp() const {
assert(is_interpreted_frame(), "interpreted frame expected");
- intptr_t bcx = interpreter_frame_bcx();
- return is_bci(bcx) ? interpreter_frame_method()->bcp_from(bcx) : (address)bcx;
+ return (address)*interpreter_frame_bcp_addr();
}
void frame::interpreter_frame_set_bcp(address bcp) {
assert(is_interpreted_frame(), "interpreted frame expected");
- assert(!is_bci(interpreter_frame_bcx()), "should not set bcp during GC");
- interpreter_frame_set_bcx((intptr_t)bcp);
-}
-
-void frame::interpreter_frame_set_mdx(intptr_t mdx) {
- assert(is_interpreted_frame(), "Not an interpreted frame");
- assert(ProfileInterpreter, "must be profiling interpreter");
- *interpreter_frame_mdx_addr() = mdx;
+ *interpreter_frame_bcp_addr() = (intptr_t)bcp;
}
address frame::interpreter_frame_mdp() const {
assert(ProfileInterpreter, "must be profiling interpreter");
assert(is_interpreted_frame(), "interpreted frame expected");
- intptr_t bcx = interpreter_frame_bcx();
- intptr_t mdx = interpreter_frame_mdx();
-
- assert(!is_bci(bcx), "should not access mdp during GC");
- return (address)mdx;
+ return (address)*interpreter_frame_mdp_addr();
}
void frame::interpreter_frame_set_mdp(address mdp) {
assert(is_interpreted_frame(), "interpreted frame expected");
- if (mdp == NULL) {
- // Always allow the mdp to be cleared.
- interpreter_frame_set_mdx((intptr_t)mdp);
- }
- intptr_t bcx = interpreter_frame_bcx();
- assert(!is_bci(bcx), "should not set mdp during GC");
- interpreter_frame_set_mdx((intptr_t)mdp);
+ assert(ProfileInterpreter, "must be profiling interpreter");
+ *interpreter_frame_mdp_addr() = (intptr_t)mdp;
}
BasicObjectLock* frame::next_monitor_in_interpreter_frame(BasicObjectLock* current) const {
@@ -1169,24 +1110,6 @@
}
}
-void frame::gc_prologue() {
- if (is_interpreted_frame()) {
- // set bcx to bci to become Method* position independent during GC
- interpreter_frame_set_bcx(interpreter_frame_bci());
- }
-}
-
-
-void frame::gc_epilogue() {
- if (is_interpreted_frame()) {
- // set bcx back to bcp for interpreter
- interpreter_frame_set_bcx((intptr_t)interpreter_frame_bcp());
- }
- // call processor specific epilog function
- pd_gc_epilog();
-}
-
-
# ifdef ENABLE_ZAP_DEAD_LOCALS
void frame::CheckValueClosure::do_oop(oop* p) {
--- a/hotspot/src/share/vm/runtime/frame.hpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/share/vm/runtime/frame.hpp Fri Jul 18 11:22:49 2014 -0400
@@ -218,8 +218,8 @@
private:
intptr_t** interpreter_frame_locals_addr() const;
- intptr_t* interpreter_frame_bcx_addr() const;
- intptr_t* interpreter_frame_mdx_addr() const;
+ intptr_t* interpreter_frame_bcp_addr() const;
+ intptr_t* interpreter_frame_mdp_addr() const;
public:
// Locals
@@ -229,23 +229,13 @@
void interpreter_frame_set_locals(intptr_t* locs);
- // byte code index/pointer (use these functions for unchecked frame access only!)
- intptr_t interpreter_frame_bcx() const { return *interpreter_frame_bcx_addr(); }
- void interpreter_frame_set_bcx(intptr_t bcx);
-
// byte code index
jint interpreter_frame_bci() const;
- void interpreter_frame_set_bci(jint bci);
// byte code pointer
address interpreter_frame_bcp() const;
void interpreter_frame_set_bcp(address bcp);
- // Unchecked access to the method data index/pointer.
- // Only use this if you know what you are doing.
- intptr_t interpreter_frame_mdx() const { return *interpreter_frame_mdx_addr(); }
- void interpreter_frame_set_mdx(intptr_t mdx);
-
// method data pointer
address interpreter_frame_mdp() const;
void interpreter_frame_set_mdp(address dp);
@@ -414,10 +404,6 @@
// RedefineClasses support for finding live interpreted methods on the stack
void metadata_do(void f(Metadata*));
- void gc_prologue();
- void gc_epilogue();
- void pd_gc_epilog();
-
# ifdef ENABLE_ZAP_DEAD_LOCALS
private:
class CheckValueClosure: public OopClosure {
@@ -454,7 +440,6 @@
// Verification
void verify(const RegisterMap* map);
static bool verify_return_pc(address x);
- static bool is_bci(intptr_t bcx);
// Usage:
// assert(frame::verify_return_pc(return_address), "must be a return pc");
--- a/hotspot/src/share/vm/runtime/frame.inline.hpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/share/vm/runtime/frame.inline.hpp Fri Jul 18 11:22:49 2014 -0400
@@ -40,26 +40,6 @@
#endif
#endif
-// This file holds platform-independent bodies of inline functions for frames.
-
-// Note: The bcx usually contains the bcp; however during GC it contains the bci
-// (changed by gc_prologue() and gc_epilogue()) to be Method* position
-// independent. These accessors make sure the correct value is returned
-// by testing the range of the bcx value. bcp's are guaranteed to be above
-// max_method_code_size, since methods are always allocated in OldSpace and
-// Eden is allocated before OldSpace.
-//
-// The bcp is accessed sometimes during GC for ArgumentDescriptors; than
-// the correct translation has to be performed (was bug).
-
-inline bool frame::is_bci(intptr_t bcx) {
-#ifdef _LP64
- return ((uintptr_t) bcx) <= ((uintptr_t) max_method_code_size) ;
-#else
- return 0 <= bcx && bcx <= max_method_code_size;
-#endif
-}
-
inline bool frame::is_entry_frame() const {
return StubRoutines::returns_to_call_stub(pc());
}
--- a/hotspot/src/share/vm/runtime/objectMonitor.cpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/share/vm/runtime/objectMonitor.cpp Fri Jul 18 11:22:49 2014 -0400
@@ -2497,6 +2497,10 @@
SETKNOB(FastHSSEC);
#undef SETKNOB
+ if (Knob_Verbose) {
+ sanity_checks();
+ }
+
if (os::is_MP()) {
BackOffMask = (1 << Knob_SpinBackOff) - 1;
if (Knob_ReportSettings) ::printf("BackOffMask=%X\n", BackOffMask);
@@ -2517,6 +2521,66 @@
InitDone = 1;
}
+void ObjectMonitor::sanity_checks() {
+ int error_cnt = 0;
+ int warning_cnt = 0;
+ bool verbose = Knob_Verbose != 0 NOT_PRODUCT(|| VerboseInternalVMTests);
+
+ if (verbose) {
+ tty->print_cr("INFO: sizeof(ObjectMonitor)=" SIZE_FORMAT,
+ sizeof(ObjectMonitor));
+ }
+
+ uint cache_line_size = VM_Version::L1_data_cache_line_size();
+ if (verbose) {
+ tty->print_cr("INFO: L1_data_cache_line_size=%u", cache_line_size);
+ }
+
+ ObjectMonitor dummy;
+ u_char *addr_begin = (u_char*)&dummy;
+ u_char *addr_header = (u_char*)&dummy._header;
+ u_char *addr_owner = (u_char*)&dummy._owner;
+
+ uint offset_header = (uint)(addr_header - addr_begin);
+ if (verbose) tty->print_cr("INFO: offset(_header)=%u", offset_header);
+
+ uint offset_owner = (uint)(addr_owner - addr_begin);
+ if (verbose) tty->print_cr("INFO: offset(_owner)=%u", offset_owner);
+
+ if ((uint)(addr_header - addr_begin) != 0) {
+ tty->print_cr("ERROR: offset(_header) must be zero (0).");
+ error_cnt++;
+ }
+
+ if (cache_line_size != 0) {
+ // We were able to determine the L1 data cache line size so
+ // do some cache line specific sanity checks
+
+ if ((offset_owner - offset_header) < cache_line_size) {
+ tty->print_cr("WARNING: the _header and _owner fields are closer "
+ "than a cache line which permits false sharing.");
+ warning_cnt++;
+ }
+
+ if ((sizeof(ObjectMonitor) % cache_line_size) != 0) {
+ tty->print_cr("WARNING: ObjectMonitor size is not a multiple of "
+ "a cache line which permits false sharing.");
+ warning_cnt++;
+ }
+ }
+
+ ObjectSynchronizer::sanity_checks(verbose, cache_line_size, &error_cnt,
+ &warning_cnt);
+
+ if (verbose || error_cnt != 0 || warning_cnt != 0) {
+ tty->print_cr("INFO: error_cnt=%d", error_cnt);
+ tty->print_cr("INFO: warning_cnt=%d", warning_cnt);
+ }
+
+ guarantee(error_cnt == 0,
+ "Fatal error(s) found in ObjectMonitor::sanity_checks()");
+}
+
#ifndef PRODUCT
void ObjectMonitor::verify() {
}
--- a/hotspot/src/share/vm/runtime/objectMonitor.hpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/share/vm/runtime/objectMonitor.hpp Fri Jul 18 11:22:49 2014 -0400
@@ -189,6 +189,8 @@
bool check(TRAPS); // true if the thread owns the monitor.
void check_slow(TRAPS);
void clear();
+ static void sanity_checks(); // public for -XX:+ExecuteInternalVMTests
+ // in PRODUCT for -XX:SyncKnobs=Verbose=1
#ifndef PRODUCT
void verify();
void print();
@@ -234,8 +236,6 @@
// WARNING: this must be the very first word of ObjectMonitor
// This means this class can't use any virtual member functions.
- // TODO-FIXME: assert that offsetof(_header) is 0 or get rid of the
- // implicit 0 offset in emitted code.
volatile markOop _header; // displaced object header word - mark
void* volatile _object; // backward object pointer - strong root
--- a/hotspot/src/share/vm/runtime/synchronizer.cpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/share/vm/runtime/synchronizer.cpp Fri Jul 18 11:22:49 2014 -0400
@@ -392,19 +392,22 @@
// Hash Code handling
//
// Performance concern:
-// OrderAccess::storestore() calls release() which STs 0 into the global volatile
-// OrderAccess::Dummy variable. This store is unnecessary for correctness.
-// Many threads STing into a common location causes considerable cache migration
-// or "sloshing" on large SMP system. As such, I avoid using OrderAccess::storestore()
-// until it's repaired. In some cases OrderAccess::fence() -- which incurs local
-// latency on the executing processor -- is a better choice as it scales on SMP
-// systems. See http://blogs.sun.com/dave/entry/biased_locking_in_hotspot for a
-// discussion of coherency costs. Note that all our current reference platforms
-// provide strong ST-ST order, so the issue is moot on IA32, x64, and SPARC.
+// OrderAccess::storestore() calls release() which at one time stored 0
+// into the global volatile OrderAccess::dummy variable. This store was
+// unnecessary for correctness. Many threads storing into a common location
+// causes considerable cache migration or "sloshing" on large SMP systems.
+// As such, I avoided using OrderAccess::storestore(). In some cases
+// OrderAccess::fence() -- which incurs local latency on the executing
+// processor -- is a better choice as it scales on SMP systems.
+//
+// See http://blogs.oracle.com/dave/entry/biased_locking_in_hotspot for
+// a discussion of coherency costs. Note that all our current reference
+// platforms provide strong ST-ST order, so the issue is moot on IA32,
+// x64, and SPARC.
//
// As a general policy we use "volatile" to control compiler-based reordering
-// and explicit fences (barriers) to control for architectural reordering performed
-// by the CPU(s) or platform.
+// and explicit fences (barriers) to control for architectural reordering
+// performed by the CPU(s) or platform.
struct SharedGlobals {
// These are highly shared mostly-read variables.
@@ -1596,7 +1599,55 @@
}
//------------------------------------------------------------------------------
-// Non-product code
+// Debugging code
+
+void ObjectSynchronizer::sanity_checks(const bool verbose,
+ const uint cache_line_size,
+ int *error_cnt_ptr,
+ int *warning_cnt_ptr) {
+ u_char *addr_begin = (u_char*)&GVars;
+ u_char *addr_stwRandom = (u_char*)&GVars.stwRandom;
+ u_char *addr_hcSequence = (u_char*)&GVars.hcSequence;
+
+ if (verbose) {
+ tty->print_cr("INFO: sizeof(SharedGlobals)=" SIZE_FORMAT,
+ sizeof(SharedGlobals));
+ }
+
+ uint offset_stwRandom = (uint)(addr_stwRandom - addr_begin);
+ if (verbose) tty->print_cr("INFO: offset(stwRandom)=%u", offset_stwRandom);
+
+ uint offset_hcSequence = (uint)(addr_hcSequence - addr_begin);
+ if (verbose) {
+ tty->print_cr("INFO: offset(_hcSequence)=%u", offset_hcSequence);
+ }
+
+ if (cache_line_size != 0) {
+ // We were able to determine the L1 data cache line size so
+ // do some cache line specific sanity checks
+
+ if (offset_stwRandom < cache_line_size) {
+ tty->print_cr("WARNING: the SharedGlobals.stwRandom field is closer "
+ "to the struct beginning than a cache line which permits "
+ "false sharing.");
+ (*warning_cnt_ptr)++;
+ }
+
+ if ((offset_hcSequence - offset_stwRandom) < cache_line_size) {
+ tty->print_cr("WARNING: the SharedGlobals.stwRandom and "
+ "SharedGlobals.hcSequence fields are closer than a cache "
+ "line which permits false sharing.");
+ (*warning_cnt_ptr)++;
+ }
+
+ if ((sizeof(SharedGlobals) - offset_hcSequence) < cache_line_size) {
+ tty->print_cr("WARNING: the SharedGlobals.hcSequence field is closer "
+ "to the struct end than a cache line which permits false "
+ "sharing.");
+ (*warning_cnt_ptr)++;
+ }
+ }
+}
#ifndef PRODUCT
--- a/hotspot/src/share/vm/runtime/synchronizer.hpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/share/vm/runtime/synchronizer.hpp Fri Jul 18 11:22:49 2014 -0400
@@ -121,6 +121,9 @@
static void oops_do(OopClosure* f);
// debugging
+ static void sanity_checks(const bool verbose,
+ const unsigned int cache_line_size,
+ int *error_cnt_ptr, int *warning_cnt_ptr);
static void verify() PRODUCT_RETURN;
static int verify_objmon_isinpool(ObjectMonitor *addr) PRODUCT_RETURN0;
--- a/hotspot/src/share/vm/runtime/thread.cpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/share/vm/runtime/thread.cpp Fri Jul 18 11:22:49 2014 -0400
@@ -2649,20 +2649,6 @@
}
-// GC support
-static void frame_gc_epilogue(frame* f, const RegisterMap* map) { f->gc_epilogue(); }
-
-void JavaThread::gc_epilogue() {
- frames_do(frame_gc_epilogue);
-}
-
-
-static void frame_gc_prologue(frame* f, const RegisterMap* map) { f->gc_prologue(); }
-
-void JavaThread::gc_prologue() {
- frames_do(frame_gc_prologue);
-}
-
// If the caller is a NamedThread, then remember, in the current scope,
// the given JavaThread in its _processed_thread field.
class RememberProcessedThread: public StackObj {
@@ -4151,18 +4137,6 @@
}
}
-void Threads::gc_epilogue() {
- ALL_JAVA_THREADS(p) {
- p->gc_epilogue();
- }
-}
-
-void Threads::gc_prologue() {
- ALL_JAVA_THREADS(p) {
- p->gc_prologue();
- }
-}
-
void Threads::deoptimized_wrt_marked_nmethods() {
ALL_JAVA_THREADS(p) {
p->deoptimized_wrt_marked_nmethods();
--- a/hotspot/src/share/vm/runtime/thread.hpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/share/vm/runtime/thread.hpp Fri Jul 18 11:22:49 2014 -0400
@@ -1416,10 +1416,6 @@
// RedefineClasses Support
void metadata_do(void f(Metadata*));
- // Memory management operations
- void gc_epilogue();
- void gc_prologue();
-
// Misc. operations
char* name() const { return (char*)get_thread_name(); }
void print_on(outputStream* st) const;
@@ -1899,8 +1895,6 @@
// RedefineClasses support
static void metadata_do(void f(Metadata*));
- static void gc_epilogue();
- static void gc_prologue();
#ifdef ASSERT
static bool is_vm_complete() { return _vm_complete; }
#endif
--- a/hotspot/src/share/vm/runtime/vframe.hpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/share/vm/runtime/vframe.hpp Fri Jul 18 11:22:49 2014 -0400
@@ -511,8 +511,8 @@
inline void vframeStreamCommon::fill_from_interpreter_frame() {
Method* method = _frame.interpreter_frame_method();
- intptr_t bcx = _frame.interpreter_frame_bcx();
- int bci = method->validate_bci_from_bcx(bcx);
+ address bcp = _frame.interpreter_frame_bcp();
+ int bci = method->validate_bci_from_bcp(bcp);
// 6379830 AsyncGetCallTrace sometimes feeds us wild frames.
if (bci < 0) {
found_bad_method_frame();
--- a/hotspot/src/share/vm/runtime/vframeArray.cpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/share/vm/runtime/vframeArray.cpp Fri Jul 18 11:22:49 2014 -0400
@@ -297,9 +297,9 @@
src->lock()->move_to(src->obj(), top->lock());
}
if (ProfileInterpreter) {
- iframe()->interpreter_frame_set_mdx(0); // clear out the mdp.
+ iframe()->interpreter_frame_set_mdp(0); // clear out the mdp.
}
- iframe()->interpreter_frame_set_bcx((intptr_t)bcp); // cannot use bcp because frame is not initialized yet
+ iframe()->interpreter_frame_set_bcp(bcp);
if (ProfileInterpreter) {
MethodData* mdo = method()->method_data();
if (mdo != NULL) {
--- a/hotspot/src/share/vm/runtime/vm_version.cpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/share/vm/runtime/vm_version.cpp Fri Jul 18 11:22:49 2014 -0400
@@ -36,6 +36,7 @@
bool Abstract_VM_Version::_supports_atomic_getadd4 = false;
bool Abstract_VM_Version::_supports_atomic_getadd8 = false;
unsigned int Abstract_VM_Version::_logical_processors_per_package = 1U;
+unsigned int Abstract_VM_Version::_L1_data_cache_line_size = 0;
int Abstract_VM_Version::_reserve_for_allocation_prefetch = 0;
#ifndef HOTSPOT_RELEASE_VERSION
--- a/hotspot/src/share/vm/runtime/vm_version.hpp Mon Jul 14 10:15:21 2014 -0400
+++ b/hotspot/src/share/vm/runtime/vm_version.hpp Fri Jul 18 11:22:49 2014 -0400
@@ -42,6 +42,7 @@
static bool _supports_atomic_getadd4;
static bool _supports_atomic_getadd8;
static unsigned int _logical_processors_per_package;
+ static unsigned int _L1_data_cache_line_size;
static int _vm_major_version;
static int _vm_minor_version;
static int _vm_micro_version;
@@ -98,6 +99,10 @@
return _logical_processors_per_package;
}
+ static unsigned int L1_data_cache_line_size() {
+ return _L1_data_cache_line_size;
+ }
+
// Need a space at the end of TLAB for prefetch instructions
// which may fault when accessing memory outside of heap.
static int reserve_for_allocation_prefetch() {