< prev index next >

src/share/vm/jvmci/jvmciRuntime.cpp

Print this page
rev 12906 : [mq]: gc_interface

*** 114,126 **** // allocate instance and return via TLS oop obj = ik->allocate_instance(CHECK); thread->set_vm_result(obj); JRT_BLOCK_END; ! if (ReduceInitialCardMarks) { ! new_store_pre_barrier(thread); ! } JRT_END JRT_BLOCK_ENTRY(void, JVMCIRuntime::new_array(JavaThread* thread, Klass* array_klass, jint length)) JRT_BLOCK; // Note: no handle for klass needed since they are not used --- 114,124 ---- // allocate instance and return via TLS oop obj = ik->allocate_instance(CHECK); thread->set_vm_result(obj); JRT_BLOCK_END; ! SharedRuntime::on_slowpath_allocation(thread); JRT_END JRT_BLOCK_ENTRY(void, JVMCIRuntime::new_array(JavaThread* thread, Klass* array_klass, jint length)) JRT_BLOCK; // Note: no handle for klass needed since they are not used
*** 149,180 **** deopt_caller(); } } JRT_BLOCK_END; ! if (ReduceInitialCardMarks) { ! new_store_pre_barrier(thread); ! } JRT_END - void JVMCIRuntime::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); - } - JRT_ENTRY(void, JVMCIRuntime::new_multi_array(JavaThread* thread, Klass* klass, int rank, jint* dims)) assert(klass->is_klass(), "not a class"); assert(rank >= 1, "rank must be nonzero"); Handle holder(THREAD, klass->klass_holder()); // keep the klass alive oop obj = ArrayKlass::cast(klass)->multi_allocate(rank, dims, CHECK); --- 147,159 ---- deopt_caller(); } } JRT_BLOCK_END; ! SharedRuntime::on_slowpath_allocation(thread); JRT_END JRT_ENTRY(void, JVMCIRuntime::new_multi_array(JavaThread* thread, Klass* klass, int rank, jint* dims)) assert(klass->is_klass(), "not a class"); assert(rank >= 1, "rank must be nonzero"); Handle holder(THREAD, klass->klass_holder()); // keep the klass alive oop obj = ArrayKlass::cast(klass)->multi_allocate(rank, dims, CHECK);
< prev index next >