# HG changeset patch # User Doug Simon # Date 1440536283 -7200 # Node ID f58e7b5fe0ab1548e0b46b23485b8dad4656ff8d # Parent d1019456c4d253f15c99021d7e067c5e5fef42f8 made JavaThread::_jvmci a union diff -r d1019456c4d2 -r f58e7b5fe0ab src/cpu/sparc/vm/sharedRuntime_sparc.cpp --- a/src/cpu/sparc/vm/sharedRuntime_sparc.cpp Tue Aug 25 09:50:46 2015 -0700 +++ b/src/cpu/sparc/vm/sharedRuntime_sparc.cpp Tue Aug 25 22:58:03 2015 +0200 @@ -3542,7 +3542,7 @@ masm->block_comment("BEGIN JVMCI"); int implicit_exception_uncommon_trap_offset = __ offset() - start; __ ld_ptr(G2_thread, in_bytes(JavaThread::jvmci_implicit_exception_pc_offset()), O7); - DEBUG_ONLY(__ st(G0, Address(G2_thread, in_bytes(JavaThread::jvmci_implicit_exception_pc_offset())));) + __ st(G0, Address(G2_thread, in_bytes(JavaThread::jvmci_implicit_exception_pc_offset()))); __ add(O7, -8, O7); int uncommon_trap_offset = __ offset() - start; diff -r d1019456c4d2 -r f58e7b5fe0ab src/cpu/x86/vm/sharedRuntime_x86_64.cpp --- a/src/cpu/x86/vm/sharedRuntime_x86_64.cpp Tue Aug 25 09:50:46 2015 -0700 +++ b/src/cpu/x86/vm/sharedRuntime_x86_64.cpp Tue Aug 25 22:58:03 2015 +0200 @@ -3397,7 +3397,7 @@ int implicit_exception_uncommon_trap_offset = __ pc() - start; __ pushptr(Address(r15_thread, in_bytes(JavaThread::jvmci_implicit_exception_pc_offset()))); - DEBUG_ONLY(__ movptr(Address(r15_thread, in_bytes(JavaThread::jvmci_implicit_exception_pc_offset())), (int32_t)NULL_WORD);) + __ movptr(Address(r15_thread, in_bytes(JavaThread::jvmci_implicit_exception_pc_offset())), (int32_t)NULL_WORD); int uncommon_trap_offset = __ pc() - start; diff -r d1019456c4d2 -r f58e7b5fe0ab src/share/vm/runtime/thread.cpp --- a/src/share/vm/runtime/thread.cpp Tue Aug 25 09:50:46 2015 -0700 +++ b/src/share/vm/runtime/thread.cpp Tue Aug 25 22:58:03 2015 +0200 @@ -1489,9 +1489,7 @@ _pending_failed_speculation = NULL; _pending_transfer_to_interpreter = false; _jvmci._alternate_call_target = NULL; - // TODO: If _jvmci becomes a union, then this assignment - // should be converted to an assertion or guarantee - _jvmci._implicit_exception_pc = NULL; + assert(_jvmci._implicit_exception_pc == NULL, "must be"); if (JVMCICounterSize > 0) { _jvmci_counters = NEW_C_HEAP_ARRAY(jlong, JVMCICounterSize, mtInternal); memset(_jvmci_counters, 0, sizeof(jlong) * JVMCICounterSize); diff -r d1019456c4d2 -r f58e7b5fe0ab src/share/vm/runtime/thread.hpp --- a/src/share/vm/runtime/thread.hpp Tue Aug 25 09:50:46 2015 -0700 +++ b/src/share/vm/runtime/thread.hpp Tue Aug 25 22:58:03 2015 +0200 @@ -934,15 +934,14 @@ // Specifies if the DeoptReason for the last uncommon trap was Reason_transfer_to_interpreter bool _pending_transfer_to_interpreter; - // These fields are mutually exclusive in terms of live ranges - // so this could be a union instead of a struct. - struct { + // These fields are mutually exclusive in terms of live ranges. + union { // Communicates the pc at which the most recent implicit exception occurred // from the signal handler to a deoptimization stub. address _implicit_exception_pc; - // Communicates an alternative call target to an i2c stub from a JavaCall. - address _alternate_call_target; // + // Communicates an alternative call target to an i2c stub from a JavaCall . + address _alternate_call_target; } _jvmci; // Support for high precision, thread sensitive counters in JVMCI compiled code.