# HG changeset patch # User Thomas Wuerthinger # Date 1330352159 -3600 # Node ID ab906cea36f7ce53a16fa9a8f836e75dedae6066 # Parent 5d154704b04c52b56e552ffe06746704039e8936 First round of minimizing diff vs OpenJDK. diff -r 5d154704b04c -r ab906cea36f7 src/cpu/x86/vm/c1_MacroAssembler_x86.cpp --- a/src/cpu/x86/vm/c1_MacroAssembler_x86.cpp Mon Feb 27 14:58:47 2012 +0100 +++ b/src/cpu/x86/vm/c1_MacroAssembler_x86.cpp Mon Feb 27 15:15:59 2012 +0100 @@ -289,12 +289,14 @@ jcc(Assembler::notZero, loop); } } - - // (tw) fix me -// if (CURRENT_ENV->dtrace_alloc_probes()) { -// assert(obj == rax, "must be"); -// call(RuntimeAddress(Runtime1::entry_for(Runtime1::dtrace_object_alloc_id))); -// } + +#ifndef GRAAL + // TODO(tw): Check how we can access the flag without a ciEnv object. + if (CURRENT_ENV->dtrace_alloc_probes()) { + assert(obj == rax, "must be"); + call(RuntimeAddress(Runtime1::entry_for(Runtime1::dtrace_object_alloc_id))); + } +#endif verify_oop(obj); } @@ -324,11 +326,14 @@ const Register len_zero = len; initialize_body(obj, arr_size, header_size * BytesPerWord, len_zero); - // TODO(tw): Re-enable this code once Graal no longer uses this method. -// if (CURRENT_ENV->dtrace_alloc_probes()) { -// assert(obj == rax, "must be"); -// call(RuntimeAddress(Runtime1::entry_for(Runtime1::dtrace_object_alloc_id))); -// } + +#ifndef GRAAL + // TODO(tw): Check how we can access the flag without a ciEnv object. + if (CURRENT_ENV->dtrace_alloc_probes()) { + assert(obj == rax, "must be"); + call(RuntimeAddress(Runtime1::entry_for(Runtime1::dtrace_object_alloc_id))); + } +#endif verify_oop(obj); } diff -r 5d154704b04c -r ab906cea36f7 src/share/vm/c1/c1_Runtime1.cpp --- a/src/share/vm/c1/c1_Runtime1.cpp Mon Feb 27 14:58:47 2012 +0100 +++ b/src/share/vm/c1/c1_Runtime1.cpp Mon Feb 27 15:15:59 2012 +0100 @@ -201,16 +201,18 @@ case slow_subtype_check_id: case fpu2long_stub_id: case unwind_exception_id: +#ifdef GRAAL case graal_verify_pointer_id: case graal_unwind_exception_call_id: case graal_slow_subtype_check_id: case graal_arithmetic_frem_id: case graal_arithmetic_drem_id: case graal_set_deopt_info_id: +#endif #ifndef TIERED case counter_overflow_id: // Not generated outside the tiered world #endif -#ifdef SPARC +#if defined(SPARC) || defined(PPC) case handle_exception_nofpu_id: // Unused on sparc #endif break; @@ -591,6 +593,7 @@ continuation = exception_handler_for_pc_helper(thread, exception, pc, nm); } // Back in JAVA, use no oops DON'T safepoint + // Now check to see if the nmethod we were called from is now deoptimized. // If so we must return to the deopt blob and deoptimize the nmethod if (nm != NULL && caller_is_deopted()) { @@ -646,7 +649,7 @@ SharedRuntime::throw_and_post_jvmti_exception(thread, vmSymbols::java_lang_IncompatibleClassChangeError()); JRT_END - +#ifdef GRAAL JRT_ENTRY_NO_ASYNC(void, Runtime1::graal_monitorenter(JavaThread* thread, oopDesc* obj, BasicLock* lock)) NOT_PRODUCT(_monitorenter_slowcase_cnt++;) #ifdef ASSERT @@ -707,25 +710,17 @@ } JRT_END +#endif + JRT_ENTRY_NO_ASYNC(void, Runtime1::monitorenter(JavaThread* thread, oopDesc* obj, BasicObjectLock* lock)) NOT_PRODUCT(_monitorenter_slowcase_cnt++;) -#ifdef ASSERT - if (TraceGraal >= 3) { - tty->print_cr("entered locking slow case with obj=" INTPTR_FORMAT " and lock= " INTPTR_FORMAT, obj, lock); - } if (PrintBiasedLockingStatistics) { Atomic::inc(BiasedLocking::slow_path_entry_count_addr()); } -#endif Handle h_obj(thread, obj); assert(h_obj()->is_oop(), "must be NULL or an object"); if (UseBiasedLocking) { - if (UseFastLocking) { - assert(obj == lock->obj(), "must match"); - } else { - lock->set_obj(obj); - } // Retry fast entry if bias is revoked to avoid unnecessary inflation ObjectSynchronizer::fast_enter(h_obj, lock->lock(), true, CHECK); } else { @@ -738,14 +733,6 @@ ObjectSynchronizer::fast_enter(h_obj, lock->lock(), false, THREAD); } } -#ifdef ASSERT - if (TraceGraal >= 3) { - tty->print_cr("exiting locking lock state: obj=" INTPTR_FORMAT, lock->obj()); - lock->lock()->print_on(tty); - tty->print_cr(""); - tty->print_cr("done"); - } -#endif JRT_END