< prev index next >

src/hotspot/share/gc/g1/g1ConcurrentMark.inline.hpp

Print this page

 55   return _g1h->heap_region_containing(obj)->is_old_or_humongous_or_archive();
 56 }
 57 
 58 inline bool G1ConcurrentMark::mark_in_next_bitmap(uint const worker_id, oop const obj) {
 59   HeapRegion* const hr = _g1h->heap_region_containing(obj);
 60   return mark_in_next_bitmap(worker_id, hr, obj);
 61 }
 62 
 63 inline bool G1ConcurrentMark::mark_in_next_bitmap(uint const worker_id, HeapRegion* const hr, oop const obj) {
 64   assert(hr != NULL, "just checking");
 65   assert(hr->is_in_reserved(obj), "Attempting to mark object at " PTR_FORMAT " that is not contained in the given region %u", p2i(obj), hr->hrm_index());
 66 
 67   if (hr->obj_allocated_since_next_marking(obj)) {
 68     return false;
 69   }
 70 
 71   // Some callers may have stale objects to mark above nTAMS after humongous reclaim.
 72   // Can't assert that this is a valid object at this point, since it might be in the process of being copied by another thread.
 73   assert(!hr->is_continues_humongous(), "Should not try to mark object " PTR_FORMAT " in Humongous continues region %u above nTAMS " PTR_FORMAT, p2i(obj), hr->hrm_index(), p2i(hr->next_top_at_mark_start()));
 74 



 75   bool success = _next_mark_bitmap->par_mark(obj);
 76   if (success) {
 77     add_to_liveness(worker_id, obj, obj->size());
 78   }
 79   return success;
 80 }
 81 
 82 #ifndef PRODUCT
 83 template<typename Fn>
 84 inline void G1CMMarkStack::iterate(Fn fn) const {
 85   assert_at_safepoint_on_vm_thread();
 86 
 87   size_t num_chunks = 0;
 88 
 89   TaskQueueEntryChunk* cur = _chunk_list;
 90   while (cur != NULL) {
 91     guarantee(num_chunks <= _chunks_in_chunk_list, "Found " SIZE_FORMAT " oop chunks which is more than there should be", num_chunks);
 92 
 93     for (size_t i = 0; i < EntriesPerChunk; ++i) {
 94       if (cur->data[i].is_null()) {

 55   return _g1h->heap_region_containing(obj)->is_old_or_humongous_or_archive();
 56 }
 57 
 58 inline bool G1ConcurrentMark::mark_in_next_bitmap(uint const worker_id, oop const obj) {
 59   HeapRegion* const hr = _g1h->heap_region_containing(obj);
 60   return mark_in_next_bitmap(worker_id, hr, obj);
 61 }
 62 
 63 inline bool G1ConcurrentMark::mark_in_next_bitmap(uint const worker_id, HeapRegion* const hr, oop const obj) {
 64   assert(hr != NULL, "just checking");
 65   assert(hr->is_in_reserved(obj), "Attempting to mark object at " PTR_FORMAT " that is not contained in the given region %u", p2i(obj), hr->hrm_index());
 66 
 67   if (hr->obj_allocated_since_next_marking(obj)) {
 68     return false;
 69   }
 70 
 71   // Some callers may have stale objects to mark above nTAMS after humongous reclaim.
 72   // Can't assert that this is a valid object at this point, since it might be in the process of being copied by another thread.
 73   assert(!hr->is_continues_humongous(), "Should not try to mark object " PTR_FORMAT " in Humongous continues region %u above nTAMS " PTR_FORMAT, p2i(obj), hr->hrm_index(), p2i(hr->next_top_at_mark_start()));
 74 
 75   if (hr->is_open_archive()) {
 76     log_debug(gc)("mark OA obj " PTR_FORMAT, p2i(obj));
 77   }
 78   bool success = _next_mark_bitmap->par_mark(obj);
 79   if (success) {
 80     add_to_liveness(worker_id, obj, obj->size());
 81   }
 82   return success;
 83 }
 84 
 85 #ifndef PRODUCT
 86 template<typename Fn>
 87 inline void G1CMMarkStack::iterate(Fn fn) const {
 88   assert_at_safepoint_on_vm_thread();
 89 
 90   size_t num_chunks = 0;
 91 
 92   TaskQueueEntryChunk* cur = _chunk_list;
 93   while (cur != NULL) {
 94     guarantee(num_chunks <= _chunks_in_chunk_list, "Found " SIZE_FORMAT " oop chunks which is more than there should be", num_chunks);
 95 
 96     for (size_t i = 0; i < EntriesPerChunk; ++i) {
 97       if (cur->data[i].is_null()) {
< prev index next >