< prev index next >
src/hotspot/share/gc/g1/g1OopClosures.inline.hpp
Print this page
rev 52675 : 8213890: Implementation of JEP 344: Abortable Mixed Collections for G1
Reviewed-by:
Contributed-by: erik.helin@oracle.com, stefan.johansson@oracle.com
rev 52676 : imported patch AMGC-impl
*** 62,71 ****
--- 62,73 ----
template <class T>
inline void G1ScanClosureBase::handle_non_cset_obj_common(InCSetState const state, T* p, oop const obj) {
if (state.is_humongous()) {
_g1h->set_humongous_is_live(obj);
+ } else if (state.is_optional()) {
+ _par_scan_state->remember_reference_into_optional_region(p);
}
}
inline void G1ScanClosureBase::trim_queue_partially() {
_par_scan_state->trim_queue_partially();
*** 193,202 ****
--- 195,210 ----
} else if (!HeapRegion::is_in_same_region(p, obj)) {
handle_non_cset_obj_common(state, p, obj);
}
}
+ template <class T>
+ inline void G1ScanRSForOptionalClosure::do_oop_work(T* p) {
+ _scan_cl->do_oop_work(p);
+ _scan_cl->trim_queue_partially();
+ }
+
void G1ParCopyHelper::do_cld_barrier(oop new_obj) {
if (_g1h->heap_region_containing(new_obj)->is_young()) {
_scanned_cld->record_modified_oops();
}
}
*** 261,270 ****
--- 269,280 ----
do_cld_barrier(forwardee);
}
} else {
if (state.is_humongous()) {
_g1h->set_humongous_is_live(obj);
+ } else if (state.is_optional()) {
+ _par_scan_state->remember_root_into_optional_region(p);
}
// The object is not in collection set. If we're a root scanning
// closure during an initial mark pause then attempt to mark the object.
if (do_mark_object == G1MarkFromRoot) {
< prev index next >