< prev index next >

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

Print this page
rev 51649 : version 1
rev 52017 : All changes for G1 GC moved from 'combined' repo folder
rev 52488 : Merge
rev 52489 : minor changes
rev 52631 : Merge

*** 55,91 **** } // Inline functions for G1CollectedHeap // Return the region with the given index. It assumes the index is valid. ! inline HeapRegion* G1CollectedHeap::region_at(uint index) const { return _hrm.at(index); } // Return the region with the given index, or NULL if unmapped. It assumes the index is valid. ! inline HeapRegion* G1CollectedHeap::region_at_or_null(uint index) const { return _hrm.at_or_null(index); } inline HeapRegion* G1CollectedHeap::next_region_in_humongous(HeapRegion* hr) const { ! return _hrm.next_region_in_humongous(hr); } inline uint G1CollectedHeap::addr_to_region(HeapWord* addr) const { assert(is_in_reserved(addr), "Cannot calculate region index for address " PTR_FORMAT " that is outside of the heap [" PTR_FORMAT ", " PTR_FORMAT ")", p2i(addr), p2i(reserved_region().start()), p2i(reserved_region().end())); return (uint)(pointer_delta(addr, reserved_region().start(), sizeof(uint8_t)) >> HeapRegion::LogOfHRGrainBytes); } inline HeapWord* G1CollectedHeap::bottom_addr_for_region(uint index) const { ! return _hrm.reserved().start() + index * HeapRegion::GrainWords; } template <class T> inline HeapRegion* G1CollectedHeap::heap_region_containing(const T addr) const { assert(addr != NULL, "invariant"); assert(is_in_g1_reserved((const void*) addr), "Address " PTR_FORMAT " is outside of the heap ranging from [" PTR_FORMAT " to " PTR_FORMAT ")", p2i((void*)addr), p2i(g1_reserved().start()), p2i(g1_reserved().end())); ! return _hrm.addr_to_region((HeapWord*) addr); } template <class T> inline HeapRegion* G1CollectedHeap::heap_region_containing_or_null(const T addr) const { assert(addr != NULL, "invariant"); --- 55,91 ---- } // Inline functions for G1CollectedHeap // Return the region with the given index. It assumes the index is valid. ! inline HeapRegion* G1CollectedHeap::region_at(uint index) const { return _hrm->at(index); } // Return the region with the given index, or NULL if unmapped. It assumes the index is valid. ! inline HeapRegion* G1CollectedHeap::region_at_or_null(uint index) const { return _hrm->at_or_null(index); } inline HeapRegion* G1CollectedHeap::next_region_in_humongous(HeapRegion* hr) const { ! return _hrm->next_region_in_humongous(hr); } inline uint G1CollectedHeap::addr_to_region(HeapWord* addr) const { assert(is_in_reserved(addr), "Cannot calculate region index for address " PTR_FORMAT " that is outside of the heap [" PTR_FORMAT ", " PTR_FORMAT ")", p2i(addr), p2i(reserved_region().start()), p2i(reserved_region().end())); return (uint)(pointer_delta(addr, reserved_region().start(), sizeof(uint8_t)) >> HeapRegion::LogOfHRGrainBytes); } inline HeapWord* G1CollectedHeap::bottom_addr_for_region(uint index) const { ! return _hrm->reserved().start() + index * HeapRegion::GrainWords; } template <class T> inline HeapRegion* G1CollectedHeap::heap_region_containing(const T addr) const { assert(addr != NULL, "invariant"); assert(is_in_g1_reserved((const void*) addr), "Address " PTR_FORMAT " is outside of the heap ranging from [" PTR_FORMAT " to " PTR_FORMAT ")", p2i((void*)addr), p2i(g1_reserved().start()), p2i(g1_reserved().end())); ! return _hrm->addr_to_region((HeapWord*) addr); } template <class T> inline HeapRegion* G1CollectedHeap::heap_region_containing_or_null(const T addr) const { assert(addr != NULL, "invariant");
*** 264,279 **** inline bool G1CollectedHeap::is_obj_dead_full(const oop obj) const { return is_obj_dead_full(obj, heap_region_containing(obj)); } inline void G1CollectedHeap::set_humongous_reclaim_candidate(uint region, bool value) { ! assert(_hrm.at(region)->is_starts_humongous(), "Must start a humongous object"); _humongous_reclaim_candidates.set_candidate(region, value); } inline bool G1CollectedHeap::is_humongous_reclaim_candidate(uint region) { ! assert(_hrm.at(region)->is_starts_humongous(), "Must start a humongous object"); return _humongous_reclaim_candidates.is_candidate(region); } inline void G1CollectedHeap::set_humongous_is_live(oop obj) { uint region = addr_to_region((HeapWord*)obj); --- 264,279 ---- inline bool G1CollectedHeap::is_obj_dead_full(const oop obj) const { return is_obj_dead_full(obj, heap_region_containing(obj)); } inline void G1CollectedHeap::set_humongous_reclaim_candidate(uint region, bool value) { ! assert(_hrm->at(region)->is_starts_humongous(), "Must start a humongous object"); _humongous_reclaim_candidates.set_candidate(region, value); } inline bool G1CollectedHeap::is_humongous_reclaim_candidate(uint region) { ! assert(_hrm->at(region)->is_starts_humongous(), "Must start a humongous object"); return _humongous_reclaim_candidates.is_candidate(region); } inline void G1CollectedHeap::set_humongous_is_live(oop obj) { uint region = addr_to_region((HeapWord*)obj);
< prev index next >