75 // in an unfiltered buffer refer to valid objects. |
75 // in an unfiltered buffer refer to valid objects. |
76 |
76 |
77 inline bool requires_marking(const void* entry, G1CollectedHeap* heap) { |
77 inline bool requires_marking(const void* entry, G1CollectedHeap* heap) { |
78 // Includes rejection of NULL pointers. |
78 // Includes rejection of NULL pointers. |
79 assert(heap->is_in_reserved(entry), |
79 assert(heap->is_in_reserved(entry), |
80 err_msg("Non-heap pointer in SATB buffer: " PTR_FORMAT, p2i(entry))); |
80 "Non-heap pointer in SATB buffer: " PTR_FORMAT, p2i(entry)); |
81 |
81 |
82 HeapRegion* region = heap->heap_region_containing_raw(entry); |
82 HeapRegion* region = heap->heap_region_containing_raw(entry); |
83 assert(region != NULL, err_msg("No region for " PTR_FORMAT, p2i(entry))); |
83 assert(region != NULL, "No region for " PTR_FORMAT, p2i(entry)); |
84 if (entry >= region->next_top_at_mark_start()) { |
84 if (entry >= region->next_top_at_mark_start()) { |
85 return false; |
85 return false; |
86 } |
86 } |
87 |
87 |
88 assert(((oop)entry)->is_oop(true /* ignore mark word */), |
88 assert(((oop)entry)->is_oop(true /* ignore mark word */), |
89 err_msg("Invalid oop in SATB buffer: " PTR_FORMAT, p2i(entry))); |
89 "Invalid oop in SATB buffer: " PTR_FORMAT, p2i(entry)); |
90 |
90 |
91 return true; |
91 return true; |
92 } |
92 } |
93 |
93 |
94 // This method removes entries from a SATB buffer that will not be |
94 // This method removes entries from a SATB buffer that will not be |