< prev index next >

src/hotspot/share/gc/z/zHeap.inline.hpp

Print this page
rev 55577 : JDK-8227226: segmented clearing of arrays for ZGC

Periodic checks based on chunk size during clearing of arrays for safepoint.  Make the allocation safe (pinned) and clear (good) during the iterations.


 117          ZGlobalPhase == ZPhaseMarkCompleted, "Forward not allowed");
 118 
 119   ZForwarding* const forwarding = _forwarding_table.get(addr);
 120   if (forwarding == NULL) {
 121     // Not forwarding
 122     return ZAddress::good(addr);
 123   }
 124 
 125   // Forward object
 126   return _relocate.forward_object(forwarding, addr);
 127 }
 128 
 129 inline bool ZHeap::is_alloc_stalled() const {
 130   return _page_allocator.is_alloc_stalled();
 131 }
 132 
 133 inline void ZHeap::check_out_of_memory() {
 134   _page_allocator.check_out_of_memory();
 135 }
 136 










 137 inline bool ZHeap::is_oop(oop object) const {
 138   // Verify that we have a good address. Note that ZAddress::is_good()
 139   // would not be a strong enough verification, since it only verifies
 140   // that the metadata bits are good.
 141   const uintptr_t addr = ZOop::to_address(object);
 142   return ZAddress::good(addr) == addr;
 143 }
 144 
 145 #endif // SHARE_GC_Z_ZHEAP_INLINE_HPP


 117          ZGlobalPhase == ZPhaseMarkCompleted, "Forward not allowed");
 118 
 119   ZForwarding* const forwarding = _forwarding_table.get(addr);
 120   if (forwarding == NULL) {
 121     // Not forwarding
 122     return ZAddress::good(addr);
 123   }
 124 
 125   // Forward object
 126   return _relocate.forward_object(forwarding, addr);
 127 }
 128 
 129 inline bool ZHeap::is_alloc_stalled() const {
 130   return _page_allocator.is_alloc_stalled();
 131 }
 132 
 133 inline void ZHeap::check_out_of_memory() {
 134   _page_allocator.check_out_of_memory();
 135 }
 136 
 137 inline void ZHeap::pin_allocating(uintptr_t page_start) {
 138   ZPage* page = _page_table.get(page_start);
 139   page->pin_allocating();
 140 }
 141 
 142 inline void ZHeap::unpin_allocating(uintptr_t page_start) {
 143   ZPage* page = _page_table.get(page_start);
 144   page->unpin_allocating();
 145 }
 146 
 147 inline bool ZHeap::is_oop(oop object) const {
 148   // Verify that we have a good address. Note that ZAddress::is_good()
 149   // would not be a strong enough verification, since it only verifies
 150   // that the metadata bits are good.
 151   const uintptr_t addr = ZOop::to_address(object);
 152   return ZAddress::good(addr) == addr;
 153 }
 154 
 155 #endif // SHARE_GC_Z_ZHEAP_INLINE_HPP
< prev index next >