comparison src/share/vm/runtime/sharedRuntime.cpp @ 8506:c3657d00e343

-Merge with tip
author Christos Kotselidis <christos.kotselidis@oracle.com>
date Thu, 21 Mar 2013 14:11:13 +0100
parents 37977d1dcedc
children e41c32a4d573
comparison
equal deleted inserted replaced
8505:dee7c8b578c7 8506:c3657d00e343
54 #include "runtime/vframeArray.hpp" 54 #include "runtime/vframeArray.hpp"
55 #include "utilities/copy.hpp" 55 #include "utilities/copy.hpp"
56 #include "utilities/dtrace.hpp" 56 #include "utilities/dtrace.hpp"
57 #include "utilities/events.hpp" 57 #include "utilities/events.hpp"
58 #include "utilities/hashtable.inline.hpp" 58 #include "utilities/hashtable.inline.hpp"
59 #include "utilities/macros.hpp"
59 #include "utilities/xmlstream.hpp" 60 #include "utilities/xmlstream.hpp"
60 #ifdef TARGET_ARCH_x86 61 #ifdef TARGET_ARCH_x86
61 # include "nativeInst_x86.hpp" 62 # include "nativeInst_x86.hpp"
62 # include "vmreg_x86.inline.hpp" 63 # include "vmreg_x86.inline.hpp"
63 #endif 64 #endif
210 tty->print_cr ("Total IC misses: %7d", tot_misses); 211 tty->print_cr ("Total IC misses: %7d", tot_misses);
211 } 212 }
212 } 213 }
213 #endif // PRODUCT 214 #endif // PRODUCT
214 215
215 #ifndef SERIALGC 216 #if INCLUDE_ALL_GCS
216 217
217 // G1 write-barrier pre: executed before a pointer store. 218 // G1 write-barrier pre: executed before a pointer store.
218 JRT_LEAF(void, SharedRuntime::g1_wb_pre(oopDesc* orig, JavaThread *thread)) 219 JRT_LEAF(void, SharedRuntime::g1_wb_pre(oopDesc* orig, JavaThread *thread))
219 if (orig == NULL) { 220 if (orig == NULL) {
220 assert(false, "should be optimized out"); 221 assert(false, "should be optimized out");
228 // G1 write-barrier post: executed after a pointer store. 229 // G1 write-barrier post: executed after a pointer store.
229 JRT_LEAF(void, SharedRuntime::g1_wb_post(void* card_addr, JavaThread* thread)) 230 JRT_LEAF(void, SharedRuntime::g1_wb_post(void* card_addr, JavaThread* thread))
230 thread->dirty_card_queue().enqueue(card_addr); 231 thread->dirty_card_queue().enqueue(card_addr);
231 JRT_END 232 JRT_END
232 233
233 #endif // !SERIALGC 234 #endif // INCLUDE_ALL_GCS
234 235
235 236
236 JRT_LEAF(jlong, SharedRuntime::lmul(jlong y, jlong x)) 237 JRT_LEAF(jlong, SharedRuntime::lmul(jlong y, jlong x))
237 return x * y; 238 return x * y;
238 JRT_END 239 JRT_END
770 JRT_END 771 JRT_END
771 772
772 #ifdef GRAAL 773 #ifdef GRAAL
773 address SharedRuntime::deoptimize_for_implicit_exception(JavaThread* thread, address pc, nmethod* nm, int deopt_reason) { 774 address SharedRuntime::deoptimize_for_implicit_exception(JavaThread* thread, address pc, nmethod* nm, int deopt_reason) {
774 assert(deopt_reason > Deoptimization::Reason_none && deopt_reason < Deoptimization::Reason_LIMIT, "invalid deopt reason"); 775 assert(deopt_reason > Deoptimization::Reason_none && deopt_reason < Deoptimization::Reason_LIMIT, "invalid deopt reason");
775 if (TraceSignals) {
776 tty->print_cr(err_msg("Deoptimizing on implicit exception at relative pc=%d in method %s", pc - nm->entry_point(), nm->method()->name()->as_C_string()));
777 }
778 thread->_ScratchA = (intptr_t)pc; 776 thread->_ScratchA = (intptr_t)pc;
779 thread->_ScratchB = Deoptimization::make_trap_request((Deoptimization::DeoptReason)deopt_reason, Deoptimization::Action_reinterpret); 777 thread->set_pending_deoptimization(Deoptimization::make_trap_request((Deoptimization::DeoptReason)deopt_reason, Deoptimization::Action_reinterpret));
780 return (SharedRuntime::deopt_blob()->implicit_exception_uncommon_trap()); 778 return (SharedRuntime::deopt_blob()->implicit_exception_uncommon_trap());
781 } 779 }
782 #endif 780 #endif
783 781
784 address SharedRuntime::continuation_for_implicit_exception(JavaThread* thread, 782 address SharedRuntime::continuation_for_implicit_exception(JavaThread* thread,
896 #ifndef PRODUCT 894 #ifndef PRODUCT
897 _implicit_div0_throws++; 895 _implicit_div0_throws++;
898 #endif 896 #endif
899 #ifdef GRAAL 897 #ifdef GRAAL
900 if (nm->is_compiled_by_graal()) { 898 if (nm->is_compiled_by_graal()) {
901 if (TraceSignals) {
902 tty->print_cr("Graal implicit div0");
903 }
904 target_pc = deoptimize_for_implicit_exception(thread, pc, nm, Deoptimization::Reason_div0_check); 899 target_pc = deoptimize_for_implicit_exception(thread, pc, nm, Deoptimization::Reason_div0_check);
905 } else { 900 } else {
906 #endif 901 #endif
907 target_pc = nm->continuation_for_implicit_exception(pc); 902 target_pc = nm->continuation_for_implicit_exception(pc);
908 #ifdef GRAAL 903 #ifdef GRAAL
2866 // 2861 //
2867 // All of this is done NOT at any Safepoint, nor is any safepoint or GC allowed. 2862 // All of this is done NOT at any Safepoint, nor is any safepoint or GC allowed.
2868 2863
2869 JRT_LEAF(intptr_t*, SharedRuntime::OSR_migration_begin( JavaThread *thread) ) 2864 JRT_LEAF(intptr_t*, SharedRuntime::OSR_migration_begin( JavaThread *thread) )
2870 2865
2871 #ifdef IA64
2872 ShouldNotReachHere(); // NYI
2873 #endif /* IA64 */
2874
2875 // 2866 //
2876 // This code is dependent on the memory layout of the interpreter local 2867 // This code is dependent on the memory layout of the interpreter local
2877 // array and the monitors. On all of our platforms the layout is identical 2868 // array and the monitors. On all of our platforms the layout is identical
2878 // so this code is shared. If some platform lays the their arrays out 2869 // so this code is shared. If some platform lays the their arrays out
2879 // differently then this code could move to platform specific code or 2870 // differently then this code could move to platform specific code or