1.1 --- a/src/share/vm/gc_implementation/g1/heapRegionSeq.inline.hpp Tue Apr 01 07:46:51 2014 +0200 1.2 +++ b/src/share/vm/gc_implementation/g1/heapRegionSeq.inline.hpp Tue Aug 19 12:39:06 2014 +0200 1.3 @@ -28,21 +28,17 @@ 1.4 #include "gc_implementation/g1/heapRegion.hpp" 1.5 #include "gc_implementation/g1/heapRegionSeq.hpp" 1.6 1.7 -inline HeapRegion* HeapRegionSeq::addr_to_region_unsafe(HeapWord* addr) const { 1.8 +inline HeapRegion* HeapRegionSeq::addr_to_region(HeapWord* addr) const { 1.9 + assert(addr < heap_end(), 1.10 + err_msg("addr: "PTR_FORMAT" end: "PTR_FORMAT, p2i(addr), p2i(heap_end()))); 1.11 + assert(addr >= heap_bottom(), 1.12 + err_msg("addr: "PTR_FORMAT" bottom: "PTR_FORMAT, p2i(addr), p2i(heap_bottom()))); 1.13 + 1.14 HeapRegion* hr = _regions.get_by_address(addr); 1.15 assert(hr != NULL, "invariant"); 1.16 return hr; 1.17 } 1.18 1.19 -inline HeapRegion* HeapRegionSeq::addr_to_region(HeapWord* addr) const { 1.20 - if (addr != NULL && addr < heap_end()) { 1.21 - assert(addr >= heap_bottom(), 1.22 - err_msg("addr: " PTR_FORMAT " bottom: " PTR_FORMAT, p2i(addr), p2i(heap_bottom()))); 1.23 - return addr_to_region_unsafe(addr); 1.24 - } 1.25 - return NULL; 1.26 -} 1.27 - 1.28 inline HeapRegion* HeapRegionSeq::at(uint index) const { 1.29 assert(index < length(), "pre-condition"); 1.30 HeapRegion* hr = _regions.get_by_index(index);