# HG changeset patch # User Christian Wimmer # Date 1440626810 25200 # Node ID eaf97ec55a78edc49faf4ef3116be3fce197219c # Parent f58e7b5fe0ab1548e0b46b23485b8dad4656ff8d# Parent a6adaf9c330d48930c3003098e363e8f50cbf311 Merge diff -r a6adaf9c330d -r eaf97ec55a78 src/cpu/sparc/vm/sharedRuntime_sparc.cpp --- a/src/cpu/sparc/vm/sharedRuntime_sparc.cpp Tue Aug 25 15:27:13 2015 -0700 +++ b/src/cpu/sparc/vm/sharedRuntime_sparc.cpp Wed Aug 26 15:06:50 2015 -0700 @@ -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 a6adaf9c330d -r eaf97ec55a78 src/cpu/x86/vm/sharedRuntime_x86_64.cpp --- a/src/cpu/x86/vm/sharedRuntime_x86_64.cpp Tue Aug 25 15:27:13 2015 -0700 +++ b/src/cpu/x86/vm/sharedRuntime_x86_64.cpp Wed Aug 26 15:06:50 2015 -0700 @@ -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 a6adaf9c330d -r eaf97ec55a78 src/share/vm/jvmci/jvmciCompiler.cpp --- a/src/share/vm/jvmci/jvmciCompiler.cpp Tue Aug 25 15:27:13 2015 -0700 +++ b/src/share/vm/jvmci/jvmciCompiler.cpp Wed Aug 26 15:06:50 2015 -0700 @@ -64,6 +64,12 @@ #ifdef COMPILERJVMCI void JVMCICompiler::bootstrap() { +#ifndef PRODUCT + // We turn off CompileTheWorld so that compilation requests are not + // ignored during bootstrap or that JVMCI can be compiled by C1/C2. + FlagSetting ctwOff(CompileTheWorld, false); +#endif + JavaThread* THREAD = JavaThread::current(); _bootstrapping = true; // Allow bootstrap to perform JVMCI compilations of itself diff -r a6adaf9c330d -r eaf97ec55a78 src/share/vm/runtime/thread.cpp --- a/src/share/vm/runtime/thread.cpp Tue Aug 25 15:27:13 2015 -0700 +++ b/src/share/vm/runtime/thread.cpp Wed Aug 26 15:06:50 2015 -0700 @@ -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 a6adaf9c330d -r eaf97ec55a78 src/share/vm/runtime/thread.hpp --- a/src/share/vm/runtime/thread.hpp Tue Aug 25 15:27:13 2015 -0700 +++ b/src/share/vm/runtime/thread.hpp Wed Aug 26 15:06:50 2015 -0700 @@ -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.