< prev index next >
src/hotspot/share/gc/g1/g1ConcurrentMark.inline.hpp
Print this page
rev 49754 : imported patch 8201490-improve-conc-mark-keepalive
rev 49755 : imported patch 8201490-kim-review
rev 49758 : imported patch 8201492-properly-implement-non-contiguous-reference-processing
*** 36,45 ****
--- 36,67 ----
#include "gc/g1/heapRegion.hpp"
#include "gc/shared/suspendibleThreadSet.hpp"
#include "gc/shared/taskqueue.inline.hpp"
#include "utilities/bitMap.inline.hpp"
+ inline bool G1CMIsAliveClosure::do_object_b(oop obj) {
+ if (obj == NULL) {
+ return false;
+ }
+ assert(_g1h->is_in_reserved(obj), "Asked for liveness of oop " PTR_FORMAT " outside of reserved heap.", p2i(obj));
+ // Young regions have nTAMS == bottom(), i.e. all objects there are implicitly live,
+ // so we do not need to explicitly check for region type.
+ bool result = !_g1h->is_obj_ill(obj, _g1h->heap_region_containing(obj));
+ assert(_g1h->heap_region_containing(obj)->is_old_or_humongous() || result,
+ "Oop " PTR_FORMAT " in young region %u (%s) should be live",
+ p2i(obj), _g1h->addr_to_region((HeapWord*)obj), _g1h->heap_region_containing(obj)->get_short_type_str());
+ return result;
+ }
+
+ inline bool G1CMSubjectToDiscoveryClosure::do_object_b(oop obj) {
+ if (obj == NULL) {
+ return false;
+ }
+ assert(_g1h->is_in_reserved(obj), "Trying to discover obj " PTR_FORMAT " not in heap", p2i(obj));
+ return _g1h->heap_region_containing(obj)->is_old_or_humongous();
+ }
+
inline bool G1ConcurrentMark::mark_in_next_bitmap(uint const worker_id, oop const obj, size_t const obj_size) {
HeapRegion* const hr = _g1h->heap_region_containing(obj);
return mark_in_next_bitmap(worker_id, hr, obj, obj_size);
}
< prev index next >