< prev index next >
src/share/vm/runtime/sharedRuntime.cpp
Print this page
rev 12906 : [mq]: gc_interface
@@ -198,31 +198,10 @@
tty->print_cr("Total IC misses: %7d", tot_misses);
}
}
#endif // PRODUCT
-#if INCLUDE_ALL_GCS
-
-// G1 write-barrier pre: executed before a pointer store.
-JRT_LEAF(void, SharedRuntime::g1_wb_pre(oopDesc* orig, JavaThread *thread))
- if (orig == NULL) {
- assert(false, "should be optimized out");
- return;
- }
- assert(orig->is_oop(true /* ignore mark word */), "Error");
- // store the original value that was in the field reference
- thread->satb_mark_queue().enqueue(orig);
-JRT_END
-
-// G1 write-barrier post: executed after a pointer store.
-JRT_LEAF(void, SharedRuntime::g1_wb_post(void* card_addr, JavaThread* thread))
- thread->dirty_card_queue().enqueue(card_addr);
-JRT_END
-
-#endif // INCLUDE_ALL_GCS
-
-
JRT_LEAF(jlong, SharedRuntime::lmul(jlong y, jlong x))
return x * y;
JRT_END
@@ -3166,5 +3145,19 @@
}
}
return activation;
}
+void SharedRuntime::on_slowpath_allocation(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.
+
+ oop new_obj = thread->vm_result();
+ if (new_obj == NULL) return;
+
+ BarrierSet *bs = Universe::heap()->barrier_set();
+ // GC may decide to give back a safer copy of new_obj.
+ bs->on_slowpath_allocation(thread, new_obj);
+ thread->set_vm_result(new_obj);
+}
< prev index next >