Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp @ 526:818efdefcc99
6484956: G1: improve evacuation pause efficiency
Summary: A bunch of performance optimizations to decrease GC pause times in G1.
Reviewed-by: apetrusenko, jmasa, iveresov
author | tonyp |
---|---|
date | Fri, 16 Jan 2009 13:02:20 -0500 |
parents | 37f87013dfd8 |
children | 0fbdb4381b99 |
comparison
equal
deleted
inserted
replaced
519:65de26b5ea82 | 526:818efdefcc99 |
---|---|
34 return hr; | 34 return hr; |
35 } | 35 } |
36 | 36 |
37 inline HeapRegion* | 37 inline HeapRegion* |
38 G1CollectedHeap::heap_region_containing_raw(const void* addr) const { | 38 G1CollectedHeap::heap_region_containing_raw(const void* addr) const { |
39 HeapRegion* res = _hrs->addr_to_region(addr); | 39 assert(_g1_reserved.contains(addr), "invariant"); |
40 assert(res != NULL, "addr outside of heap?"); | 40 size_t index = ((intptr_t) addr - (intptr_t) _g1_reserved.start()) |
41 >> HeapRegion::LogOfHRGrainBytes; | |
42 HeapRegion* res = _hrs->at(index); | |
43 assert(res == _hrs->addr_to_region(addr), "sanity"); | |
41 return res; | 44 return res; |
42 } | 45 } |
43 | 46 |
44 inline bool G1CollectedHeap::obj_in_cs(oop obj) { | 47 inline bool G1CollectedHeap::obj_in_cs(oop obj) { |
45 HeapRegion* r = _hrs->addr_to_region(obj); | 48 HeapRegion* r = _hrs->addr_to_region(obj); |