< prev index next >

src/share/vm/opto/runtime.cpp

Print this page
rev 12906 : [mq]: gc_interface

*** 32,42 **** #include "code/pcDesc.hpp" #include "code/scopeDesc.hpp" #include "code/vtableStubs.hpp" #include "compiler/compileBroker.hpp" #include "compiler/oopMap.hpp" - #include "gc/g1/g1SATBCardTableModRefBS.hpp" #include "gc/g1/heapRegion.hpp" #include "gc/shared/barrierSet.hpp" #include "gc/shared/collectedHeap.hpp" #include "gc/shared/gcLocker.inline.hpp" #include "interpreter/bytecode.hpp" --- 32,41 ----
*** 92,103 **** address OptoRuntime::_multianewarray2_Java = NULL; address OptoRuntime::_multianewarray3_Java = NULL; address OptoRuntime::_multianewarray4_Java = NULL; address OptoRuntime::_multianewarray5_Java = NULL; address OptoRuntime::_multianewarrayN_Java = NULL; - address OptoRuntime::_g1_wb_pre_Java = NULL; - address OptoRuntime::_g1_wb_post_Java = NULL; address OptoRuntime::_vtable_must_compile_Java = NULL; address OptoRuntime::_complete_monitor_locking_Java = NULL; address OptoRuntime::_monitor_notify_Java = NULL; address OptoRuntime::_monitor_notifyAll_Java = NULL; address OptoRuntime::_rethrow_Java = NULL; --- 91,100 ----
*** 138,149 **** gen(env, _multianewarray2_Java , multianewarray2_Type , multianewarray2_C , 0 , true , false, false); gen(env, _multianewarray3_Java , multianewarray3_Type , multianewarray3_C , 0 , true , false, false); gen(env, _multianewarray4_Java , multianewarray4_Type , multianewarray4_C , 0 , true , false, false); gen(env, _multianewarray5_Java , multianewarray5_Type , multianewarray5_C , 0 , true , false, false); gen(env, _multianewarrayN_Java , multianewarrayN_Type , multianewarrayN_C , 0 , true , false, false); - gen(env, _g1_wb_pre_Java , g1_wb_pre_Type , SharedRuntime::g1_wb_pre , 0 , false, false, false); - gen(env, _g1_wb_post_Java , g1_wb_post_Type , SharedRuntime::g1_wb_post , 0 , false, false, false); gen(env, _complete_monitor_locking_Java , complete_monitor_enter_Type , SharedRuntime::complete_monitor_locking_C, 0, false, false, false); gen(env, _monitor_notify_Java , monitor_notify_Type , monitor_notify_C , 0 , false, false, false); gen(env, _monitor_notifyAll_Java , monitor_notify_Type , monitor_notifyAll_C , 0 , false, false, false); gen(env, _rethrow_Java , rethrow_Type , rethrow_C , 2 , true , false, true ); --- 135,144 ----
*** 192,218 **** //=============================allocation====================================== // We failed the fast-path allocation. Now we need to do a scavenge or GC // and try allocation again. - void OptoRuntime::new_store_pre_barrier(JavaThread* thread) { - // After any safepoint, just before going back to compiled code, - // we inform the GC that we will be doing initializing writes to - // this object in the future without emitting card-marks, so - // GC may take any compensating steps. - // NOTE: Keep this code consistent with GraphKit::store_barrier. - - oop new_obj = thread->vm_result(); - if (new_obj == NULL) return; - - assert(Universe::heap()->can_elide_tlab_store_barriers(), - "compiler must check this first"); - // GC may decide to give back a safer copy of new_obj. - new_obj = Universe::heap()->new_store_pre_barrier(thread, new_obj); - thread->set_vm_result(new_obj); - } - // object allocation JRT_BLOCK_ENTRY(void, OptoRuntime::new_instance_C(Klass* klass, JavaThread* thread)) JRT_BLOCK; #ifndef PRODUCT SharedRuntime::_new_instance_ctr++; // new instance requires GC --- 187,196 ----
*** 242,255 **** } deoptimize_caller_frame(thread, HAS_PENDING_EXCEPTION); JRT_BLOCK_END; - if (GraphKit::use_ReduceInitialCardMarks()) { // inform GC that we won't do card marks for initializing writes. ! new_store_pre_barrier(thread); ! } JRT_END // array allocation JRT_BLOCK_ENTRY(void, OptoRuntime::new_array_C(Klass* array_type, int len, JavaThread *thread)) --- 220,231 ---- } deoptimize_caller_frame(thread, HAS_PENDING_EXCEPTION); JRT_BLOCK_END; // inform GC that we won't do card marks for initializing writes. ! SharedRuntime::on_slowpath_allocation(thread); JRT_END // array allocation JRT_BLOCK_ENTRY(void, OptoRuntime::new_array_C(Klass* array_type, int len, JavaThread *thread))
*** 282,295 **** // fetch the oop from TLS after any possible GC. deoptimize_caller_frame(thread, HAS_PENDING_EXCEPTION); thread->set_vm_result(result); JRT_BLOCK_END; - if (GraphKit::use_ReduceInitialCardMarks()) { // inform GC that we won't do card marks for initializing writes. ! new_store_pre_barrier(thread); ! } JRT_END // array allocation without zeroing JRT_BLOCK_ENTRY(void, OptoRuntime::new_array_nozero_C(Klass* array_type, int len, JavaThread *thread)) JRT_BLOCK; --- 258,269 ---- // fetch the oop from TLS after any possible GC. deoptimize_caller_frame(thread, HAS_PENDING_EXCEPTION); thread->set_vm_result(result); JRT_BLOCK_END; // inform GC that we won't do card marks for initializing writes. ! SharedRuntime::on_slowpath_allocation(thread); JRT_END // array allocation without zeroing JRT_BLOCK_ENTRY(void, OptoRuntime::new_array_nozero_C(Klass* array_type, int len, JavaThread *thread)) JRT_BLOCK;
*** 312,325 **** // fetch the oop from TLS after any possible GC. deoptimize_caller_frame(thread, HAS_PENDING_EXCEPTION); thread->set_vm_result(result); JRT_BLOCK_END; ! if (GraphKit::use_ReduceInitialCardMarks()) { // inform GC that we won't do card marks for initializing writes. ! new_store_pre_barrier(thread); ! } oop result = thread->vm_result(); if ((len > 0) && (result != NULL) && is_deoptimized_caller_frame(thread)) { // Zero array here if the caller is deoptimized. --- 286,298 ---- // fetch the oop from TLS after any possible GC. deoptimize_caller_frame(thread, HAS_PENDING_EXCEPTION); thread->set_vm_result(result); JRT_BLOCK_END; ! // inform GC that we won't do card marks for initializing writes. ! SharedRuntime::on_slowpath_allocation(thread); oop result = thread->vm_result(); if ((len > 0) && (result != NULL) && is_deoptimized_caller_frame(thread)) { // Zero array here if the caller is deoptimized.
*** 561,597 **** const TypeTuple *range = TypeTuple::make(TypeFunc::Parms+1, fields); return TypeFunc::make(domain, range); } - const TypeFunc *OptoRuntime::g1_wb_pre_Type() { - const Type **fields = TypeTuple::fields(2); - fields[TypeFunc::Parms+0] = TypeInstPtr::NOTNULL; // original field value - fields[TypeFunc::Parms+1] = TypeRawPtr::NOTNULL; // thread - const TypeTuple *domain = TypeTuple::make(TypeFunc::Parms+2, fields); - - // create result type (range) - fields = TypeTuple::fields(0); - const TypeTuple *range = TypeTuple::make(TypeFunc::Parms+0, fields); - - return TypeFunc::make(domain, range); - } - - const TypeFunc *OptoRuntime::g1_wb_post_Type() { - - const Type **fields = TypeTuple::fields(2); - fields[TypeFunc::Parms+0] = TypeRawPtr::NOTNULL; // Card addr - fields[TypeFunc::Parms+1] = TypeRawPtr::NOTNULL; // thread - const TypeTuple *domain = TypeTuple::make(TypeFunc::Parms+2, fields); - - // create result type (range) - fields = TypeTuple::fields(0); - const TypeTuple *range = TypeTuple::make(TypeFunc::Parms, fields); - - return TypeFunc::make(domain, range); - } - const TypeFunc *OptoRuntime::uncommon_trap_Type() { // create input type (domain) const Type **fields = TypeTuple::fields(1); fields[TypeFunc::Parms+0] = TypeInt::INT; // trap_reason (deopt reason and action) const TypeTuple *domain = TypeTuple::make(TypeFunc::Parms+1, fields); --- 534,543 ----
< prev index next >