Mercurial > hg > graal-compiler
changeset 12356:359f7e70ae7f
Reduce HotSpot diff and fix previous merge
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotLIRGenerator.java Fri Oct 11 10:38:03 2013 +0200 +++ b/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotLIRGenerator.java Fri Oct 11 15:41:33 2013 +0200 @@ -237,7 +237,7 @@ // null, runtime().config.narrowOopBase, runtime().config.narrowOopShift, // runtime().config.logMinObjAlignment)); throw GraalInternalError.unimplemented(); - } else if (runtime().config.useCompressedKlassPointers && kind == Kind.Long) { + } else if (runtime().config.useCompressedClassPointers && kind == Kind.Long) { // append(new LoadCompressedPointer(kind, result, loadAddress, access != null ? state(access) : // null, runtime().config.narrowKlassBase, runtime().config.narrowKlassShift, // runtime().config.logKlassAlignment)); @@ -261,7 +261,7 @@ if (inputVal.getKind() == Kind.Object) { append(new StoreConstantOp(kind, storeAddress, c, state, runtime().config.useCompressedOops && isCompressCandidate(access))); } else if (inputVal.getKind() == Kind.Long) { - append(new StoreConstantOp(kind, storeAddress, c, state, runtime().config.useCompressedKlassPointers && isCompressCandidate(access))); + append(new StoreConstantOp(kind, storeAddress, c, state, runtime().config.useCompressedClassPointers && isCompressCandidate(access))); } else { append(new StoreConstantOp(kind, storeAddress, c, state, false)); } @@ -281,7 +281,7 @@ // append(new StoreOp(input.getKind(), storeAddress, input, state)); // } throw GraalInternalError.unimplemented(); - } else if (runtime().config.useCompressedKlassPointers && kind == Kind.Long) { + } else if (runtime().config.useCompressedClassPointers && kind == Kind.Long) { // Variable scratch = newVariable(Kind.Long); // append(new StoreCompressedPointer(kind, storeAddress, input, scratch, state, // runtime().config.narrowKlassBase, runtime().config.narrowKlassShift,
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMConfig.java Fri Oct 11 10:38:03 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMConfig.java Fri Oct 11 15:41:33 2013 +0200 @@ -140,7 +140,7 @@ // Compressed Oops related values. public final boolean useCompressedOops = getVMOption("UseCompressedOops"); - public final boolean useCompressedKlassPointers = getVMOption("UseCompressedKlassPointers"); + public final boolean useCompressedClassPointers = getVMOption("UseCompressedClassPointers"); public final long narrowOopBase = getUninitializedLong(); public final int narrowOopShift = getUninitializedInt(); public final int logMinObjAlignment = (int) (Math.log(getVMOptionInt("ObjectAlignmentInBytes")) / Math.log(2));
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotRuntime.java Fri Oct 11 10:38:03 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotRuntime.java Fri Oct 11 15:41:33 2013 +0200 @@ -491,7 +491,7 @@ } public boolean useCompressedKlassPointers() { - return config.useCompressedKlassPointers; + return config.useCompressedClassPointers; } @Override
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/HotSpotReplacementsUtil.java Fri Oct 11 10:38:03 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/HotSpotReplacementsUtil.java Fri Oct 11 15:41:33 2013 +0200 @@ -354,7 +354,7 @@ @Fold public static int instanceHeaderSize() { - return config().useCompressedKlassPointers ? (2 * wordSize()) - 4 : 2 * wordSize(); + return config().useCompressedClassPointers ? (2 * wordSize()) - 4 : 2 * wordSize(); } @Fold
--- a/make/defs.make Fri Oct 11 10:38:03 2013 +0200 +++ b/make/defs.make Fri Oct 11 15:41:33 2013 +0200 @@ -236,7 +236,7 @@ JDK_IMAGE_DIR=$(ALT_JDK_IMAGE_DIR) endif -# The platform dependent defs.make defines platform specific variable such +# The platform dependent defs.make defines platform specific variable such # as ARCH, EXPORT_LIST etc. We must place the include here after BOOTDIR is defined. include $(GAMMADIR)/make/$(OSNAME)/makefiles/defs.make
--- a/make/linux/makefiles/jsig.make Fri Oct 11 10:38:03 2013 +0200 +++ b/make/linux/makefiles/jsig.make Fri Oct 11 15:41:33 2013 +0200 @@ -74,9 +74,9 @@ install_jsig: $(LIBJSIG) @echo "Copying $(LIBJSIG) to $(DEST_JSIG)" - $(QUIETLY) test -f $(LIBJSIG_DEBUGINFO) && \ + -$(QUIETLY) test -f $(LIBJSIG_DEBUGINFO) && \ cp -f $(LIBJSIG_DEBUGINFO) $(DEST_JSIG_DEBUGINFO) - $(QUIETLY) test -f $(LIBJSIG_DIZ) && \ + -$(QUIETLY) test -f $(LIBJSIG_DIZ) && \ cp -f $(LIBJSIG_DIZ) $(DEST_JSIG_DIZ) $(QUIETLY) cp -f $(LIBJSIG) $(DEST_JSIG) && echo "Done"
--- a/make/linux/makefiles/vm.make Fri Oct 11 10:38:03 2013 +0200 +++ b/make/linux/makefiles/vm.make Fri Oct 11 15:41:33 2013 +0200 @@ -381,9 +381,9 @@ install_jvm: $(LIBJVM) @echo "Copying $(LIBJVM) to $(DEST_JVM)" - $(QUIETLY) test -f $(LIBJVM_DEBUGINFO) && \ + -$(QUIETLY) test -f $(LIBJVM_DEBUGINFO) && \ cp -f $(LIBJVM_DEBUGINFO) $(DEST_JVM_DEBUGINFO) - $(QUIETLY) test -f $(LIBJVM_DIZ) && \ + -$(QUIETLY) test -f $(LIBJVM_DIZ) && \ cp -f $(LIBJVM_DIZ) $(DEST_JVM_DIZ) $(QUIETLY) cp -f $(LIBJVM) $(DEST_JVM) && echo "Done"
--- a/src/cpu/sparc/vm/c2_globals_sparc.hpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/cpu/sparc/vm/c2_globals_sparc.hpp Fri Oct 11 15:41:33 2013 +0200 @@ -44,6 +44,7 @@ #else define_pd_global(bool, ProfileInterpreter, true); #endif // CC_INTERP +// Disable TieredCompilation while profile data problems are not resolved - same thing in c2_globals_x86.hpp #ifdef GRAAL define_pd_global(bool, TieredCompilation, false); #else
--- a/src/cpu/x86/vm/c2_globals_x86.hpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/cpu/x86/vm/c2_globals_x86.hpp Fri Oct 11 15:41:33 2013 +0200 @@ -45,6 +45,7 @@ #else define_pd_global(bool, ProfileInterpreter, true); #endif // CC_INTERP +// Disable TieredCompilation while profile data problems are not resolved - same thing in c2_globals_sparc.hpp #ifdef GRAAL define_pd_global(bool, TieredCompilation, false); #else @@ -95,8 +96,9 @@ #else define_pd_global(intx, ReservedCodeCacheSize, 48*M); #endif -define_pd_global(uintx,CodeCacheMinBlockLength, 4); +define_pd_global(uintx, CodeCacheMinBlockLength, 4); define_pd_global(uintx, CodeCacheMinimumUseSpace, 400*K); + // Heap related flags define_pd_global(uintx,MetaspaceSize, ScaleForWordSize(16*M));
--- a/src/cpu/x86/vm/compiledIC_x86.cpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/cpu/x86/vm/compiledIC_x86.cpp Fri Oct 11 15:41:33 2013 +0200 @@ -172,9 +172,9 @@ verify_alignment(); } +#ifndef GRAAL // Verify stub. address stub = find_stub(); -#ifndef GRAAL assert(stub != NULL, "no stub found for static call"); // Creation also verifies the object. NativeMovConstReg* method_holder = nativeMovConstReg_at(stub);
--- a/src/cpu/x86/vm/interp_masm_x86_64.cpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/cpu/x86/vm/interp_masm_x86_64.cpp Fri Oct 11 15:41:33 2013 +0200 @@ -1096,10 +1096,9 @@ increment_mdp_data_at(mdp, in_bytes(CounterData::count_offset())); // The method data pointer needs to be updated to reflect the new target. - update_mdp_by_constant(mdp, - in_bytes(VirtualCallData:: + update_mdp_by_constant(mdp, + in_bytes(VirtualCallData:: virtual_call_data_size())); - bind(profile_continue); } }
--- a/src/cpu/x86/vm/macroAssembler_x86.cpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/cpu/x86/vm/macroAssembler_x86.cpp Fri Oct 11 15:41:33 2013 +0200 @@ -5075,7 +5075,7 @@ // when (Universe::heap() != NULL). Hence, if the instructions they // generate change, then this method needs to be updated. int MacroAssembler::instr_size_for_decode_klass_not_null() { - assert (UseCompressedKlassPointers, "only for compressed klass ptrs"); + assert (UseCompressedClassPointers, "only for compressed klass ptrs"); // mov64 + addq + shlq? + mov64 (for reinit_heapbase()). return (Universe::narrow_klass_shift() == 0 ? 20 : 24); } @@ -5085,7 +5085,7 @@ void MacroAssembler::decode_klass_not_null(Register r) { // Note: it will change flags assert(Universe::narrow_klass_base() != NULL, "Base should be initialized"); - assert (UseCompressedKlassPointers, "should only be used for compressed headers"); + assert (UseCompressedClassPointers, "should only be used for compressed headers"); assert(r != r12_heapbase, "Decoding a klass in r12"); // Cannot assert, unverified entry point counts instructions (see .ad file) // vtableStubs also counts instructions in pd_code_size_limit. @@ -5103,7 +5103,7 @@ void MacroAssembler::decode_klass_not_null(Register dst, Register src) { // Note: it will change flags assert(Universe::narrow_klass_base() != NULL, "Base should be initialized"); - assert (UseCompressedKlassPointers, "should only be used for compressed headers"); + assert (UseCompressedClassPointers, "should only be used for compressed headers"); if (dst == src) { decode_klass_not_null(dst); } else { @@ -5141,7 +5141,7 @@ } void MacroAssembler::set_narrow_klass(Register dst, Klass* k) { - assert (UseCompressedKlassPointers, "should only be used for compressed headers"); + assert (UseCompressedClassPointers, "should only be used for compressed headers"); assert (oop_recorder() != NULL, "this assembler needs an OopRecorder"); int klass_index = oop_recorder()->find_index(k); RelocationHolder rspec = metadata_Relocation::spec(klass_index); @@ -5149,7 +5149,7 @@ } void MacroAssembler::set_narrow_klass(Address dst, Klass* k) { - assert (UseCompressedKlassPointers, "should only be used for compressed headers"); + assert (UseCompressedClassPointers, "should only be used for compressed headers"); assert (oop_recorder() != NULL, "this assembler needs an OopRecorder"); int klass_index = oop_recorder()->find_index(k); RelocationHolder rspec = metadata_Relocation::spec(klass_index); @@ -5175,7 +5175,7 @@ } void MacroAssembler::cmp_narrow_klass(Register dst, Klass* k) { - assert (UseCompressedKlassPointers, "should only be used for compressed headers"); + assert (UseCompressedClassPointers, "should only be used for compressed headers"); assert (oop_recorder() != NULL, "this assembler needs an OopRecorder"); int klass_index = oop_recorder()->find_index(k); RelocationHolder rspec = metadata_Relocation::spec(klass_index); @@ -5183,7 +5183,7 @@ } void MacroAssembler::cmp_narrow_klass(Address dst, Klass* k) { - assert (UseCompressedKlassPointers, "should only be used for compressed headers"); + assert (UseCompressedClassPointers, "should only be used for compressed headers"); assert (oop_recorder() != NULL, "this assembler needs an OopRecorder"); int klass_index = oop_recorder()->find_index(k); RelocationHolder rspec = metadata_Relocation::spec(klass_index); @@ -5191,7 +5191,7 @@ } void MacroAssembler::reinit_heapbase() { - if (UseCompressedOops || UseCompressedKlassPointers) { + if (UseCompressedOops || UseCompressedClassPointers) { if (Universe::heap() != NULL) { if (Universe::narrow_oop_base() == NULL) { MacroAssembler::xorptr(r12_heapbase, r12_heapbase);
--- a/src/cpu/x86/vm/templateInterpreter_x86_64.cpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/cpu/x86/vm/templateInterpreter_x86_64.cpp Fri Oct 11 15:41:33 2013 +0200 @@ -36,7 +36,6 @@ #include "prims/jvmtiExport.hpp" #include "prims/jvmtiThreadState.hpp" #include "runtime/arguments.hpp" -#include "runtime/compilationPolicy.hpp" #include "runtime/deoptimization.hpp" #include "runtime/frame.inline.hpp" #include "runtime/sharedRuntime.hpp"
--- a/src/os/windows/vm/os_windows.cpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/os/windows/vm/os_windows.cpp Fri Oct 11 15:41:33 2013 +0200 @@ -2215,33 +2215,29 @@ #ifdef _M_IA64 assert(0, "Fix Handle_IDiv_Exception"); #elif _M_AMD64 - #ifdef GRAAL - PCONTEXT ctx = exceptionInfo->ContextRecord; - address pc = (address)ctx->Rip; - assert(pc[0] >= Assembler::REX && pc[0] <= Assembler::REX_WRXB && pc[1] == 0xF7 || pc[0] == 0xF7, "not an idiv opcode"); - if (pc[0] == 0xF7) { - // set correct result values and continue after idiv instruction - ctx->Rip = (DWORD64)pc + 2; // idiv reg, reg is 2 bytes - } else { - ctx->Rip = (DWORD64)pc + 3; // REX idiv reg, reg is 3 bytes - } - // do not set ctx->Rax as it already contains the correct value (either 32 or 64 bit, depending on the operation) - // this is the case because the exception only happens for -MinValue/-1 and -MinValue is always in rax because of the - // idiv opcode (0xF7) - ctx->Rdx = (DWORD64)0; // remainder - // Continue the execution - #else - PCONTEXT ctx = exceptionInfo->ContextRecord; - address pc = (address)ctx->Rip; - assert(pc[0] == 0xF7, "not an idiv opcode"); - assert((pc[1] & ~0x7) == 0xF8, "cannot handle non-register operands"); - assert(ctx->Rax == min_jint, "unexpected idiv exception"); + PCONTEXT ctx = exceptionInfo->ContextRecord; + address pc = (address)ctx->Rip; +#ifdef GRAAL + assert(pc[0] >= Assembler::REX && pc[0] <= Assembler::REX_WRXB && pc[1] == 0xF7 || pc[0] == 0xF7, "not an idiv opcode"); + if (pc[0] == 0xF7) { // set correct result values and continue after idiv instruction - ctx->Rip = (DWORD)pc + 2; // idiv reg, reg is 2 bytes - ctx->Rax = (DWORD)min_jint; // result - ctx->Rdx = (DWORD)0; // remainder - // Continue the execution - #endif // GRAAL + ctx->Rip = (DWORD64)pc + 2; // idiv reg, reg is 2 bytes + } else { + ctx->Rip = (DWORD64)pc + 3; // REX idiv reg, reg is 3 bytes + } + // do not set ctx->Rax as it already contains the correct value (either 32 or 64 bit, depending on the operation) + // this is the case because the exception only happens for -MinValue/-1 and -MinValue is always in rax because of the + // idiv opcode (0xF7) +#else + assert(pc[0] == 0xF7, "not an idiv opcode"); + assert((pc[1] & ~0x7) == 0xF8, "cannot handle non-register operands"); + assert(ctx->Rax == min_jint, "unexpected idiv exception"); + // set correct result values and continue after idiv instruction + ctx->Rip = (DWORD)pc + 2; // idiv reg, reg is 2 bytes + ctx->Rax = (DWORD)min_jint; // result +#endif // GRAAL + ctx->Rdx = (DWORD)0; // remainder + // Continue the execution #else PCONTEXT ctx = exceptionInfo->ContextRecord; address pc = (address)ctx->Eip;
--- a/src/os_cpu/bsd_x86/vm/thread_bsd_x86.cpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/os_cpu/bsd_x86/vm/thread_bsd_x86.cpp Fri Oct 11 15:41:33 2013 +0200 @@ -67,7 +67,7 @@ frame ret_frame(ret_sp, ret_fp, addr.pc()); if (!ret_frame.safe_for_sender(jt)) { #if defined(COMPILER2) || defined(GRAAL) - // C2 uses ebp as a general register see if NULL fp helps + // C2 and Graal use ebp as a general register see if NULL fp helps frame ret_frame2(ret_sp, NULL, addr.pc()); if (!ret_frame2.safe_for_sender(jt)) { // nothing else to try if the frame isn't good
--- a/src/os_cpu/linux_x86/vm/thread_linux_x86.cpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/os_cpu/linux_x86/vm/thread_linux_x86.cpp Fri Oct 11 15:41:33 2013 +0200 @@ -68,7 +68,7 @@ frame ret_frame(ret_sp, ret_fp, addr.pc()); if (!ret_frame.safe_for_sender(jt)) { #if defined(COMPILER2) || defined(GRAAL) - // C2 uses ebp as a general register see if NULL fp helps + // C2 and Graal use ebp as a general register see if NULL fp helps frame ret_frame2(ret_sp, NULL, addr.pc()); if (!ret_frame2.safe_for_sender(jt)) { // nothing else to try if the frame isn't good
--- a/src/os_cpu/windows_x86/vm/thread_windows_x86.cpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/os_cpu/windows_x86/vm/thread_windows_x86.cpp Fri Oct 11 15:41:33 2013 +0200 @@ -75,7 +75,7 @@ frame ret_frame(ret_sp, ret_fp, addr.pc()); if (!ret_frame.safe_for_sender(jt)) { #if defined(COMPILER2) || defined(GRAAL) - // C2 uses ebp as a general register see if NULL fp helps + // C2 and Graal use ebp as a general register see if NULL fp helps frame ret_frame2(ret_sp, NULL, addr.pc()); if (!ret_frame2.safe_for_sender(jt)) { // nothing else to try if the frame isn't good
--- a/src/share/vm/classfile/javaClasses.hpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/share/vm/classfile/javaClasses.hpp Fri Oct 11 15:41:33 2013 +0200 @@ -329,7 +329,6 @@ public: // Instance creation static oop create(); - static int java_thread_offset_in_bytes() { return _eetop_offset; } // Returns the JavaThread associated with the thread obj static JavaThread* thread(oop java_thread); // Set JavaThread for instance
--- a/src/share/vm/classfile/vmSymbols.hpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/share/vm/classfile/vmSymbols.hpp Fri Oct 11 15:41:33 2013 +0200 @@ -395,12 +395,6 @@ template(forObject_name, "forObject") \ template(callbackInternal_name, "callbackInternal") \ template(callback_signature, "(Ljava/lang/Object;)Ljava/lang/Object;") \ - /* graal.api.interpreter */ \ - template(com_oracle_graal_api_interpreter_Interpreter, "com/oracle/graal/api/interpreter/Interpreter") \ - template(interpreter_execute_name, "execute") \ - template(interpreter_execute_signature, "(Lcom/oracle/graal/api/meta/ResolvedJavaMethod;[Ljava/lang/Object;)Ljava/lang/Object;") \ - \ - \ \ /* common method and field names */ \ template(object_initializer_name, "<init>") \
--- a/src/share/vm/code/nmethod.cpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/share/vm/code/nmethod.cpp Fri Oct 11 15:41:33 2013 +0200 @@ -1882,6 +1882,7 @@ #endif } + // Iterate over metadata calling this function. Used by RedefineClasses void nmethod::metadata_do(void f(Metadata*)) { address low_boundary = verified_entry_point(); @@ -2508,7 +2509,6 @@ MutexLocker ml_verify (CompiledIC_lock); ic = CompiledIC_at(this, call_site); } - PcDesc* pd = pc_desc_at(ic->end_of_call()); assert(pd != NULL, "PcDesc must exist"); for (ScopeDesc* sd = new ScopeDesc(this, pd->scope_decode_offset(),
--- a/src/share/vm/compiler/abstractCompiler.hpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/share/vm/compiler/abstractCompiler.hpp Fri Oct 11 15:41:33 2013 +0200 @@ -74,7 +74,6 @@ // does *not* answer the question "can this compiler generate code for // a native method". virtual bool supports_native() { return true; } - virtual bool supports_osr () { return true; } virtual bool can_compile_method(methodHandle method) { return true; } bool is_c1 () { return _type == c1; } @@ -82,6 +81,9 @@ bool is_shark() { return _type == shark; } bool is_graal() { return _type == graal; } + // Customization + virtual bool needs_stubs () = 0; + void mark_initialized() { _is_initialized = true; } bool is_initialized() { return _is_initialized; }
--- a/src/share/vm/compiler/compileBroker.cpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/share/vm/compiler/compileBroker.cpp Fri Oct 11 15:41:33 2013 +0200 @@ -767,16 +767,15 @@ // Set the interface to the current compiler(s). int c1_count = CompilationPolicy::policy()->compiler_count(CompLevel_simple); int c2_count = CompilationPolicy::policy()->compiler_count(CompLevel_full_optimization); - #ifdef GRAAL GraalCompiler* graal = new GraalCompiler(); #endif - -#if defined(GRAALVM) +#ifdef GRAALVM _compilers[0] = graal; c1_count = 0; c2_count = 0; -#elif defined(COMPILER1) +#else // GRAALVM +#ifdef COMPILER1 if (c1_count > 0) { _compilers[0] = new Compiler(); } @@ -787,7 +786,7 @@ _compilers[1] = new C2Compiler(); } #endif // COMPILER2 - +#endif // GRAALVM #else // SHARK int c1_count = 0; int c2_count = 1; @@ -1054,9 +1053,10 @@ return false; } } + + // No pending or active compilations. + return true; } - // No pending or active compilations. - return true; }
--- a/src/share/vm/gc_implementation/g1/g1AllocRegion.hpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/share/vm/gc_implementation/g1/g1AllocRegion.hpp Fri Oct 11 15:41:33 2013 +0200 @@ -183,7 +183,7 @@ } #endif - #if G1_ALLOC_REGION_TRACING +#if G1_ALLOC_REGION_TRACING void trace(const char* str, size_t word_size = 0, HeapWord* result = NULL); #else // G1_ALLOC_REGION_TRACING void trace(const char* str, size_t word_size = 0, HeapWord* result = NULL) { }
--- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp Fri Oct 11 15:41:33 2013 +0200 @@ -688,7 +688,6 @@ #ifdef GRAAL HeapWord** top_addr() const; HeapWord** end_addr() const; - #endif // We register a region with the fast "in collection set" test. We
--- a/src/share/vm/graal/graalCompiler.hpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/share/vm/graal/graalCompiler.hpp Fri Oct 11 15:41:33 2013 +0200 @@ -55,6 +55,8 @@ bool is_c1 () { return false; } bool is_c2 () { return false; } + bool needs_stubs () { return false; } + // Initialization virtual void initialize();
--- a/src/share/vm/graal/graalCompilerToVM.cpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/share/vm/graal/graalCompilerToVM.cpp Fri Oct 11 15:41:33 2013 +0200 @@ -22,10 +22,10 @@ */ #include "precompiled.hpp" -#include "runtime/fieldDescriptor.hpp" #include "memory/oopFactory.hpp" #include "oops/generateOopMap.hpp" #include "oops/fieldStreams.hpp" +#include "runtime/fieldDescriptor.hpp" #include "runtime/javaCalls.hpp" #include "graal/graalRuntime.hpp" #include "compiler/compileBroker.hpp" @@ -509,16 +509,15 @@ AccessFlags flags; BasicType basic_type; if (holder->klass() == SystemDictionary::HotSpotResolvedObjectType_klass()) { - FieldAccessInfo result; - LinkResolver::resolve_field(result, cp, cp_index, - Bytecodes::java_code(code), - true, false, Thread::current()); + fieldDescriptor result; + LinkResolver::resolve_field_access(result, cp, cp_index, Bytecodes::java_code(code), true, false, Thread::current()); + if (HAS_PENDING_EXCEPTION) { CLEAR_PENDING_EXCEPTION; } else { - offset = result.field_offset(); + offset = result.offset(); flags = result.access_flags(); - holder_klass = result.klass()(); + holder_klass = result.field_holder(); basic_type = result.field_type(); holder = GraalCompiler::get_JavaType(holder_klass, CHECK_NULL); } @@ -1138,8 +1137,8 @@ C2V_VMENTRY(jobject, readUnsafeUncompressedPointer, (JNIEnv *env, jobject, jobject o, jlong offset)) oop resolved_o = JNIHandles::resolve(o); - jlong address = offset + (jlong)resolved_o; - return JNIHandles::make_local(*((oop*)address)); + address addr = offset + (address)resolved_o; + return JNIHandles::make_local(*((oop*)addr)); C2V_END C2V_VMENTRY(jlong, readUnsafeKlassPointer, (JNIEnv *env, jobject, jobject o))
--- a/src/share/vm/graal/graalRuntime.cpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/share/vm/graal/graalRuntime.cpp Fri Oct 11 15:41:33 2013 +0200 @@ -344,14 +344,14 @@ JRT_ENTRY(void, GraalRuntime::log_object(JavaThread* thread, oop obj, jint flags)) bool string = mask_bits_are_true(flags, LOG_OBJECT_STRING); - bool address = mask_bits_are_true(flags, LOG_OBJECT_ADDRESS); + bool addr = mask_bits_are_true(flags, LOG_OBJECT_ADDRESS); bool newline = mask_bits_are_true(flags, LOG_OBJECT_NEWLINE); if (!string) { - if (!address && obj->is_oop_or_null(true)) { + if (!addr && obj->is_oop_or_null(true)) { char buf[O_BUFLEN]; - tty->print("%s@%p", obj->klass()->name()->as_C_string(buf, O_BUFLEN), obj); + tty->print("%s@%p", obj->klass()->name()->as_C_string(buf, O_BUFLEN), (address)obj); } else { - tty->print("%p", obj); + tty->print("%p", (address)obj); } } else { ResourceMark rm; @@ -372,7 +372,7 @@ thread->dirty_card_queue().enqueue(card_addr); JRT_END -JRT_LEAF(jboolean, GraalRuntime::validate_object(JavaThread* thread,oopDesc* parent, oopDesc* child)) +JRT_LEAF(jboolean, GraalRuntime::validate_object(JavaThread* thread, oopDesc* parent, oopDesc* child)) bool ret = true; if(!Universe::heap()->is_in_closed_subset(parent)) { tty->print_cr("Parent Object "INTPTR_FORMAT" not in heap", parent);
--- a/src/share/vm/interpreter/invocationCounter.cpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/share/vm/interpreter/invocationCounter.cpp Fri Oct 11 15:41:33 2013 +0200 @@ -47,12 +47,7 @@ // large value. Now reduce the value, so that the method can be // executed many more times before re-entering the VM. int old_count = count(); - int new_count; -#ifdef GRAALVM - new_count = 1; -#else - new_count = MIN2(old_count, (int) (CompileThreshold / 2)); -#endif + int new_count = MIN2(old_count, (int) (CompileThreshold / 2)); // prevent from going to zero, to distinguish from never-executed methods if (new_count == 0) new_count = 1; if (old_count != new_count) set(state(), new_count);
--- a/src/share/vm/interpreter/linkResolver.cpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/share/vm/interpreter/linkResolver.cpp Fri Oct 11 15:41:33 2013 +0200 @@ -656,6 +656,10 @@ } void LinkResolver::resolve_field_access(fieldDescriptor& result, constantPoolHandle pool, int index, Bytecodes::Code byte, TRAPS) { + resolve_field_access(result, pool, index, byte, true, true, THREAD); +} + +void LinkResolver::resolve_field_access(fieldDescriptor& result, constantPoolHandle pool, int index, Bytecodes::Code byte, bool check_access, bool initialize_class, TRAPS) { // Load these early in case the resolve of the containing klass fails Symbol* field = pool->name_ref_at(index); Symbol* sig = pool->signature_ref_at(index); @@ -665,7 +669,7 @@ resolve_klass(resolved_klass, pool, index, CHECK); KlassHandle current_klass(THREAD, pool->pool_holder()); - resolve_field(result, resolved_klass, field, sig, current_klass, byte, true, true, CHECK); + resolve_field(result, resolved_klass, field, sig, current_klass, byte, check_access, initialize_class, CHECK); } void LinkResolver::resolve_field(fieldDescriptor& fd, KlassHandle resolved_klass, Symbol* field, Symbol* sig,
--- a/src/share/vm/interpreter/linkResolver.hpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/share/vm/interpreter/linkResolver.hpp Fri Oct 11 15:41:33 2013 +0200 @@ -161,6 +161,7 @@ // runtime/static resolving for fields static void resolve_field_access(fieldDescriptor& result, constantPoolHandle pool, int index, Bytecodes::Code byte, TRAPS); + static void resolve_field_access(fieldDescriptor& result, constantPoolHandle pool, int index, Bytecodes::Code byte, bool check_access, bool initialize_class, TRAPS); static void resolve_field(fieldDescriptor& result, KlassHandle resolved_klass, Symbol* field_name, Symbol* field_signature, KlassHandle current_klass, Bytecodes::Code access_kind, bool check_access, bool initialize_class, TRAPS);
--- a/src/share/vm/interpreter/templateInterpreter.cpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/share/vm/interpreter/templateInterpreter.cpp Fri Oct 11 15:41:33 2013 +0200 @@ -180,7 +180,7 @@ #endif // !PRODUCT EntryPoint TemplateInterpreter::_return_entry[TemplateInterpreter::number_of_return_entries]; EntryPoint TemplateInterpreter::_earlyret_entry; -EntryPoint TemplateInterpreter::_deopt_entry[TemplateInterpreter::number_of_deopt_entries ]; +EntryPoint TemplateInterpreter::_deopt_entry [TemplateInterpreter::number_of_deopt_entries ]; EntryPoint TemplateInterpreter::_continuation_entry; EntryPoint TemplateInterpreter::_safept_entry;
--- a/src/share/vm/memory/referenceProcessor.cpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/share/vm/memory/referenceProcessor.cpp Fri Oct 11 15:41:33 2013 +0200 @@ -305,6 +305,7 @@ complete_gc->do_void(); } + template <class T> bool enqueue_discovered_ref_helper(ReferenceProcessor* ref, AbstractRefProcTaskExecutor* task_executor) {
--- a/src/share/vm/oops/klass.hpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/share/vm/oops/klass.hpp Fri Oct 11 15:41:33 2013 +0200 @@ -147,7 +147,6 @@ Klass* _primary_supers[_primary_super_limit]; // java/lang/Class instance mirroring this class oop _java_mirror; - // Superclass Klass* _super; // First subclass (NULL if none); _subklass->next_sibling() is next one @@ -462,6 +461,9 @@ // computes the subtype relationship virtual bool compute_is_subtype_of(Klass* k); public: + // subclass accessor (here for convenience; undefined for non-klass objects) + virtual bool is_leaf_class() const { fatal("not a class"); return false; } + public: // ALL FUNCTIONS BELOW THIS POINT ARE DISPATCHED FROM AN OOP // These functions describe behavior for the oop not the KLASS.
--- a/src/share/vm/oops/method.cpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/share/vm/oops/method.cpp Fri Oct 11 15:41:33 2013 +0200 @@ -730,7 +730,7 @@ bool Method::is_always_compilable() const { // Generated adapters must be compiled if (is_method_handle_intrinsic()) { - bool is_executeCompiled = intrinsic_id() == vmIntrinsics::_CompilerToVMImpl_executeCompiledMethod); + bool is_executeCompiled = intrinsic_id() == vmIntrinsics::_CompilerToVMImpl_executeCompiledMethod; if (is_synthetic() || is_executeCompiled) { assert(!is_not_c1_compilable() || is_executeCompiled, "sanity check"); assert(!is_not_c2_compilable() || is_executeCompiled, "sanity check"); @@ -1039,8 +1039,8 @@ // Test if this method is an internal MH primitive method. bool Method::is_method_handle_intrinsic() const { vmIntrinsics::ID iid = intrinsic_id(); - return ((MethodHandles::is_signature_polymorphic(iid) && - MethodHandles::is_signature_polymorphic_intrinsic(iid))) || iid == vmIntrinsics::_CompilerToVMImpl_executeCompiledMethod; + return (MethodHandles::is_signature_polymorphic(iid) && + MethodHandles::is_signature_polymorphic_intrinsic(iid)) || iid == vmIntrinsics::_CompilerToVMImpl_executeCompiledMethod; } bool Method::has_member_arg() const {
--- a/src/share/vm/oops/method.hpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/share/vm/oops/method.hpp Fri Oct 11 15:41:33 2013 +0200 @@ -418,7 +418,7 @@ MethodCounters* mcs = get_method_counters(CHECK_0); return (mcs == NULL) ? 0 : mcs->increment_interpreter_invocation_count(); } - + #ifndef PRODUCT int compiled_invocation_count() const { return _compiled_invocation_count; } void set_compiled_invocation_count(int count) { _compiled_invocation_count = count; }
--- a/src/share/vm/oops/methodCounters.hpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/share/vm/oops/methodCounters.hpp Fri Oct 11 15:41:33 2013 +0200 @@ -45,7 +45,6 @@ MethodCounters() : _interpreter_invocation_count(0), _interpreter_throwout_count(0), _number_of_breakpoints(0) - #ifdef TIERED , _rate(0), _prev_time(0)
--- a/src/share/vm/oops/methodData.cpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/share/vm/oops/methodData.cpp Fri Oct 11 15:41:33 2013 +0200 @@ -510,7 +510,7 @@ int size_in_bytes = compute_data_size(&stream); data_size += size_in_bytes; - if (is_empty_data(size_in_bytes, c)) empty_bc_count++; + if (is_empty_data(size_in_bytes, c)) empty_bc_count += 1; } int object_size = in_bytes(data_offset()) + data_size; @@ -703,7 +703,7 @@ int size_in_bytes = initialize_data(&stream, data_size); data_size += size_in_bytes; - if (is_empty_data(size_in_bytes, c)) empty_bc_count++; + if (is_empty_data(size_in_bytes, c)) empty_bc_count += 1; } _data_size = data_size; int object_size = in_bytes(data_offset()) + data_size;
--- a/src/share/vm/opto/bytecodeInfo.cpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/share/vm/opto/bytecodeInfo.cpp Fri Oct 11 15:41:33 2013 +0200 @@ -256,10 +256,6 @@ set_msg("force inline by CompilerOracle"); return false; } - if (callee_method->should_not_inline()) { - set_msg("disallowed by CompilerOracle"); - return false; - } if (callee_method->should_not_inline()) { set_msg("disallowed by CompilerOracle");
--- a/src/share/vm/prims/jni.cpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/share/vm/prims/jni.cpp Fri Oct 11 15:41:33 2013 +0200 @@ -5158,6 +5158,7 @@ *(JNIEnv**)penv = thread->jni_environment(); #ifdef GRAAL + // GraalCompiler needs to have been created in compileBroker.cpp GraalCompiler* graal_compiler = GraalCompiler::instance(); graal_compiler->initialize(); #endif
--- a/src/share/vm/prims/jvmtiLib.xsl Fri Oct 11 10:38:03 2013 +0200 +++ b/src/share/vm/prims/jvmtiLib.xsl Fri Oct 11 15:41:33 2013 +0200 @@ -753,7 +753,7 @@ </xsl:template> -<!-- ======== HotSpotJavaType ======== --> +<!-- ======== HotSpotType ======== --> <xsl:template match="parameters" mode="HotSpotSig"> <xsl:variable name="length" select="count(param)"/> @@ -777,7 +777,7 @@ <xsl:template match="param" mode="HotSpotSig"> <xsl:param name="comma"/> <xsl:variable name="result"> - <xsl:apply-templates select="child::*[position()=1]" mode="HotSpotJavaType"/> + <xsl:apply-templates select="child::*[position()=1]" mode="HotSpotType"/> </xsl:variable> <xsl:if test="string-length($result)!=0"> <xsl:value-of select="$result"/> @@ -789,7 +789,7 @@ </xsl:if> </xsl:template> -<xsl:template match="jthread" mode="HotSpotJavaType"> +<xsl:template match="jthread" mode="HotSpotType"> <xsl:choose> <xsl:when test="count(@impl)=0 or not(contains(@impl,'noconvert'))"> <xsl:text>JavaThread*</xsl:text> @@ -800,23 +800,23 @@ </xsl:choose> </xsl:template> -<xsl:template match="jrawMonitorID" mode="HotSpotJavaType"> +<xsl:template match="jrawMonitorID" mode="HotSpotType"> <xsl:text>JvmtiRawMonitor *</xsl:text> </xsl:template> -<xsl:template match="jframeID" mode="HotSpotJavaType"> +<xsl:template match="jframeID" mode="HotSpotType"> <xsl:text>jint</xsl:text> </xsl:template> -<xsl:template match="jmethodID" mode="HotSpotJavaType"> +<xsl:template match="jmethodID" mode="HotSpotType"> <xsl:text>Method*</xsl:text> </xsl:template> -<xsl:template match="jfieldID" mode="HotSpotJavaType"> +<xsl:template match="jfieldID" mode="HotSpotType"> <xsl:text>fieldDescriptor*</xsl:text> </xsl:template> -<xsl:template match="jclass" mode="HotSpotJavaType"> +<xsl:template match="jclass" mode="HotSpotType"> <!-- classes passed as part of a class/method or class/field pair are used by the wrapper to get the internal type but are not needed by nor @@ -827,38 +827,38 @@ </xsl:if> </xsl:template> -<xsl:template match="nullok" mode="HotSpotJavaType"> +<xsl:template match="nullok" mode="HotSpotType"> </xsl:template> -<xsl:template match="jobject|jvalue|jthreadGroup|enum|jint|jchar|jlong|jfloat|jdouble|jlocation|jboolean|char|uchar|size_t|void|struct" mode="HotSpotJavaType"> +<xsl:template match="jobject|jvalue|jthreadGroup|enum|jint|jchar|jlong|jfloat|jdouble|jlocation|jboolean|char|uchar|size_t|void|struct" mode="HotSpotType"> <xsl:apply-templates select="." mode="btsig"/> </xsl:template> -<xsl:template match="varargs" mode="HotSpotJavaType"> +<xsl:template match="varargs" mode="HotSpotType"> <xsl:text> </xsl:text> </xsl:template> -<xsl:template match="outptr|outbuf|allocfieldbuf" mode="HotSpotJavaType"> +<xsl:template match="outptr|outbuf|allocfieldbuf" mode="HotSpotType"> <xsl:apply-templates select="child::*[position()=1]" mode="btsig"/> <xsl:text>*</xsl:text> </xsl:template> -<xsl:template match="ptrtype" mode="HotSpotJavaType"> +<xsl:template match="ptrtype" mode="HotSpotType"> <xsl:apply-templates select="child::*[position()=1]" mode="btsig"/> </xsl:template> -<xsl:template match="inptr|inbuf|vmbuf" mode="HotSpotJavaType"> +<xsl:template match="inptr|inbuf|vmbuf" mode="HotSpotType"> <xsl:text>const </xsl:text> <xsl:apply-templates select="child::*[position()=1]" mode="btsig"/> <xsl:text>*</xsl:text> </xsl:template> -<xsl:template match="allocbuf|agentbuf" mode="HotSpotJavaType"> +<xsl:template match="allocbuf|agentbuf" mode="HotSpotType"> <xsl:apply-templates select="child::*[position()=1]" mode="btsig"/> <xsl:text>**</xsl:text> </xsl:template> -<xsl:template match="allocallocbuf" mode="HotSpotJavaType"> +<xsl:template match="allocallocbuf" mode="HotSpotType"> <xsl:apply-templates select="child::*[position()=1]" mode="btsig"/> <xsl:text>***</xsl:text> </xsl:template>
--- a/src/share/vm/prims/unsafe.cpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/share/vm/prims/unsafe.cpp Fri Oct 11 15:41:33 2013 +0200 @@ -169,29 +169,19 @@ OrderAccess::release_store_fence((volatile type_name*)index_oop_from_field_offset_long(p, offset), x); // Macros for oops that check UseCompressedOops -#ifndef GRAAL -#define GET_OOP_FIELD(obj, offset, v) \ - oop p = JNIHandles::resolve(obj); \ - oop v; \ - if (UseCompressedOops) { \ - narrowOop n = *(narrowOop*)index_oop_from_field_offset_long(p, offset); \ - v = oopDesc::decode_heap_oop(n); \ - } else { \ - v = *(oop*)index_oop_from_field_offset_long(p, offset); \ - } -#else + #define GET_OOP_FIELD(obj, offset, v) \ - oop p = JNIHandles::resolve(obj); \ - oop v; \ - /* Uncompression is not performed to unsafeAccess with null object. - * This concerns accesses to the metaspace such as the classMirrorOffset which is not compressed.*/ \ - if (UseCompressedOops && p != NULL && offset >= oopDesc::header_size()) { \ - narrowOop n = *(narrowOop*)index_oop_from_field_offset_long(p, offset); \ - v = oopDesc::decode_heap_oop(n); \ - } else { \ - v = *(oop*)index_oop_from_field_offset_long(p, offset); \ - } -#endif + oop p = JNIHandles::resolve(obj); \ + oop v; \ + /* Uncompression is not performed to unsafeAccess with null object. \ + * This concerns accesses to the metaspace such as the classMirrorOffset in Graal which is not compressed.*/ \ + if (UseCompressedOops GRAAL_ONLY(&& p != NULL && offset >= oopDesc::header_size())) { \ + narrowOop n = *(narrowOop*)index_oop_from_field_offset_long(p, offset); \ + v = oopDesc::decode_heap_oop(n); \ + } else { \ + v = *(oop*)index_oop_from_field_offset_long(p, offset); \ + } + // Get/SetObject must be special-cased, since it works with handles.
--- a/src/share/vm/runtime/arguments.cpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/share/vm/runtime/arguments.cpp Fri Oct 11 15:41:33 2013 +0200 @@ -3667,7 +3667,7 @@ set_tiered_flags(); } else { // Check if the policy is valid. Policies 0 and 1 are valid for non-tiered setup. - if (CompilationPolicyChoice >= 2 GRAAL_ONLY(&& CompilationPolicyChoice < 4)) { + if (CompilationPolicyChoice >= 2) { vm_exit_during_initialization( "Incompatible compilation policy selected", NULL); }
--- a/src/share/vm/runtime/compilationPolicy.cpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/share/vm/runtime/compilationPolicy.cpp Fri Oct 11 15:41:33 2013 +0200 @@ -480,7 +480,6 @@ NOT_PRODUCT(trace_osr_completion(m->lookup_osr_nmethod_for(bci, comp_level, true));) } } - // StackWalkCompPolicy - walk up stack to find a suitable method to compile #ifdef COMPILER2
--- a/src/share/vm/runtime/compilationPolicy.hpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/share/vm/runtime/compilationPolicy.hpp Fri Oct 11 15:41:33 2013 +0200 @@ -118,14 +118,6 @@ virtual void method_back_branch_event(methodHandle m, int bci, JavaThread* thread); }; -#ifdef GRAALVM -class GraalCompPolicy : public NonTieredCompPolicy { - public: - virtual void method_invocation_event(methodHandle m, JavaThread* thread); - virtual void method_back_branch_event(methodHandle m, int bci, JavaThread* thread); -}; -#endif // GRAALVM - // StackWalkCompPolicy - existing C2 policy #ifdef COMPILER2
--- a/src/share/vm/runtime/deoptimization.cpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/share/vm/runtime/deoptimization.cpp Fri Oct 11 15:41:33 2013 +0200 @@ -869,6 +869,7 @@ } } + // restore fields of an eliminated object array void Deoptimization::reassign_object_array_elements(frame* fr, RegisterMap* reg_map, ObjectValue* sv, objArrayOop obj) { for (int i = 0; i < sv->field_size(); i++) { @@ -1554,6 +1555,7 @@ bool inc_recompile_count = false; ProfileData* pdata = NULL; if (ProfileTraps && update_trap_state && trap_mdo != NULL) { + assert(trap_mdo == get_method_data(thread, profiled_method, false), "sanity"); uint this_trap_count = 0; bool maybe_prior_trap = false; bool maybe_prior_recompile = false; @@ -1711,9 +1713,10 @@ maybe_prior_trap = (prior_trap_count != 0); maybe_prior_recompile = (trap_mdo->decompile_count() != 0); } + ProfileData* pdata = NULL; + // For reasons which are recorded per bytecode, we check per-BCI data. - ProfileData* pdata = NULL; DeoptReason per_bc_reason = reason_recorded_per_bytecode_if_any(reason); assert(per_bc_reason != Reason_none || update_total_trap_count, "must be"); if (per_bc_reason != Reason_none) {
--- a/src/share/vm/runtime/deoptimization.hpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/share/vm/runtime/deoptimization.hpp Fri Oct 11 15:41:33 2013 +0200 @@ -63,7 +63,7 @@ #endif // recorded per method - Reason_unloaded, // unloaded or class constant pool entry + Reason_unloaded, // unloaded class or constant pool entry Reason_uninitialized, // bad class state (uninitialized) Reason_unreached, // code is not reached, compiler Reason_unhandled, // arbitrary compiler limitation @@ -80,8 +80,8 @@ Reason_jsr_mismatch = Reason_age, #endif + // Note: Keep this enum in sync. with _trap_reason_name. Reason_RECORDED_LIMIT = Reason_bimorphic // some are not recorded per bc - // Note: Keep this enum in sync. with _trap_reason_name. // Note: Reason_RECORDED_LIMIT should be < 8 to fit into 3 bits of // DataLayout::trap_bits. This dependency is enforced indirectly // via asserts, to avoid excessive direct header-to-header dependencies. @@ -271,29 +271,26 @@ // trap_request codes static DeoptReason trap_request_reason(int trap_request) { - if (trap_request < 0) { + if (trap_request < 0) return (DeoptReason) ((~(trap_request) >> _reason_shift) & right_n_bits(_reason_bits)); - } else { + else // standard reason for unloaded CP entry return Reason_unloaded; - } } static DeoptAction trap_request_action(int trap_request) { - if (trap_request < 0) { + if (trap_request < 0) return (DeoptAction) ((~(trap_request) >> _action_shift) & right_n_bits(_action_bits)); - } else { + else // standard action for unloaded CP entry return _unloaded_action; - } } static int trap_request_index(int trap_request) { - if (trap_request < 0) { + if (trap_request < 0) return -1; - } else { + else return trap_request; - } } static int make_trap_request(DeoptReason reason, DeoptAction action, int index = -1) {
--- a/src/share/vm/runtime/fieldDescriptor.cpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/share/vm/runtime/fieldDescriptor.cpp Fri Oct 11 15:41:33 2013 +0200 @@ -27,6 +27,9 @@ #include "classfile/vmSymbols.hpp" #include "memory/resourceArea.hpp" #include "memory/universe.inline.hpp" +#include "oops/annotations.hpp" +#include "oops/instanceKlass.hpp" +#include "oops/fieldStreams.hpp" #include "runtime/fieldDescriptor.hpp" #include "runtime/handles.inline.hpp" #include "runtime/signature.hpp"
--- a/src/share/vm/runtime/fieldDescriptor.hpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/share/vm/runtime/fieldDescriptor.hpp Fri Oct 11 15:41:33 2013 +0200 @@ -25,10 +25,7 @@ #ifndef SHARE_VM_RUNTIME_FIELDDESCRIPTOR_HPP #define SHARE_VM_RUNTIME_FIELDDESCRIPTOR_HPP -#include "oops/annotations.hpp" #include "oops/constantPool.hpp" -#include "oops/fieldStreams.hpp" -#include "oops/instanceKlass.hpp" #include "oops/symbol.hpp" #include "runtime/fieldType.hpp" #include "utilities/accessFlags.hpp"
--- a/src/share/vm/runtime/globals.cpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/share/vm/runtime/globals.cpp Fri Oct 11 15:41:33 2013 +0200 @@ -417,7 +417,6 @@ #define GRAAL_PRODUCT_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_GRAAL | Flag::KIND_PRODUCT) }, #define GRAAL_PD_PRODUCT_FLAG_STRUCT( type, name, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_GRAAL | Flag::KIND_PRODUCT | Flag::KIND_PLATFORM_DEPENDENT) }, -#define GRAAL_DIAGNOSTIC_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), &name, NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_GRAAL | Flag::KIND_DIAGNOSTIC) }, #define GRAAL_DEVELOP_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), NAME(name), NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_GRAAL | Flag::KIND_DEVELOP) }, #define GRAAL_PD_DEVELOP_FLAG_STRUCT( type, name, doc) { #type, XSTR(name), NAME(name), NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_GRAAL | Flag::KIND_DEVELOP | Flag::KIND_PLATFORM_DEPENDENT) }, #define GRAAL_NOTPRODUCT_FLAG_STRUCT( type, name, value, doc) { #type, XSTR(name), NAME(name), NOT_PRODUCT_ARG(doc) Flag::Flags(Flag::DEFAULT | Flag::KIND_GRAAL | Flag::KIND_NOT_PRODUCT) },
--- a/src/share/vm/runtime/globals.hpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/share/vm/runtime/globals.hpp Fri Oct 11 15:41:33 2013 +0200 @@ -970,6 +970,9 @@ diagnostic(ccstr, PrintAssemblyOptions, NULL, \ "Options string passed to disassembler.so") \ \ + product(bool, PrintNMethodStatistics, false, \ + "Print a summary statistic for the generated nmethods") \ + \ diagnostic(bool, PrintNMethods, false, \ "Print assembly code for nmethods when generated") \ \
--- a/src/share/vm/runtime/java.cpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/share/vm/runtime/java.cpp Fri Oct 11 15:41:33 2013 +0200 @@ -260,7 +260,7 @@ #endif //COMPILER1 os::print_statistics(); } - + if (PrintLockStatistics || PrintPreciseBiasedLockingStatistics) { OptoRuntime::print_named_counters(); }
--- a/src/share/vm/runtime/mutexLocker.cpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/share/vm/runtime/mutexLocker.cpp Fri Oct 11 15:41:33 2013 +0200 @@ -284,6 +284,7 @@ def(JfrStream_lock , Mutex, nonleaf+2, true); def(JfrStacktrace_lock , Mutex, special, true ); #endif + #ifdef GRAAL def(GraalDeoptLeafGraphIds_lock , Mutex, special, true); #endif // GRAAL
--- a/src/share/vm/runtime/vframeArray.cpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/share/vm/runtime/vframeArray.cpp Fri Oct 11 15:41:33 2013 +0200 @@ -428,6 +428,9 @@ ttyLocker ttyl; tty->print_cr("[%d Interpreted Frame]", ++unpack_counter); iframe()->print_on(tty); + RegisterMap map(thread); + vframe* f = vframe::new_vframe(iframe(), &map, thread); + f->print(); tty->print_cr("locals size %d", locals()->size()); tty->print_cr("expression size %d", expressions()->size());
--- a/src/share/vm/runtime/vm_version.cpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/share/vm/runtime/vm_version.cpp Fri Oct 11 15:41:33 2013 +0200 @@ -123,10 +123,10 @@ #else // ZERO #ifdef GRAALVM #define VMTYPE "Graal" - #else // GRAAL + #else // GRAALVM #define VMTYPE COMPILER1_PRESENT("Client") \ COMPILER2_PRESENT("Server") - #endif // GRAAL + #endif // GRAALVM #endif // ZERO #endif // TIERED #endif
--- a/src/share/vm/utilities/globalDefinitions.hpp Fri Oct 11 10:38:03 2013 +0200 +++ b/src/share/vm/utilities/globalDefinitions.hpp Fri Oct 11 15:41:33 2013 +0200 @@ -809,20 +809,20 @@ CompLevel_full_profile = 3, // C1, invocation & backedge counters + mdo CompLevel_full_optimization = 4, // C2 or Shark -#if defined(COMPILER2) || defined(SHARK) - CompLevel_highest_tier = CompLevel_full_optimization, // pure C2 and tiered -#elif defined(COMPILER1) || defined(GRAAL) - CompLevel_highest_tier = CompLevel_simple, // pure C1 or Graal +#if defined(COMPILER2) || defined(SHARK) || defined(GRAAL) + CompLevel_highest_tier = CompLevel_full_optimization, // pure C2, tiered or pure Graal +#elif defined(COMPILER1) + CompLevel_highest_tier = CompLevel_simple, // pure C1 #else CompLevel_highest_tier = CompLevel_none, #endif #if defined(TIERED) CompLevel_initial_compile = CompLevel_full_profile // tiered -#elif defined(COMPILER1) || defined(GRAAL) - CompLevel_initial_compile = CompLevel_simple // pure C1 or Graal -#elif defined(COMPILER2) || defined(SHARK) - CompLevel_initial_compile = CompLevel_full_optimization // pure C2 +#elif defined(COMPILER1) + CompLevel_initial_compile = CompLevel_simple // pure C1 +#elif defined(COMPILER2) || defined(SHARK) || defined(GRAAL) + CompLevel_initial_compile = CompLevel_full_optimization // pure C2 or pure Graal #else CompLevel_initial_compile = CompLevel_none #endif