This commit is contained in:
J. Duke 2017-07-05 22:10:13 +02:00
commit 8d3330b723
1620 changed files with 33558 additions and 10791 deletions

View File

@ -376,3 +376,4 @@ d94d54a3192fea79234c3ac55cd0b4052d45e954 jdk-9+130
8728756c2f70a79a90188f4019cfd6b9a275765c jdk-9+131
a24702d4d5ab0015a5c553ed57f66fce7d85155e jdk-9+132
be1218f792a450dfb5d4b1f82616b9d95a6a732e jdk-9+133
065724348690eda41fc69112278d8da6dcde548c jdk-9+134

View File

@ -5095,7 +5095,7 @@ VS_SDK_PLATFORM_NAME_2013=
#CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks:
DATE_WHEN_GENERATED=1470863189
DATE_WHEN_GENERATED=1472718471
###############################################################################
#
@ -15944,6 +15944,8 @@ $as_echo "$COMPILE_TYPE" >&6; }
HOTSPOT_TARGET_CPU_DEFINE=S390
elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
HOTSPOT_TARGET_CPU_DEFINE=S390
elif test "x$OPENJDK_TARGET_CPU" != x; then
HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
fi
@ -16117,6 +16119,8 @@ $as_echo "$COMPILE_TYPE" >&6; }
HOTSPOT_BUILD_CPU_DEFINE=S390
elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
HOTSPOT_BUILD_CPU_DEFINE=S390
elif test "x$OPENJDK_BUILD_CPU" != x; then
HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
fi

View File

@ -454,6 +454,8 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS_HELPER],
HOTSPOT_$1_CPU_DEFINE=S390
elif test "x$OPENJDK_$1_CPU" = xs390x; then
HOTSPOT_$1_CPU_DEFINE=S390
elif test "x$OPENJDK_$1_CPU" != x; then
HOTSPOT_$1_CPU_DEFINE=$(echo $OPENJDK_$1_CPU | tr a-z A-Z)
fi
AC_SUBST(HOTSPOT_$1_CPU_DEFINE)

View File

@ -536,3 +536,4 @@ e96b34b76d863ed1fa04e0eeb3f297ac17b490fd jdk-9+129
943bf73b49c33c2d7cbd796f6a4ae3c7a00ae932 jdk-9+131
713951c08aa26813375175c2ab6cc99ff2a56903 jdk-9+132
a25e0fb6033245ab075136e744d362ce765464cd jdk-9+133
b8b694c6b4d2ab0939aed7adaf0eec1ac321a085 jdk-9+134

View File

@ -71,15 +71,15 @@ BUILD_HOTSPOT_JTREG_NATIVE_SRC += \
endif
ifeq ($(TOOLCHAIN_TYPE), solstudio)
BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_liboverflow := -lc
BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libSimpleClassFileLoadHook := -lc
BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libGetNamedModuleTest := -lc
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_liboverflow := -lc
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libSimpleClassFileLoadHook := -lc
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libGetNamedModuleTest := -lc
endif
ifeq ($(OPENJDK_TARGET_OS), linux)
BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libtest-rw := -z noexecstack
BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libtest-rwx := -z execstack
BUILD_HOTSPOT_JTREG_EXECUTABLES_LDFLAGS_exeinvoke := -ljvm -lpthread
BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exeinvoke := -ljvm -lpthread
BUILD_TEST_invoke_exeinvoke.c_OPTIMIZATION := NONE
endif

View File

@ -4680,7 +4680,7 @@ encode %{
Label retaddr;
__ adr(rscratch2, retaddr);
__ lea(rscratch1, RuntimeAddress(entry));
// Leave a breadcrumb for JavaThread::pd_last_frame().
// Leave a breadcrumb for JavaFrameAnchor::capture_last_Java_pc()
__ stp(zr, rscratch2, Address(__ pre(sp, -2 * wordSize)));
__ blrt(rscratch1, gpcnt, fpcnt, rtype);
__ bind(retaddr);

View File

@ -78,7 +78,7 @@ int StubAssembler::call_RT(Register oop_result1, Register metadata_result, addre
}
pop(r0, sp);
#endif
reset_last_Java_frame(true, true);
reset_last_Java_frame(true);
maybe_isb();
// check for pending exceptions
@ -547,7 +547,7 @@ OopMapSet* Runtime1::generate_patching(StubAssembler* sasm, address target) {
__ bind(L);
}
#endif
__ reset_last_Java_frame(true, false);
__ reset_last_Java_frame(true);
__ maybe_isb();
// check for pending exceptions

View File

@ -336,13 +336,16 @@ frame frame::sender_for_entry_frame(RegisterMap* map) const {
JavaFrameAnchor* jfa = entry_frame_call_wrapper()->anchor();
assert(!entry_frame_is_first(), "next Java fp must be non zero");
assert(jfa->last_Java_sp() > sp(), "must be above this frame on stack");
// Since we are walking the stack now this nested anchor is obviously walkable
// even if it wasn't when it was stacked.
if (!jfa->walkable()) {
// Capture _last_Java_pc (if needed) and mark anchor walkable.
jfa->capture_last_Java_pc();
}
map->clear();
assert(map->include_argument_oops(), "should be set by clear");
if (jfa->last_Java_pc() != NULL ) {
frame fr(jfa->last_Java_sp(), jfa->last_Java_fp(), jfa->last_Java_pc());
return fr;
}
frame fr(jfa->last_Java_sp(), jfa->last_Java_fp());
vmassert(jfa->last_Java_pc() != NULL, "not walkable");
frame fr(jfa->last_Java_sp(), jfa->last_Java_fp(), jfa->last_Java_pc());
return fr;
}
@ -769,3 +772,21 @@ frame::frame(void* sp, void* fp, void* pc) {
init((intptr_t*)sp, (intptr_t*)fp, (address)pc);
}
#endif
void JavaFrameAnchor::make_walkable(JavaThread* thread) {
// last frame set?
if (last_Java_sp() == NULL) return;
// already walkable?
if (walkable()) return;
vmassert(Thread::current() == (Thread*)thread, "not current thread");
vmassert(last_Java_sp() != NULL, "not called from Java code?");
vmassert(last_Java_pc() == NULL, "already walkable");
capture_last_Java_pc();
vmassert(walkable(), "something went wrong");
}
void JavaFrameAnchor::capture_last_Java_pc() {
vmassert(_last_Java_sp != NULL, "no last frame set");
vmassert(_last_Java_pc == NULL, "already walkable");
_last_Java_pc = (address)_last_Java_sp[-1];
}

View File

@ -201,7 +201,7 @@ class InterpreterMacroAssembler: public MacroAssembler {
// #endif
MacroAssembler::null_check(reg, offset);
// #ifdef ASSERT
// reset_last_Java_frame(true, false);
// reset_last_Java_frame(true);
// #endif
}

View File

@ -64,10 +64,9 @@ public:
_last_Java_sp = src->_last_Java_sp;
}
// Always walkable
bool walkable(void) { return true; }
// Never any thing to do since we are always walkable and can find address of return addresses
void make_walkable(JavaThread* thread) { }
bool walkable(void) { return _last_Java_sp != NULL && _last_Java_pc != NULL; }
void make_walkable(JavaThread* thread);
void capture_last_Java_pc(void);
intptr_t* last_Java_sp(void) const { return _last_Java_sp; }

View File

@ -274,19 +274,18 @@ void MacroAssembler::serialize_memory(Register thread, Register tmp) {
}
void MacroAssembler::reset_last_Java_frame(bool clear_fp,
bool clear_pc) {
void MacroAssembler::reset_last_Java_frame(bool clear_fp) {
// we must set sp to zero to clear frame
str(zr, Address(rthread, JavaThread::last_Java_sp_offset()));
// must clear fp, so that compiled frames are not confused; it is
// possible that we need it only for debugging
if (clear_fp) {
str(zr, Address(rthread, JavaThread::last_Java_fp_offset()));
}
if (clear_pc) {
str(zr, Address(rthread, JavaThread::last_Java_pc_offset()));
}
// Always clear the pc because it could have been set by make_walkable()
str(zr, Address(rthread, JavaThread::last_Java_pc_offset()));
}
// Calls to C land
@ -632,7 +631,7 @@ void MacroAssembler::call_VM_base(Register oop_result,
// reset last Java frame
// Only interpreter should have to clear fp
reset_last_Java_frame(true, true);
reset_last_Java_frame(true);
// C++ interp handles this in the interpreter
check_and_handle_popframe(java_thread);
@ -875,7 +874,7 @@ void MacroAssembler:: notify(int type) {
if (type == bytecode_start) {
// set_last_Java_frame(esp, rfp, (address)NULL);
Assembler:: notify(type);
// reset_last_Java_frame(true, false);
// reset_last_Java_frame(true);
}
else
Assembler:: notify(type);

View File

@ -757,10 +757,10 @@ public:
Register last_java_pc,
Register scratch);
void reset_last_Java_frame(Register thread, bool clearfp, bool clear_pc);
void reset_last_Java_frame(Register thread);
// thread in the default location (r15_thread on 64bit)
void reset_last_Java_frame(bool clear_fp, bool clear_pc);
// thread in the default location (rthread)
void reset_last_Java_frame(bool clear_fp);
// Stores
void store_check(Register obj); // store check for obj - register is destroyed afterwards

View File

@ -2030,7 +2030,7 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
__ bind(dtrace_method_exit_done);
}
__ reset_last_Java_frame(false, true);
__ reset_last_Java_frame(false);
// Unpack oop result
if (ret_type == T_OBJECT || ret_type == T_ARRAY) {
@ -2370,7 +2370,7 @@ void SharedRuntime::generate_deopt_blob() {
__ bind(retaddr);
oop_maps->add_gc_map( __ pc()-start, map->deep_copy());
__ reset_last_Java_frame(false, false);
__ reset_last_Java_frame(false);
__ b(after_fetch_unroll_info_call);
} // EnableJVMCI
@ -2465,7 +2465,7 @@ void SharedRuntime::generate_deopt_blob() {
// find any register it might need.
oop_maps->add_gc_map(__ pc() - start, map);
__ reset_last_Java_frame(false, true);
__ reset_last_Java_frame(false);
#if INCLUDE_JVMCI
if (EnableJVMCI) {
@ -2606,7 +2606,7 @@ void SharedRuntime::generate_deopt_blob() {
new OopMap( frame_size_in_words, 0 ));
// Clear fp AND pc
__ reset_last_Java_frame(true, true);
__ reset_last_Java_frame(true);
// Collect return values
__ ldrd(v0, Address(sp, RegisterSaver::v0_offset_in_bytes()));
@ -2709,7 +2709,7 @@ void SharedRuntime::generate_uncommon_trap_blob() {
oop_maps->add_gc_map(__ pc() - start, map);
__ reset_last_Java_frame(false, true);
__ reset_last_Java_frame(false);
// move UnrollBlock* into r4
__ mov(r4, r0);
@ -2828,7 +2828,7 @@ void SharedRuntime::generate_uncommon_trap_blob() {
oop_maps->add_gc_map(the_pc - start, new OopMap(SimpleRuntimeFrame::framesize, 0));
// Clear fp AND pc
__ reset_last_Java_frame(true, true);
__ reset_last_Java_frame(true);
// Pop self-frame.
__ leave(); // Epilog
@ -2906,7 +2906,7 @@ SafepointBlob* SharedRuntime::generate_handler_blob(address call_ptr, int poll_t
Label noException;
__ reset_last_Java_frame(false, true);
__ reset_last_Java_frame(false);
__ maybe_isb();
__ membar(Assembler::LoadLoad | Assembler::LoadStore);
@ -2985,7 +2985,7 @@ RuntimeStub* SharedRuntime::generate_resolve_blob(address destination, const cha
// r0 contains the address we are going to jump to assuming no exception got installed
// clear last_Java_sp
__ reset_last_Java_frame(false, true);
__ reset_last_Java_frame(false);
// check for pending exceptions
Label pending;
__ ldr(rscratch1, Address(rthread, Thread::pending_exception_offset()));
@ -3116,7 +3116,7 @@ void OptoRuntime::generate_exception_blob() {
oop_maps->add_gc_map(the_pc - start, new OopMap(SimpleRuntimeFrame::framesize, 0));
__ reset_last_Java_frame(false, true);
__ reset_last_Java_frame(false);
// Restore callee-saved registers

View File

@ -3801,7 +3801,7 @@ class StubGenerator: public StubCodeGenerator {
oop_maps->add_gc_map(the_pc - start, map);
__ reset_last_Java_frame(true, true);
__ reset_last_Java_frame(true);
__ maybe_isb();
__ leave();

View File

@ -1353,7 +1353,7 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
__ stlrw(rscratch1, rscratch2);
// reset_last_Java_frame
__ reset_last_Java_frame(true, true);
__ reset_last_Java_frame(true);
// reset handle block
__ ldr(t, Address(rthread, JavaThread::active_handles_offset()));

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@ -852,26 +852,23 @@ void TemplateTable::aload_0_internal(RewriteControl rc) {
// get next bytecode
__ load_unsigned_byte(r1, at_bcp(Bytecodes::length_for(Bytecodes::_aload_0)));
// do actual aload_0
aload(0);
// if _getfield then wait with rewrite
__ cmpw(r1, Bytecodes::Bytecodes::_getfield);
__ br(Assembler::EQ, done);
// if _igetfield then reqrite to _fast_iaccess_0
// if _igetfield then rewrite to _fast_iaccess_0
assert(Bytecodes::java_code(Bytecodes::_fast_iaccess_0) == Bytecodes::_aload_0, "fix bytecode definition");
__ cmpw(r1, Bytecodes::_fast_igetfield);
__ movw(bc, Bytecodes::_fast_iaccess_0);
__ br(Assembler::EQ, rewrite);
// if _agetfield then reqrite to _fast_aaccess_0
// if _agetfield then rewrite to _fast_aaccess_0
assert(Bytecodes::java_code(Bytecodes::_fast_aaccess_0) == Bytecodes::_aload_0, "fix bytecode definition");
__ cmpw(r1, Bytecodes::_fast_agetfield);
__ movw(bc, Bytecodes::_fast_aaccess_0);
__ br(Assembler::EQ, rewrite);
// if _fgetfield then reqrite to _fast_faccess_0
// if _fgetfield then rewrite to _fast_faccess_0
assert(Bytecodes::java_code(Bytecodes::_fast_faccess_0) == Bytecodes::_aload_0, "fix bytecode definition");
__ cmpw(r1, Bytecodes::_fast_fgetfield);
__ movw(bc, Bytecodes::_fast_faccess_0);
@ -887,9 +884,10 @@ void TemplateTable::aload_0_internal(RewriteControl rc) {
patch_bytecode(Bytecodes::_aload_0, bc, r1, false);
__ bind(done);
} else {
aload(0);
}
// Do actual aload_0 (must do this after patch_bytecode which might call VM and GC might change oop).
aload(0);
}
void TemplateTable::istore()

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@ -28,6 +28,7 @@
#include "runtime/globals_extension.hpp"
#include "runtime/vm_version.hpp"
#include "utilities/sizes.hpp"
class VM_Version : public Abstract_VM_Version {
friend class JVMCIVMStructs;

View File

@ -705,9 +705,6 @@ void TemplateTable::aload_0_internal(RewriteControl rc) {
// get next byte
__ ldub(at_bcp(Bytecodes::length_for(Bytecodes::_aload_0)), G3_scratch);
// do actual aload_0
aload(0);
// if _getfield then wait with rewrite
__ cmp_and_br_short(G3_scratch, (int)Bytecodes::_getfield, Assembler::equal, Assembler::pn, done);
@ -738,9 +735,10 @@ void TemplateTable::aload_0_internal(RewriteControl rc) {
__ bind(rewrite);
patch_bytecode(Bytecodes::_aload_0, G4_scratch, G3_scratch, false);
__ bind(done);
} else {
aload(0);
}
// Do actual aload_0 (must do this after patch_bytecode which might call VM and GC might change oop).
aload(0);
}
void TemplateTable::istore() {

View File

@ -98,7 +98,7 @@ int StubAssembler::call_RT(Register oop_result1, Register metadata_result, addre
}
pop(rax);
#endif
reset_last_Java_frame(thread, true, align_stack);
reset_last_Java_frame(thread, true);
// discard thread and arguments
NOT_LP64(addptr(rsp, num_rt_args()*BytesPerWord));
@ -872,7 +872,7 @@ OopMapSet* Runtime1::generate_patching(StubAssembler* sasm, address target) {
}
__ pop(rax);
#endif
__ reset_last_Java_frame(thread, true, false);
__ reset_last_Java_frame(thread, true);
#ifndef _LP64
__ pop(rcx); // discard thread arg
__ pop(rcx); // discard dummy

View File

@ -337,13 +337,16 @@ frame frame::sender_for_entry_frame(RegisterMap* map) const {
JavaFrameAnchor* jfa = entry_frame_call_wrapper()->anchor();
assert(!entry_frame_is_first(), "next Java fp must be non zero");
assert(jfa->last_Java_sp() > sp(), "must be above this frame on stack");
// Since we are walking the stack now this nested anchor is obviously walkable
// even if it wasn't when it was stacked.
if (!jfa->walkable()) {
// Capture _last_Java_pc (if needed) and mark anchor walkable.
jfa->capture_last_Java_pc();
}
map->clear();
assert(map->include_argument_oops(), "should be set by clear");
if (jfa->last_Java_pc() != NULL ) {
frame fr(jfa->last_Java_sp(), jfa->last_Java_fp(), jfa->last_Java_pc());
return fr;
}
frame fr(jfa->last_Java_sp(), jfa->last_Java_fp());
vmassert(jfa->last_Java_pc() != NULL, "not walkable");
frame fr(jfa->last_Java_sp(), jfa->last_Java_fp(), jfa->last_Java_pc());
return fr;
}
@ -666,3 +669,21 @@ frame::frame(void* sp, void* fp, void* pc) {
init((intptr_t*)sp, (intptr_t*)fp, (address)pc);
}
#endif
void JavaFrameAnchor::make_walkable(JavaThread* thread) {
// last frame set?
if (last_Java_sp() == NULL) return;
// already walkable?
if (walkable()) return;
vmassert(Thread::current() == (Thread*)thread, "not current thread");
vmassert(last_Java_sp() != NULL, "not called from Java code?");
vmassert(last_Java_pc() == NULL, "already walkable");
capture_last_Java_pc();
vmassert(walkable(), "something went wrong");
}
void JavaFrameAnchor::capture_last_Java_pc() {
vmassert(_last_Java_sp != NULL, "no last frame set");
vmassert(_last_Java_pc == NULL, "already walkable");
_last_Java_pc = (address)_last_Java_sp[-1];
}

View File

@ -101,6 +101,7 @@ inline frame::frame(intptr_t* sp, intptr_t* fp) {
// call a specialized frame constructor instead of this one.
// Then we could use the assert below. However this assert is of somewhat dubious
// value.
// UPDATE: this constructor is only used by trace_method_handle_stub() now.
// assert(_pc != NULL, "no pc?");
_cb = CodeCache::find_blob(_pc);

View File

@ -62,10 +62,9 @@ public:
_last_Java_sp = src->_last_Java_sp;
}
// Always walkable
bool walkable(void) { return true; }
// Never any thing to do since we are always walkable and can find address of return addresses
void make_walkable(JavaThread* thread) { }
bool walkable(void) { return _last_Java_sp != NULL && _last_Java_pc != NULL; }
void make_walkable(JavaThread* thread);
void capture_last_Java_pc(void);
intptr_t* last_Java_sp(void) const { return _last_Java_sp; }

View File

@ -752,8 +752,7 @@ void MacroAssembler::pushptr(AddressLiteral src) {
}
}
void MacroAssembler::reset_last_Java_frame(bool clear_fp,
bool clear_pc) {
void MacroAssembler::reset_last_Java_frame(bool clear_fp) {
// we must set sp to zero to clear frame
movptr(Address(r15_thread, JavaThread::last_Java_sp_offset()), NULL_WORD);
// must clear fp, so that compiled frames are not confused; it is
@ -762,9 +761,8 @@ void MacroAssembler::reset_last_Java_frame(bool clear_fp,
movptr(Address(r15_thread, JavaThread::last_Java_fp_offset()), NULL_WORD);
}
if (clear_pc) {
movptr(Address(r15_thread, JavaThread::last_Java_pc_offset()), NULL_WORD);
}
// Always clear the pc because it could have been set by make_walkable()
movptr(Address(r15_thread, JavaThread::last_Java_pc_offset()), NULL_WORD);
}
void MacroAssembler::set_last_Java_frame(Register last_java_sp,
@ -2531,7 +2529,7 @@ void MacroAssembler::call_VM_base(Register oop_result,
}
// reset last Java frame
// Only interpreter should have to clear fp
reset_last_Java_frame(java_thread, true, false);
reset_last_Java_frame(java_thread, true);
// C++ interp handles this in the interpreter
check_and_handle_popframe(java_thread);
@ -3642,8 +3640,7 @@ void MacroAssembler::push_IU_state() {
pusha();
}
void MacroAssembler::reset_last_Java_frame(Register java_thread, bool clear_fp, bool clear_pc) {
// determine java_thread register
void MacroAssembler::reset_last_Java_frame(Register java_thread, bool clear_fp) { // determine java_thread register
if (!java_thread->is_valid()) {
java_thread = rdi;
get_thread(java_thread);
@ -3654,8 +3651,8 @@ void MacroAssembler::reset_last_Java_frame(Register java_thread, bool clear_fp,
movptr(Address(java_thread, JavaThread::last_Java_fp_offset()), NULL_WORD);
}
if (clear_pc)
movptr(Address(java_thread, JavaThread::last_Java_pc_offset()), NULL_WORD);
// Always clear the pc because it could have been set by make_walkable()
movptr(Address(java_thread, JavaThread::last_Java_pc_offset()), NULL_WORD);
}

View File

@ -288,10 +288,10 @@ class MacroAssembler: public Assembler {
Register last_java_fp,
address last_java_pc);
void reset_last_Java_frame(Register thread, bool clear_fp, bool clear_pc);
void reset_last_Java_frame(Register thread, bool clear_fp);
// thread in the default location (r15_thread on 64bit)
void reset_last_Java_frame(bool clear_fp, bool clear_pc);
void reset_last_Java_frame(bool clear_fp);
// Stores
void store_check(Register obj); // store check for obj - register is destroyed afterwards

View File

@ -117,7 +117,7 @@ void OptoRuntime::generate_exception_blob() {
// No registers to map, rbp is known implicitly
oop_maps->add_gc_map( __ pc() - start, new OopMap( framesize, 0 ));
__ get_thread(rcx);
__ reset_last_Java_frame(rcx, false, false);
__ reset_last_Java_frame(rcx, false);
// Restore callee-saved registers
__ movptr(rbp, Address(rsp, rbp_off * wordSize));

View File

@ -1330,7 +1330,7 @@ static void check_needs_gc_for_critical_native(MacroAssembler* masm,
__ increment(rsp, wordSize);
__ get_thread(thread);
__ reset_last_Java_frame(thread, false, true);
__ reset_last_Java_frame(thread, false);
save_or_restore_arguments(masm, stack_slots, total_in_args,
arg_save_area, NULL, in_regs, in_sig_bt);
@ -2224,7 +2224,7 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
// We can finally stop using that last_Java_frame we setup ages ago
__ reset_last_Java_frame(thread, false, true);
__ reset_last_Java_frame(thread, false);
// Unpack oop result
if (ret_type == T_OBJECT || ret_type == T_ARRAY) {
@ -2553,7 +2553,7 @@ void SharedRuntime::generate_deopt_blob() {
__ pop(rcx);
__ get_thread(rcx);
__ reset_last_Java_frame(rcx, false, false);
__ reset_last_Java_frame(rcx, false);
// Load UnrollBlock into EDI
__ mov(rdi, rax);
@ -2702,7 +2702,7 @@ void SharedRuntime::generate_deopt_blob() {
__ push(rax);
__ get_thread(rcx);
__ reset_last_Java_frame(rcx, false, false);
__ reset_last_Java_frame(rcx, false);
// Collect return values
__ movptr(rax,Address(rsp, (RegisterSaver::raxOffset() + additional_words + 1)*wordSize));
@ -2806,7 +2806,7 @@ void SharedRuntime::generate_uncommon_trap_blob() {
__ get_thread(rcx);
__ reset_last_Java_frame(rcx, false, false);
__ reset_last_Java_frame(rcx, false);
// Load UnrollBlock into EDI
__ movptr(rdi, rax);
@ -2912,7 +2912,7 @@ void SharedRuntime::generate_uncommon_trap_blob() {
oop_maps->add_gc_map( __ pc()-start, new OopMap( framesize, 0 ) );
__ get_thread(rdi);
__ reset_last_Java_frame(rdi, true, false);
__ reset_last_Java_frame(rdi, true);
// Pop self-frame.
__ leave(); // Epilog!
@ -3007,7 +3007,7 @@ SafepointBlob* SharedRuntime::generate_handler_blob(address call_ptr, int poll_t
// Clear last_Java_sp again
__ get_thread(java_thread);
__ reset_last_Java_frame(java_thread, false, false);
__ reset_last_Java_frame(java_thread, false);
__ cmpptr(Address(java_thread, Thread::pending_exception_offset()), (int32_t)NULL_WORD);
__ jcc(Assembler::equal, noException);
@ -3082,7 +3082,7 @@ RuntimeStub* SharedRuntime::generate_resolve_blob(address destination, const cha
__ addptr(rsp, wordSize);
// clear last_Java_sp
__ reset_last_Java_frame(thread, true, false);
__ reset_last_Java_frame(thread, true);
// check for pending exceptions
Label pending;
__ cmpptr(Address(thread, Thread::pending_exception_offset()), (int32_t)NULL_WORD);

View File

@ -1461,7 +1461,7 @@ static void check_needs_gc_for_critical_native(MacroAssembler* masm,
__ mov(rsp, r12); // restore sp
__ reinit_heapbase();
__ reset_last_Java_frame(false, true);
__ reset_last_Java_frame(false);
save_or_restore_arguments(masm, stack_slots, total_in_args,
arg_save_area, NULL, in_regs, in_sig_bt);
@ -2577,7 +2577,7 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
restore_native_result(masm, ret_type, stack_slots);
}
__ reset_last_Java_frame(false, true);
__ reset_last_Java_frame(false);
// Unpack oop result
if (ret_type == T_OBJECT || ret_type == T_ARRAY) {
@ -2849,7 +2849,7 @@ void SharedRuntime::generate_deopt_blob() {
__ call(RuntimeAddress(CAST_FROM_FN_PTR(address, Deoptimization::uncommon_trap)));
oop_maps->add_gc_map( __ pc()-start, map->deep_copy());
__ reset_last_Java_frame(false, false);
__ reset_last_Java_frame(false);
__ jmp(after_fetch_unroll_info_call);
} // EnableJVMCI
@ -2939,7 +2939,7 @@ void SharedRuntime::generate_deopt_blob() {
// find any register it might need.
oop_maps->add_gc_map(__ pc() - start, map);
__ reset_last_Java_frame(false, false);
__ reset_last_Java_frame(false);
#if INCLUDE_JVMCI
if (EnableJVMCI) {
@ -3087,7 +3087,7 @@ void SharedRuntime::generate_deopt_blob() {
new OopMap( frame_size_in_words, 0 ));
// Clear fp AND pc
__ reset_last_Java_frame(true, true);
__ reset_last_Java_frame(true);
// Collect return values
__ movdbl(xmm0, Address(rsp, RegisterSaver::xmm0_offset_in_bytes()));
@ -3164,7 +3164,7 @@ void SharedRuntime::generate_uncommon_trap_blob() {
oop_maps->add_gc_map(__ pc() - start, map);
__ reset_last_Java_frame(false, false);
__ reset_last_Java_frame(false);
// Load UnrollBlock* into rdi
__ mov(rdi, rax);
@ -3281,7 +3281,7 @@ void SharedRuntime::generate_uncommon_trap_blob() {
oop_maps->add_gc_map(the_pc - start, new OopMap(SimpleRuntimeFrame::framesize, 0));
// Clear fp AND pc
__ reset_last_Java_frame(true, true);
__ reset_last_Java_frame(true);
// Pop self-frame.
__ leave(); // Epilog
@ -3364,7 +3364,7 @@ SafepointBlob* SharedRuntime::generate_handler_blob(address call_ptr, int poll_t
Label noException;
__ reset_last_Java_frame(false, false);
__ reset_last_Java_frame(false);
__ cmpptr(Address(r15_thread, Thread::pending_exception_offset()), (int32_t)NULL_WORD);
__ jcc(Assembler::equal, noException);
@ -3434,7 +3434,7 @@ RuntimeStub* SharedRuntime::generate_resolve_blob(address destination, const cha
// rax contains the address we are going to jump to assuming no exception got installed
// clear last_Java_sp
__ reset_last_Java_frame(false, false);
__ reset_last_Java_frame(false);
// check for pending exceptions
Label pending;
__ cmpptr(Address(r15_thread, Thread::pending_exception_offset()), (int32_t)NULL_WORD);
@ -3809,7 +3809,7 @@ void OptoRuntime::generate_exception_blob() {
oop_maps->add_gc_map(the_pc - start, new OopMap(SimpleRuntimeFrame::framesize, 0));
__ reset_last_Java_frame(false, true);
__ reset_last_Java_frame(false);
// Restore callee-saved registers

View File

@ -3766,7 +3766,7 @@ class StubGenerator: public StubCodeGenerator {
// however can use the register value directly if it is callee saved.
__ get_thread(java_thread);
__ reset_last_Java_frame(java_thread, true, false);
__ reset_last_Java_frame(java_thread, true);
__ leave(); // required for proper stackwalking of RuntimeStub frame

View File

@ -5018,7 +5018,7 @@ class StubGenerator: public StubCodeGenerator {
oop_maps->add_gc_map(the_pc - start, map);
__ reset_last_Java_frame(true, true);
__ reset_last_Java_frame(true);
__ leave(); // required for proper stackwalking of RuntimeStub frame

View File

@ -1167,7 +1167,7 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
__ movl(Address(thread, JavaThread::thread_state_offset()), _thread_in_Java);
// reset_last_Java_frame
__ reset_last_Java_frame(thread, true, true);
__ reset_last_Java_frame(thread, true);
// reset handle block
__ movptr(t, Address(thread, JavaThread::active_handles_offset()));
@ -1659,7 +1659,7 @@ void TemplateInterpreterGenerator::generate_throw_exception() {
__ set_last_Java_frame(noreg, rbp, __ pc());
__ super_call_VM_leaf(CAST_FROM_FN_PTR(address, InterpreterRuntime::popframe_move_outgoing_args), r15_thread, c_rarg1, c_rarg2);
#endif
__ reset_last_Java_frame(thread, true, true);
__ reset_last_Java_frame(thread, true);
// Restore the last_sp and null it out
__ movptr(rsp, Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize));

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, 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
@ -858,26 +858,23 @@ void TemplateTable::aload_0_internal(RewriteControl rc) {
// get next byte
__ load_unsigned_byte(rbx, at_bcp(Bytecodes::length_for(Bytecodes::_aload_0)));
// do actual aload_0
aload(0);
// if _getfield then wait with rewrite
__ cmpl(rbx, Bytecodes::_getfield);
__ jcc(Assembler::equal, done);
// if _igetfield then reqrite to _fast_iaccess_0
// if _igetfield then rewrite to _fast_iaccess_0
assert(Bytecodes::java_code(Bytecodes::_fast_iaccess_0) == Bytecodes::_aload_0, "fix bytecode definition");
__ cmpl(rbx, Bytecodes::_fast_igetfield);
__ movl(bc, Bytecodes::_fast_iaccess_0);
__ jccb(Assembler::equal, rewrite);
// if _agetfield then reqrite to _fast_aaccess_0
// if _agetfield then rewrite to _fast_aaccess_0
assert(Bytecodes::java_code(Bytecodes::_fast_aaccess_0) == Bytecodes::_aload_0, "fix bytecode definition");
__ cmpl(rbx, Bytecodes::_fast_agetfield);
__ movl(bc, Bytecodes::_fast_aaccess_0);
__ jccb(Assembler::equal, rewrite);
// if _fgetfield then reqrite to _fast_faccess_0
// if _fgetfield then rewrite to _fast_faccess_0
assert(Bytecodes::java_code(Bytecodes::_fast_faccess_0) == Bytecodes::_aload_0, "fix bytecode definition");
__ cmpl(rbx, Bytecodes::_fast_fgetfield);
__ movl(bc, Bytecodes::_fast_faccess_0);
@ -893,9 +890,10 @@ void TemplateTable::aload_0_internal(RewriteControl rc) {
patch_bytecode(Bytecodes::_aload_0, bc, rbx, false);
__ bind(done);
} else {
aload(0);
}
// Do actual aload_0 (must do this after patch_bytecode which might call VM and GC might change oop).
aload(0);
}
void TemplateTable::istore() {

View File

@ -986,7 +986,7 @@ void MachEpilogNode::emit(CodeBuffer& cbuf, PhaseRegAlloc* ra_) const
emit_opcode(cbuf, 0x58 | RBP_enc);
if (StackReservedPages > 0 && C->has_reserved_stack_access()) {
__ reserved_stack_check();
__ reserved_stack_check();
}
if (do_polling() && C->is_method_compilation()) {
@ -7355,7 +7355,7 @@ instruct compareAndSwapB(rRegI res,
"movzbl $res, $res" %}
opcode(0x0F, 0xB0);
ins_encode(lock_prefix,
REX_reg_mem(newval, mem_ptr),
REX_breg_mem(newval, mem_ptr),
OpcP, OpcS,
reg_mem(newval, mem_ptr),
REX_breg(res), Opcode(0x0F), Opcode(0x94), reg(res), // sete
@ -7380,7 +7380,7 @@ instruct compareAndSwapS(rRegI res,
opcode(0x0F, 0xB1);
ins_encode(lock_prefix,
SizePrefix,
REX_reg_mem(newval, mem_ptr),
REX_reg_mem(newval, mem_ptr),
OpcP, OpcS,
reg_mem(newval, mem_ptr),
REX_breg(res), Opcode(0x0F), Opcode(0x94), reg(res), // sete
@ -7424,7 +7424,7 @@ instruct compareAndExchangeB(
"If rax == $mem_ptr then store $newval into $mem_ptr\n\t" %}
opcode(0x0F, 0xB0);
ins_encode(lock_prefix,
REX_reg_mem(newval, mem_ptr),
REX_breg_mem(newval, mem_ptr),
OpcP, OpcS,
reg_mem(newval, mem_ptr) // lock cmpxchg
);

View File

@ -37,7 +37,7 @@
#include "prims/jvmtiExport.hpp"
#include "prims/jvmtiThreadState.hpp"
#include "runtime/arguments.hpp"
#include "runtime/atomic.inline.hpp"
#include "runtime/atomic.hpp"
#include "runtime/deoptimization.hpp"
#include "runtime/frame.inline.hpp"
#include "runtime/interfaceSupport.hpp"

View File

@ -32,6 +32,7 @@ import sun.jvm.hotspot.types.CIntegerField;
import sun.jvm.hotspot.types.Type;
import sun.jvm.hotspot.types.TypeDataBase;
import sun.jvm.hotspot.utilities.Assert;
import sun.jvm.hotspot.utilities.CStringUtilities;
import java.io.PrintStream;
import java.util.Observable;
@ -115,7 +116,7 @@ public class CodeBlob extends VMObject {
}
public String getName() {
return getName();
return CStringUtilities.getString(nameField.getValue(addr));
}
/** OopMap for frame; can return null if none available */

View File

@ -494,7 +494,7 @@ void AttachListener::vm_start() {
if (ret == 0) {
ret = ::unlink(fn);
if (ret == -1) {
debug_only(warning("failed to remove stale attach pid file at %s", fn));
log_debug(attach)("Failed to remove stale attach pid file at %s", fn);
}
}
}
@ -537,16 +537,23 @@ bool AttachListener::is_init_trigger() {
struct stat64 st;
RESTARTABLE(::stat64(fn, &st), ret);
if (ret == -1) {
log_trace(attach)("Failed to find attach file: %s, trying alternate", fn);
snprintf(fn, sizeof(fn), "%s/.attach_pid%d",
os::get_temp_directory(), os::current_process_id());
RESTARTABLE(::stat64(fn, &st), ret);
if (ret == -1) {
log_debug(attach)("Failed to find attach file: %s", fn);
}
}
if (ret == 0) {
// simple check to avoid starting the attach mechanism when
// a bogus user creates the file
if (st.st_uid == geteuid()) {
init();
log_trace(attach)("Attach trigerred by %s", fn);
return true;
} else {
log_debug(attach)("File %s has wrong user id %d (vs %d). Attach is not triggered", fn, st.st_uid, geteuid());
}
}
return false;

View File

@ -52,7 +52,7 @@
#include "prims/jvm.h"
#include "prims/jvm_misc.hpp"
#include "runtime/arguments.hpp"
#include "runtime/atomic.inline.hpp"
#include "runtime/atomic.hpp"
#include "runtime/extendedPC.hpp"
#include "runtime/globals.hpp"
#include "runtime/interfaceSupport.hpp"
@ -3800,10 +3800,6 @@ int os::stat(const char *path, struct stat *sbuf) {
return ::stat(pathbuf, sbuf);
}
bool os::check_heap(bool force) {
return true;
}
// Is a (classpath) directory empty?
bool os::dir_is_empty(const char* path) {
DIR *dir = NULL;

View File

@ -456,7 +456,7 @@ void AttachListener::vm_start() {
if (ret == 0) {
ret = ::unlink(fn);
if (ret == -1) {
debug_only(warning("failed to remove stale attach pid file at %s", fn));
log_debug(attach)("Failed to remove stale attach pid file at %s", fn);
}
}
}
@ -493,19 +493,25 @@ bool AttachListener::is_init_trigger() {
if (init_at_startup() || is_initialized()) {
return false; // initialized at startup or already initialized
}
char path[PATH_MAX + 1];
char fn[PATH_MAX + 1];
int ret;
struct stat st;
snprintf(path, PATH_MAX + 1, "%s/.attach_pid%d",
snprintf(fn, PATH_MAX + 1, "%s/.attach_pid%d",
os::get_temp_directory(), os::current_process_id());
RESTARTABLE(::stat(path, &st), ret);
RESTARTABLE(::stat(fn, &st), ret);
if (ret == -1) {
log_debug(attach)("Failed to find attach file: %s", fn);
}
if (ret == 0) {
// simple check to avoid starting the attach mechanism when
// a bogus user creates the file
if (st.st_uid == geteuid()) {
init();
log_trace(attach)("Attach trigerred by %s", fn);
return true;
} else {
log_debug(attach)("File %s has wrong user id %d (vs %d). Attach is not triggered", fn, st.st_uid, geteuid());
}
}
return false;

View File

@ -42,7 +42,7 @@
#include "prims/jvm.h"
#include "prims/jvm_misc.hpp"
#include "runtime/arguments.hpp"
#include "runtime/atomic.inline.hpp"
#include "runtime/atomic.hpp"
#include "runtime/extendedPC.hpp"
#include "runtime/globals.hpp"
#include "runtime/interfaceSupport.hpp"
@ -3780,11 +3780,6 @@ int os::compare_file_modified_times(const char* file1, const char* file2) {
return diff;
}
bool os::check_heap(bool force) {
return true;
}
// Is a (classpath) directory empty?
bool os::dir_is_empty(const char* path) {
DIR *dir = NULL;

View File

@ -453,7 +453,7 @@ void AttachListener::vm_start() {
if (ret == 0) {
ret = ::unlink(fn);
if (ret == -1) {
debug_only(warning("failed to remove stale attach pid file at %s", fn));
log_debug(attach)("Failed to remove stale attach pid file at %s", fn);
}
}
}
@ -496,16 +496,23 @@ bool AttachListener::is_init_trigger() {
struct stat64 st;
RESTARTABLE(::stat64(fn, &st), ret);
if (ret == -1) {
log_trace(attach)("Failed to find attach file: %s, trying alternate", fn);
snprintf(fn, sizeof(fn), "%s/.attach_pid%d",
os::get_temp_directory(), os::current_process_id());
RESTARTABLE(::stat64(fn, &st), ret);
if (ret == -1) {
log_debug(attach)("Failed to find attach file: %s", fn);
}
}
if (ret == 0) {
// simple check to avoid starting the attach mechanism when
// a bogus user creates the file
if (st.st_uid == geteuid()) {
init();
log_trace(attach)("Attach trigerred by %s", fn);
return true;
} else {
log_debug(attach)("File %s has wrong user id %d (vs %d). Attach is not trigerred", fn, st.st_uid, geteuid());
}
}
return false;

View File

@ -42,7 +42,7 @@
#include "prims/jvm.h"
#include "prims/jvm_misc.hpp"
#include "runtime/arguments.hpp"
#include "runtime/atomic.inline.hpp"
#include "runtime/atomic.hpp"
#include "runtime/extendedPC.hpp"
#include "runtime/globals.hpp"
#include "runtime/interfaceSupport.hpp"
@ -5174,10 +5174,6 @@ int os::stat(const char *path, struct stat *sbuf) {
return ::stat(pathbuf, sbuf);
}
bool os::check_heap(bool force) {
return true;
}
// Is a (classpath) directory empty?
bool os::dir_is_empty(const char* path) {
DIR *dir = NULL;

View File

@ -394,7 +394,7 @@ int SolarisAttachListener::create_door() {
snprintf(initial_path, sizeof(initial_path), "%s.tmp", door_path);
RESTARTABLE(::creat(initial_path, S_IRUSR | S_IWUSR), fd);
if (fd == -1) {
debug_only(warning("attempt to create %s failed", initial_path));
log_debug(attach)("attempt to create door file %s failed (%d)", initial_path, errno);
::door_revoke(dd);
return -1;
}
@ -409,6 +409,7 @@ int SolarisAttachListener::create_door() {
res = ::fattach(dd, initial_path);
}
if (res == -1) {
log_debug(attach)("unable to create door - fattach failed (%d)", errno);
::door_revoke(dd);
dd = -1;
}
@ -419,12 +420,14 @@ int SolarisAttachListener::create_door() {
if (::rename(initial_path, door_path) == -1) {
::close(dd);
::fdetach(initial_path);
log_debug(attach)("unable to create door - rename %s to %s failed (%d)", errno);
dd = -1;
}
}
if (dd >= 0) {
set_door_descriptor(dd);
set_door_path(door_path);
log_trace(attach)("door file %s created succesfully", door_path);
} else {
// unable to create door, attach it to file, or rename file into place
::unlink(initial_path);
@ -602,7 +605,7 @@ void AttachListener::vm_start() {
if (ret == 0) {
ret = ::unlink(fn);
if (ret == -1) {
debug_only(warning("failed to remove stale attach pid file at %s", fn));
log_debug(attach)("Failed to remove stale attach pid file at %s", fn);
}
}
}
@ -645,9 +648,13 @@ bool AttachListener::is_init_trigger() {
struct stat64 st;
RESTARTABLE(::stat64(fn, &st), ret);
if (ret == -1) {
log_trace(attach)("Failed to find attach file: %s, trying alternate", fn);
snprintf(fn, sizeof(fn), "%s/.attach_pid%d",
os::get_temp_directory(), os::current_process_id());
RESTARTABLE(::stat64(fn, &st), ret);
if (ret == -1) {
log_debug(attach)("Failed to find attach file: %s", fn);
}
}
if (ret == 0) {
// simple check to avoid starting the attach mechanism when

View File

@ -42,7 +42,7 @@
#include "prims/jvm.h"
#include "prims/jvm_misc.hpp"
#include "runtime/arguments.hpp"
#include "runtime/atomic.inline.hpp"
#include "runtime/atomic.hpp"
#include "runtime/extendedPC.hpp"
#include "runtime/globals.hpp"
#include "runtime/interfaceSupport.hpp"
@ -4589,10 +4589,6 @@ void os::make_polling_page_readable(void) {
}
}
// OS interface.
bool os::check_heap(bool force) { return true; }
// Is a (classpath) directory empty?
bool os::dir_is_empty(const char* path) {
DIR *dir = NULL;

View File

@ -45,7 +45,7 @@
#include "prims/jvm.h"
#include "prims/jvm_misc.hpp"
#include "runtime/arguments.hpp"
#include "runtime/atomic.inline.hpp"
#include "runtime/atomic.hpp"
#include "runtime/extendedPC.hpp"
#include "runtime/globals.hpp"
#include "runtime/interfaceSupport.hpp"
@ -5258,75 +5258,6 @@ int os::fork_and_exec(char* cmd) {
}
}
//--------------------------------------------------------------------------------------------------
// Non-product code
static int mallocDebugIntervalCounter = 0;
static int mallocDebugCounter = 0;
// For debugging possible bugs inside HeapWalk (a ring buffer)
#define SAVE_COUNT 8
static PROCESS_HEAP_ENTRY saved_heap_entries[SAVE_COUNT];
static int saved_heap_entry_index;
bool os::check_heap(bool force) {
if (++mallocDebugCounter < MallocVerifyStart && !force) return true;
if (++mallocDebugIntervalCounter >= MallocVerifyInterval || force) {
// Note: HeapValidate executes two hardware breakpoints when it finds something
// wrong; at these points, eax contains the address of the offending block (I think).
// To get to the exlicit error message(s) below, just continue twice.
//
// Note: we want to check the CRT heap, which is not necessarily located in the
// process default heap.
HANDLE heap = (HANDLE) _get_heap_handle();
if (!heap) {
return true;
}
// If we fail to lock the heap, then gflags.exe has been used
// or some other special heap flag has been set that prevents
// locking. We don't try to walk a heap we can't lock.
if (HeapLock(heap) != 0) {
PROCESS_HEAP_ENTRY phe;
phe.lpData = NULL;
memset(saved_heap_entries, 0, sizeof(saved_heap_entries));
saved_heap_entry_index = 0;
int count = 0;
while (HeapWalk(heap, &phe) != 0) {
count ++;
if ((phe.wFlags & PROCESS_HEAP_ENTRY_BUSY) &&
!HeapValidate(heap, 0, phe.lpData)) {
tty->print_cr("C heap has been corrupted (time: %d allocations)", mallocDebugCounter);
tty->print_cr("corrupted block near address %#x, length %d, count %d", phe.lpData, phe.cbData, count);
HeapUnlock(heap);
fatal("corrupted C heap");
} else {
// Save previous seen entries in a ring buffer. We have seen strange
// heap corruption fatal errors that produced mdmp files, but when we load
// these mdmp files in WinDBG, "!heap -triage" shows no error.
// We can examine the saved_heap_entries[] array in the mdmp file to
// diagnose such seemingly spurious errors reported by HeapWalk.
saved_heap_entries[saved_heap_entry_index++] = phe;
if (saved_heap_entry_index >= SAVE_COUNT) {
saved_heap_entry_index = 0;
}
}
}
DWORD err = GetLastError();
if (err != ERROR_NO_MORE_ITEMS && err != ERROR_CALL_NOT_IMPLEMENTED &&
(err == ERROR_INVALID_FUNCTION && phe.lpData != NULL)) {
HeapUnlock(heap);
fatal("heap walk aborted with error %d", err);
}
HeapUnlock(heap);
}
mallocDebugIntervalCounter = 0;
}
return true;
}
bool os::find(address addr, outputStream* st) {
int offset = -1;
bool result = false;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -23,7 +23,7 @@
*/
#include "precompiled.hpp"
#include "runtime/atomic.inline.hpp"
#include "runtime/atomic.hpp"
#include "runtime/thread.inline.hpp"
#include "runtime/threadCritical.hpp"

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2014 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@ -23,11 +23,8 @@
*
*/
#ifndef OS_CPU_AIX_OJDKPPC_VM_ATOMIC_AIX_PPC_INLINE_HPP
#define OS_CPU_AIX_OJDKPPC_VM_ATOMIC_AIX_PPC_INLINE_HPP
#include "runtime/atomic.hpp"
#include "runtime/os.hpp"
#ifndef OS_CPU_AIX_OJDKPPC_VM_ATOMIC_AIX_PPC_HPP
#define OS_CPU_AIX_OJDKPPC_VM_ATOMIC_AIX_PPC_HPP
#ifndef _LP64
#error "Atomic currently only impleneted for PPC64"
@ -479,4 +476,4 @@ inline void* Atomic::cmpxchg_ptr(void* exchange_value, volatile void* dest, void
#undef strasm_nobarrier
#undef strasm_nobarrier_clobber_memory
#endif // OS_CPU_AIX_OJDKPPC_VM_ATOMIC_AIX_PPC_INLINE_HPP
#endif // OS_CPU_AIX_OJDKPPC_VM_ATOMIC_AIX_PPC_HPP

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2016, 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,10 +22,9 @@
*
*/
#ifndef OS_CPU_BSD_X86_VM_ATOMIC_BSD_X86_INLINE_HPP
#define OS_CPU_BSD_X86_VM_ATOMIC_BSD_X86_INLINE_HPP
#ifndef OS_CPU_BSD_X86_VM_ATOMIC_BSD_X86_HPP
#define OS_CPU_BSD_X86_VM_ATOMIC_BSD_X86_HPP
#include "runtime/atomic.hpp"
#include "runtime/os.hpp"
// Implementation of class atomic
@ -225,4 +224,4 @@ inline void Atomic::store(jlong store_value, volatile jlong* dest) {
#endif // AMD64
#endif // OS_CPU_BSD_X86_VM_ATOMIC_BSD_X86_INLINE_HPP
#endif // OS_CPU_BSD_X86_VM_ATOMIC_BSD_X86_HPP

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2016, 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,7 +25,7 @@
#ifndef OS_CPU_BSD_X86_VM_ORDERACCESS_BSD_X86_INLINE_HPP
#define OS_CPU_BSD_X86_VM_ORDERACCESS_BSD_X86_INLINE_HPP
#include "runtime/atomic.inline.hpp"
#include "runtime/atomic.hpp"
#include "runtime/orderAccess.hpp"
#include "runtime/os.hpp"

View File

@ -45,7 +45,7 @@ bool JavaThread::pd_get_top_frame(frame* fr_addr, void* ucontext, bool isInJava)
// If we have a last_Java_frame, then we should use it even if
// isInJava == true. It should be more reliable than ucontext info.
if (jt->has_last_Java_frame()) {
if (jt->has_last_Java_frame() && jt->frame_anchor()->walkable()) {
*fr_addr = jt->pd_last_frame();
return true;
}

View File

@ -32,12 +32,8 @@
frame pd_last_frame() {
assert(has_last_Java_frame(), "must have last_Java_sp() when suspended");
if (_anchor.last_Java_pc() != NULL) {
return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp(), _anchor.last_Java_pc());
} else {
// This will pick up pc from sp
return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp());
}
vmassert(_anchor.last_Java_pc() != NULL, "not walkable");
return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp(), _anchor.last_Java_pc());
}
public:

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright 2007, 2008, 2011, 2015, Red Hat, Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@ -23,10 +23,9 @@
*
*/
#ifndef OS_CPU_BSD_ZERO_VM_ATOMIC_BSD_ZERO_INLINE_HPP
#define OS_CPU_BSD_ZERO_VM_ATOMIC_BSD_ZERO_INLINE_HPP
#ifndef OS_CPU_BSD_ZERO_VM_ATOMIC_BSD_ZERO_HPP
#define OS_CPU_BSD_ZERO_VM_ATOMIC_BSD_ZERO_HPP
#include "runtime/atomic.hpp"
#include "runtime/os.hpp"
// Implementation of class atomic
@ -331,4 +330,4 @@ inline void Atomic::store(jlong store_value, volatile jlong* dest) {
os::atomic_copy64((volatile jlong*)&store_value, dest);
}
#endif // OS_CPU_BSD_ZERO_VM_ATOMIC_BSD_ZERO_INLINE_HPP
#endif // OS_CPU_BSD_ZERO_VM_ATOMIC_BSD_ZERO_HPP

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@ -23,11 +23,9 @@
*
*/
#ifndef OS_CPU_LINUX_AARCH64_VM_ATOMIC_LINUX_AARCH64_INLINE_HPP
#define OS_CPU_LINUX_AARCH64_VM_ATOMIC_LINUX_AARCH64_INLINE_HPP
#ifndef OS_CPU_LINUX_AARCH64_VM_ATOMIC_LINUX_AARCH64_HPP
#define OS_CPU_LINUX_AARCH64_VM_ATOMIC_LINUX_AARCH64_HPP
#include "runtime/atomic.hpp"
#include "runtime/os.hpp"
#include "vm_version_aarch64.hpp"
// Implementation of class atomic
@ -161,4 +159,4 @@ inline void* Atomic::cmpxchg_ptr(void* exchange_value, volatile void* dest, void
inline jlong Atomic::load(volatile jlong* src) { return *src; }
#endif // OS_CPU_LINUX_AARCH64_VM_ATOMIC_LINUX_AARCH64_INLINE_HPP
#endif // OS_CPU_LINUX_AARCH64_VM_ATOMIC_LINUX_AARCH64_HPP

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@ -26,7 +26,7 @@
#ifndef OS_CPU_LINUX_AARCH64_VM_ORDERACCESS_LINUX_AARCH64_INLINE_HPP
#define OS_CPU_LINUX_AARCH64_VM_ORDERACCESS_LINUX_AARCH64_INLINE_HPP
#include "runtime/atomic.inline.hpp"
#include "runtime/atomic.hpp"
#include "runtime/orderAccess.hpp"
#include "runtime/os.hpp"
#include "vm_version_aarch64.hpp"

View File

@ -47,7 +47,7 @@ bool JavaThread::pd_get_top_frame(frame* fr_addr, void* ucontext, bool isInJava)
// If we have a last_Java_frame, then we should use it even if
// isInJava == true. It should be more reliable than ucontext info.
if (jt->has_last_Java_frame()) {
if (jt->has_last_Java_frame() && jt->frame_anchor()->walkable()) {
*fr_addr = jt->pd_last_frame();
return true;
}

View File

@ -43,12 +43,7 @@
frame pd_last_frame() {
assert(has_last_Java_frame(), "must have last_Java_sp() when suspended");
if (_anchor.last_Java_pc() != NULL) {
return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp(), _anchor.last_Java_pc());
} else {
// This will pick up pc from sp
return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp());
}
return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp(), _anchor.last_Java_pc());
}
public:

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2014 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@ -23,11 +23,8 @@
*
*/
#ifndef OS_CPU_LINUX_PPC_VM_ATOMIC_LINUX_PPC_INLINE_HPP
#define OS_CPU_LINUX_PPC_VM_ATOMIC_LINUX_PPC_INLINE_HPP
#include "runtime/atomic.hpp"
#include "runtime/os.hpp"
#ifndef OS_CPU_LINUX_PPC_VM_ATOMIC_LINUX_PPC_HPP
#define OS_CPU_LINUX_PPC_VM_ATOMIC_LINUX_PPC_HPP
#ifndef PPC64
#error "Atomic currently only implemented for PPC64"
@ -479,4 +476,4 @@ inline void* Atomic::cmpxchg_ptr(void* exchange_value, volatile void* dest, void
#undef strasm_nobarrier
#undef strasm_nobarrier_clobber_memory
#endif // OS_CPU_LINUX_PPC_VM_ATOMIC_LINUX_PPC_INLINE_HPP
#endif // OS_CPU_LINUX_PPC_VM_ATOMIC_LINUX_PPC_HPP

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2016, 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,9 +25,6 @@
#ifndef OS_CPU_LINUX_SPARC_VM_ATOMIC_LINUX_SPARC_INLINE_HPP
#define OS_CPU_LINUX_SPARC_VM_ATOMIC_LINUX_SPARC_INLINE_HPP
#include "runtime/atomic.hpp"
#include "runtime/os.hpp"
// Implementation of class atomic
inline void Atomic::store (jbyte store_value, jbyte* dest) { *dest = store_value; }

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2016, 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,10 +22,9 @@
*
*/
#ifndef OS_CPU_LINUX_X86_VM_ATOMIC_LINUX_X86_INLINE_HPP
#define OS_CPU_LINUX_X86_VM_ATOMIC_LINUX_X86_INLINE_HPP
#ifndef OS_CPU_LINUX_X86_VM_ATOMIC_LINUX_X86_HPP
#define OS_CPU_LINUX_X86_VM_ATOMIC_LINUX_X86_HPP
#include "runtime/atomic.hpp"
#include "runtime/os.hpp"
// Implementation of class atomic
@ -225,4 +224,4 @@ inline void Atomic::store(jlong store_value, volatile jlong* dest) {
#endif // AMD64
#endif // OS_CPU_LINUX_X86_VM_ATOMIC_LINUX_X86_INLINE_HPP
#endif // OS_CPU_LINUX_X86_VM_ATOMIC_LINUX_X86_HPP

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2016, 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,7 +25,7 @@
#ifndef OS_CPU_LINUX_X86_VM_ORDERACCESS_LINUX_X86_INLINE_HPP
#define OS_CPU_LINUX_X86_VM_ORDERACCESS_LINUX_X86_INLINE_HPP
#include "runtime/atomic.inline.hpp"
#include "runtime/atomic.hpp"
#include "runtime/orderAccess.hpp"
#include "runtime/os.hpp"

View File

@ -46,7 +46,7 @@ bool JavaThread::pd_get_top_frame(frame* fr_addr, void* ucontext, bool isInJava)
// If we have a last_Java_frame, then we should use it even if
// isInJava == true. It should be more reliable than ucontext info.
if (jt->has_last_Java_frame()) {
if (jt->has_last_Java_frame() && jt->frame_anchor()->walkable()) {
*fr_addr = jt->pd_last_frame();
return true;
}

View File

@ -32,12 +32,8 @@
frame pd_last_frame() {
assert(has_last_Java_frame(), "must have last_Java_sp() when suspended");
if (_anchor.last_Java_pc() != NULL) {
return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp(), _anchor.last_Java_pc());
} else {
// This will pick up pc from sp
return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp());
}
vmassert(_anchor.last_Java_pc() != NULL, "not walkable");
return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp(), _anchor.last_Java_pc());
}
public:

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright 2007, 2008, 2011, 2015, Red Hat, Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@ -23,10 +23,9 @@
*
*/
#ifndef OS_CPU_LINUX_ZERO_VM_ATOMIC_LINUX_ZERO_INLINE_HPP
#define OS_CPU_LINUX_ZERO_VM_ATOMIC_LINUX_ZERO_INLINE_HPP
#ifndef OS_CPU_LINUX_ZERO_VM_ATOMIC_LINUX_ZERO_HPP
#define OS_CPU_LINUX_ZERO_VM_ATOMIC_LINUX_ZERO_HPP
#include "runtime/atomic.hpp"
#include "runtime/os.hpp"
// Implementation of class atomic
@ -325,4 +324,4 @@ inline void Atomic::store(jlong store_value, volatile jlong* dest) {
os::atomic_copy64((volatile jlong*)&store_value, dest);
}
#endif // OS_CPU_LINUX_ZERO_VM_ATOMIC_LINUX_ZERO_INLINE_HPP
#endif // OS_CPU_LINUX_ZERO_VM_ATOMIC_LINUX_ZERO_HPP

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2016, 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,10 +22,9 @@
*
*/
#ifndef OS_CPU_SOLARIS_SPARC_VM_ATOMIC_SOLARIS_SPARC_INLINE_HPP
#define OS_CPU_SOLARIS_SPARC_VM_ATOMIC_SOLARIS_SPARC_INLINE_HPP
#ifndef OS_CPU_SOLARIS_SPARC_VM_ATOMIC_SOLARIS_SPARC_HPP
#define OS_CPU_SOLARIS_SPARC_VM_ATOMIC_SOLARIS_SPARC_HPP
#include "runtime/atomic.hpp"
#include "runtime/os.hpp"
// Implementation of class atomic
@ -374,4 +373,4 @@ inline void* Atomic::cmpxchg_ptr(void* exchange_value, volatile void*
#endif // _GNU_SOURCE
#endif // OS_CPU_SOLARIS_SPARC_VM_ATOMIC_SOLARIS_SPARC_INLINE_HPP
#endif // OS_CPU_SOLARIS_SPARC_VM_ATOMIC_SOLARIS_SPARC_HPP

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2016, 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,7 +25,7 @@
#ifndef OS_CPU_SOLARIS_SPARC_VM_ORDERACCESS_SOLARIS_SPARC_INLINE_HPP
#define OS_CPU_SOLARIS_SPARC_VM_ORDERACCESS_SOLARIS_SPARC_INLINE_HPP
#include "runtime/atomic.inline.hpp"
#include "runtime/atomic.hpp"
#include "runtime/orderAccess.hpp"
// Compiler version last used for testing: solaris studio 12u3

View File

@ -274,8 +274,14 @@ bool os::Solaris::get_frame_at_stack_banging_point(JavaThread* thread, ucontext_
// stack overflow handling
return false;
} else {
*fr = os::fetch_frame_from_ucontext(thread, uc);
*fr = frame(fr->sender_sp(), fr->sp());
// Returned frame will be the caller of the method that faults on the stack bang.
// Register window not yet rotated (happens at SAVE after stack bang), so there is no new
// frame to go with the faulting PC. Using caller SP that is still in SP, and caller PC
// that was written to O7 at call.
intptr_t* sp = os::Solaris::ucontext_get_sp(uc);
address pc = (address)uc->uc_mcontext.gregs[REG_O7];
*fr = frame(sp, frame::unpatchable, pc);
if (!fr->is_java_frame()) {
assert(fr->safe_for_sender(thread), "Safety check");
*fr = fr->java_sender();

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2016, 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,10 +22,9 @@
*
*/
#ifndef OS_CPU_SOLARIS_X86_VM_ATOMIC_SOLARIS_X86_INLINE_HPP
#define OS_CPU_SOLARIS_X86_VM_ATOMIC_SOLARIS_X86_INLINE_HPP
#ifndef OS_CPU_SOLARIS_X86_VM_ATOMIC_SOLARIS_X86_HPP
#define OS_CPU_SOLARIS_X86_VM_ATOMIC_SOLARIS_X86_HPP
#include "runtime/atomic.hpp"
#include "runtime/os.hpp"
inline void Atomic::store (jbyte store_value, jbyte* dest) { *dest = store_value; }
@ -276,4 +275,4 @@ extern "C" {
#endif // _GNU_SOURCE
#endif // OS_CPU_SOLARIS_X86_VM_ATOMIC_SOLARIS_X86_INLINE_HPP
#endif // OS_CPU_SOLARIS_X86_VM_ATOMIC_SOLARIS_X86_HPP

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2016, 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,7 +25,7 @@
#ifndef OS_CPU_SOLARIS_X86_VM_ORDERACCESS_SOLARIS_X86_INLINE_HPP
#define OS_CPU_SOLARIS_X86_VM_ORDERACCESS_SOLARIS_X86_INLINE_HPP
#include "runtime/atomic.inline.hpp"
#include "runtime/atomic.hpp"
#include "runtime/orderAccess.hpp"
#include "runtime/os.hpp"

View File

@ -38,7 +38,7 @@
#include "prims/jvm.h"
#include "prims/jvm_misc.hpp"
#include "runtime/arguments.hpp"
#include "runtime/atomic.inline.hpp"
#include "runtime/atomic.hpp"
#include "runtime/extendedPC.hpp"
#include "runtime/frame.inline.hpp"
#include "runtime/interfaceSupport.hpp"

View File

@ -45,9 +45,8 @@ bool JavaThread::pd_get_top_frame(frame* fr_addr,
assert(this->is_Java_thread(), "must be JavaThread");
JavaThread* jt = (JavaThread *)this;
// last_Java_frame is always walkable and safe use it if we have it
if (jt->has_last_Java_frame()) {
// There is small window where last_Java_frame is not walkable or safe
if (jt->has_last_Java_frame() && jt->frame_anchor()->walkable()) {
*fr_addr = jt->pd_last_frame();
return true;
}

View File

@ -30,12 +30,8 @@
frame pd_last_frame() {
assert(has_last_Java_frame(), "must have last_Java_sp() when suspended");
if (_anchor.last_Java_pc() != NULL) {
return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp(), _anchor.last_Java_pc());
} else {
// This will pick up pc from sp
return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp());
}
vmassert(_anchor.last_Java_pc() != NULL, "not walkable");
return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp(), _anchor.last_Java_pc());
}
public:

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2016, 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,10 +22,9 @@
*
*/
#ifndef OS_CPU_WINDOWS_X86_VM_ATOMIC_WINDOWS_X86_INLINE_HPP
#define OS_CPU_WINDOWS_X86_VM_ATOMIC_WINDOWS_X86_INLINE_HPP
#ifndef OS_CPU_WINDOWS_X86_VM_ATOMIC_WINDOWS_X86_HPP
#define OS_CPU_WINDOWS_X86_VM_ATOMIC_WINDOWS_X86_HPP
#include "runtime/atomic.hpp"
#include "runtime/os.hpp"
// The following alternative implementations are needed because
@ -301,4 +300,4 @@ inline void Atomic::store(jlong store_value, jlong* dest) {
#pragma warning(default: 4035) // Enables warnings reporting missing return statement
#endif // OS_CPU_WINDOWS_X86_VM_ATOMIC_WINDOWS_X86_INLINE_HPP
#endif // OS_CPU_WINDOWS_X86_VM_ATOMIC_WINDOWS_X86_HPP

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2016, 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
@ -26,7 +26,7 @@
#define OS_CPU_WINDOWS_X86_VM_ORDERACCESS_WINDOWS_X86_INLINE_HPP
#include <intrin.h>
#include "runtime/atomic.inline.hpp"
#include "runtime/atomic.hpp"
#include "runtime/orderAccess.hpp"
#include "runtime/os.hpp"

View File

@ -48,7 +48,7 @@ bool JavaThread::pd_get_top_frame(frame* fr_addr, void* ucontext, bool isInJava)
// If we have a last_Java_frame, then we should use it even if
// isInJava == true. It should be more reliable than CONTEXT info.
if (jt->has_last_Java_frame()) {
if (jt->has_last_Java_frame() && jt->frame_anchor()->walkable()) {
*fr_addr = jt->pd_last_frame();
return true;
}

View File

@ -32,12 +32,8 @@
frame pd_last_frame() {
assert(has_last_Java_frame(), "must have last_Java_sp() when suspended");
if (_anchor.last_Java_pc() != NULL) {
return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp(), _anchor.last_Java_pc());
} else {
// This will pick up pc from sp
return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp());
}
vmassert(_anchor.last_Java_pc() != NULL, "not walkable");
return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp(), _anchor.last_Java_pc());
}
public:

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, 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
@ -26,7 +26,7 @@
#include "asm/codeBuffer.hpp"
#include "asm/macroAssembler.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "runtime/atomic.inline.hpp"
#include "runtime/atomic.hpp"
#include "runtime/icache.hpp"
#include "runtime/os.hpp"
#include "runtime/thread.hpp"

View File

@ -4255,7 +4255,7 @@ void GraphBuilder::print_inlining(ciMethod* callee, const char* msg, bool succes
#if INCLUDE_TRACE
EventCompilerInlining event;
if (event.should_commit()) {
event.set_compileID(compilation()->env()->task()->compile_id());
event.set_compileId(compilation()->env()->task()->compile_id());
event.set_message(msg);
event.set_succeeded(success);
event.set_bci(bci());

View File

@ -49,7 +49,7 @@
#include "memory/resourceArea.hpp"
#include "oops/objArrayKlass.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/atomic.inline.hpp"
#include "runtime/atomic.hpp"
#include "runtime/biasedLocking.hpp"
#include "runtime/compilationPolicy.hpp"
#include "runtime/interfaceSupport.hpp"

View File

@ -1149,10 +1149,10 @@ void ciEnv::record_failure(const char* reason) {
void ciEnv::report_failure(const char* reason) {
// Create and fire JFR event
EventCompilerFailure event;
EventCompilationFailure event;
if (event.should_commit()) {
event.set_compileID(compile_id());
event.set_failure(reason);
event.set_compileId(compile_id());
event.set_failureMessage(reason);
event.commit();
}
}

View File

@ -1410,11 +1410,11 @@ void ciMethod::print_impl(outputStream* st) {
}
#if INCLUDE_TRACE
TraceStructCiMethod ciMethod::to_trace_struct() const {
TraceStructCiMethod result;
result.set_class(holder()->name()->as_utf8());
TraceStructCalleeMethod ciMethod::to_trace_struct() const {
TraceStructCalleeMethod result;
result.set_type(holder()->name()->as_utf8());
result.set_name(name()->as_utf8());
result.set_signature(signature()->as_symbol()->as_utf8());
result.set_descriptor(signature()->as_symbol()->as_utf8());
return result;
}
#endif

View File

@ -342,7 +342,7 @@ class ciMethod : public ciMetadata {
void print_short_name(outputStream* st = tty);
#if INCLUDE_TRACE
TraceStructCiMethod to_trace_struct() const;
TraceStructCalleeMethod to_trace_struct() const;
#endif
};

View File

@ -5844,6 +5844,7 @@ void ClassFileParser::post_process_parsed_stream(const ClassFileStream* const st
_super_klass,
_methods,
_access_flags,
_major_version,
_loader_data->class_loader(),
_class_name,
_local_interfaces,

View File

@ -63,7 +63,7 @@
#include "memory/resourceArea.hpp"
#include "oops/objArrayOop.inline.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/atomic.inline.hpp"
#include "runtime/atomic.hpp"
#include "runtime/javaCalls.hpp"
#include "runtime/jniHandles.hpp"
#include "runtime/mutex.hpp"

View File

@ -31,12 +31,12 @@
#include "prims/jvmtiEnvBase.hpp"
#include "trace/traceMacros.hpp"
static ClassFileStream* prologue(ClassFileStream* stream,
Symbol* name,
ClassLoaderData* loader_data,
Handle protection_domain,
JvmtiCachedClassFileData** cached_class_file,
TRAPS) {
static ClassFileStream* check_class_file_load_hook(ClassFileStream* stream,
Symbol* name,
ClassLoaderData* loader_data,
Handle protection_domain,
JvmtiCachedClassFileData** cached_class_file,
TRAPS) {
assert(stream != NULL, "invariant");
@ -102,8 +102,6 @@ instanceKlassHandle KlassFactory::create_from_stream(ClassFileStream* stream,
assert(loader_data != NULL, "invariant");
assert(THREAD->is_Java_thread(), "must be a JavaThread");
bool changed_by_loadhook = false;
ResourceMark rm;
HandleMark hm;
@ -111,12 +109,15 @@ instanceKlassHandle KlassFactory::create_from_stream(ClassFileStream* stream,
ClassFileStream* old_stream = stream;
stream = prologue(stream,
name,
loader_data,
protection_domain,
&cached_class_file,
CHECK_NULL);
// Skip this processing for VM anonymous classes
if (host_klass == NULL) {
stream = check_class_file_load_hook(stream,
name,
loader_data,
protection_domain,
&cached_class_file,
CHECK_NULL);
}
ClassFileParser parser(stream,
name,

View File

@ -34,7 +34,7 @@
#include "memory/filemap.hpp"
#include "memory/resourceArea.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/atomic.inline.hpp"
#include "runtime/atomic.hpp"
#include "runtime/mutexLocker.hpp"
#include "utilities/hashtable.inline.hpp"
#include "utilities/macros.hpp"

View File

@ -34,7 +34,7 @@
#include "memory/filemap.hpp"
#include "memory/resourceArea.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/atomic.inline.hpp"
#include "runtime/atomic.hpp"
#include "runtime/mutexLocker.hpp"
#include "utilities/hashtable.inline.hpp"

View File

@ -1641,7 +1641,6 @@ void SystemDictionary::define_instance_class(instanceKlassHandle k, TRAPS) {
JvmtiExport::post_class_load((JavaThread *) THREAD, k());
}
TRACE_KLASS_DEFINITION(k, THREAD);
class_define_event(k);
}

View File

@ -41,7 +41,7 @@
#include "oops/methodData.hpp"
#include "oops/oop.inline.hpp"
#include "prims/jvmtiImpl.hpp"
#include "runtime/atomic.inline.hpp"
#include "runtime/atomic.hpp"
#include "runtime/orderAccess.inline.hpp"
#include "runtime/os.hpp"
#include "runtime/sharedRuntime.hpp"

View File

@ -42,7 +42,7 @@
#include "prims/nativeLookup.hpp"
#include "prims/whitebox.hpp"
#include "runtime/arguments.hpp"
#include "runtime/atomic.inline.hpp"
#include "runtime/atomic.hpp"
#include "runtime/compilationPolicy.hpp"
#include "runtime/init.hpp"
#include "runtime/interfaceSupport.hpp"
@ -1755,7 +1755,7 @@ void CompileBroker::post_compile(CompilerThread* thread, CompileTask* task, Even
assert(task->compile_id() != CICrashAt, "just as planned");
if (event.should_commit()) {
event.set_method(task->method());
event.set_compileID(task->compile_id());
event.set_compileId(task->compile_id());
event.set_compileLevel(task->comp_level());
event.set_succeded(task->is_success());
event.set_isOsr(task->osr_bci() != CompileBroker::standard_entry_bci);
@ -2399,4 +2399,3 @@ void CompileBroker::print_last_compile() {
}
}
}

View File

@ -61,7 +61,7 @@
#include "memory/resourceArea.hpp"
#include "oops/oop.inline.hpp"
#include "prims/jvmtiExport.hpp"
#include "runtime/atomic.inline.hpp"
#include "runtime/atomic.hpp"
#include "runtime/globals_extension.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/java.hpp"

View File

@ -50,7 +50,7 @@
#include "memory/resourceArea.hpp"
#include "oops/objArrayOop.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/atomic.inline.hpp"
#include "runtime/atomic.hpp"
#include "runtime/handles.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/java.hpp"

View File

@ -26,7 +26,7 @@
#include "gc/g1/collectionSetChooser.hpp"
#include "gc/g1/g1CollectedHeap.inline.hpp"
#include "gc/shared/space.inline.hpp"
#include "runtime/atomic.inline.hpp"
#include "runtime/atomic.hpp"
// Even though we don't use the GC efficiency in our heuristics as
// much as we used to, we still order according to GC efficiency. This

View File

@ -27,7 +27,7 @@
#include "gc/g1/g1CollectedHeap.inline.hpp"
#include "gc/g1/heapRegionRemSet.hpp"
#include "gc/shared/workgroup.hpp"
#include "runtime/atomic.inline.hpp"
#include "runtime/atomic.hpp"
#include "runtime/mutexLocker.hpp"
#include "runtime/safepoint.hpp"
#include "runtime/thread.inline.hpp"

View File

@ -30,7 +30,7 @@
#include "gc/shared/workgroup.hpp"
#include "logging/log.hpp"
#include "memory/universe.hpp"
#include "runtime/atomic.inline.hpp"
#include "runtime/atomic.hpp"
#include "runtime/globals.hpp"
#include "runtime/os.hpp"
#include "utilities/bitMap.inline.hpp"

View File

@ -74,7 +74,7 @@
#include "memory/iterator.hpp"
#include "memory/resourceArea.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/atomic.inline.hpp"
#include "runtime/atomic.hpp"
#include "runtime/init.hpp"
#include "runtime/orderAccess.inline.hpp"
#include "runtime/vmThread.hpp"

View File

@ -52,7 +52,7 @@
#include "memory/allocation.hpp"
#include "memory/resourceArea.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/atomic.inline.hpp"
#include "runtime/atomic.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/java.hpp"
#include "runtime/prefetch.inline.hpp"

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2016, 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
@ -26,7 +26,7 @@
#define SHARE_VM_GC_G1_G1EVACSTATS_INLINE_HPP
#include "gc/g1/g1EvacStats.hpp"
#include "runtime/atomic.inline.hpp"
#include "runtime/atomic.hpp"
inline void G1EvacStats::add_direct_allocated(size_t value) {
Atomic::add_ptr(value, &_direct_allocated);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2016, 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
@ -26,7 +26,7 @@
#include "gc/g1/dirtyCardQueue.hpp"
#include "gc/g1/g1CollectedHeap.inline.hpp"
#include "gc/g1/g1HotCardCache.hpp"
#include "runtime/atomic.inline.hpp"
#include "runtime/atomic.hpp"
G1HotCardCache::G1HotCardCache(G1CollectedHeap *g1h):
_g1h(g1h), _hot_cache(NULL), _use_cache(false), _card_counts(g1h) {}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2016, 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
@ -45,7 +45,7 @@
#include "oops/instanceRefKlass.hpp"
#include "oops/oop.inline.hpp"
#include "prims/jvmtiExport.hpp"
#include "runtime/atomic.inline.hpp"
#include "runtime/atomic.hpp"
#include "runtime/biasedLocking.hpp"
#include "runtime/fprofiler.hpp"
#include "runtime/synchronizer.hpp"

View File

@ -30,7 +30,7 @@
#include "gc/shared/memset_with_concurrent_readers.hpp"
#include "logging/log.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/atomic.inline.hpp"
#include "runtime/atomic.hpp"
#include "runtime/mutexLocker.hpp"
#include "runtime/orderAccess.inline.hpp"
#include "runtime/thread.inline.hpp"

View File

@ -31,7 +31,7 @@
#include "gc/g1/g1StringDedupStat.hpp"
#include "gc/g1/g1StringDedupTable.hpp"
#include "gc/g1/g1StringDedupThread.hpp"
#include "runtime/atomic.inline.hpp"
#include "runtime/atomic.hpp"
bool G1StringDedup::_enabled = false;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2016, 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,7 +84,6 @@
#include "memory/allocation.hpp"
#include "oops/oop.hpp"
#include "runtime/atomic.hpp"
class OopClosure;
class BoolObjectClosure;

Some files were not shown because too many files have changed in this diff Show More