< prev index next >
src/share/vm/gc/g1/heapRegion.hpp
Print this page
rev 13047 : imported patch 8071280-specialize-heapregion-oops-on-card-seq-iterate
rev 13048 : imported patch 8071280-kim-review
rev 13049 : imported patch 8071280-kim-sangheon-review
rev 13050 : imported patch 8071280-erikh-review
@@ -249,13 +249,14 @@
void report_region_type_change(G1HeapRegionTraceType::Type to);
// Returns whether the given object address refers to a dead object, and either the
// size of the object (if live) or the size of the block (if dead) in size.
- // Performs some optimizations if is_gc_active is set.
- template <bool is_gc_active>
- inline bool is_obj_dead_with_size(const oop obj, G1CMBitMapRO* bitmap, size_t* size) const;
+ // May
+ // - only called with obj < top()
+ // - not called on humongous objects or archive regions
+ inline bool is_obj_dead_with_size(const oop obj, G1CMBitMapRO* prev_bitmap, size_t* size) const;
protected:
// The index of this region in the heap region sequence.
uint _hrm_index;
@@ -327,11 +328,11 @@
Closure* cl,
G1CollectedHeap* g1h);
// Returns the block size of the given (dead, potentially having its class unloaded) object
// starting at p extending to at most the prev TAMS using the given mark bitmap.
- inline size_t block_size_using_bitmap(const HeapWord* p, const G1CMBitMapRO* bitmap) const;
+ inline size_t block_size_using_bitmap(const HeapWord* p, const G1CMBitMapRO* prev_bitmap) const;
public:
HeapRegion(uint hrm_index,
G1BlockOffsetTable* bot,
MemRegion mr);
@@ -374,16 +375,12 @@
static void setup_heap_region_size(size_t initial_heap_size, size_t max_heap_size);
// All allocated blocks are occupied by objects in a HeapRegion
bool block_is_obj(const HeapWord* p) const;
- // Returns the object size for valid block starts for potentially unloaded dead
- // objects. Must only be called during scanning cards during GC. Expects the
- // following preconditions:
- // - only called on p < top()
- // - not called on humongous objects or archive regions
- size_t block_size_during_gc(const HeapWord* p, const G1CMBitMapRO* bitmap) const;
+ // Returns whether the given object is dead based on TAMS and bitmap.
+ bool is_obj_dead(const oop obj, const G1CMBitMapRO* prev_bitmap) const;
// Returns the object size for all valid block starts
// and the amount of unallocated words if called on top()
size_t block_size(const HeapWord* p) const;
@@ -676,12 +673,12 @@
}
}
// Iterate over the objects overlapping part of a card, applying cl
// to all references in the region. This is a helper for
- // G1RemSet::refine_card, and is tightly coupled with it.
- // mr: the memory region covered by the card, trimmed to the
+ // G1RemSet::refine_card*, and is tightly coupled with them.
+ // mr is the memory region covered by the card, trimmed to the
// allocated space for this region. Must not be empty.
// This region must be old or humongous.
// Returns true if the designated objects were successfully
// processed, false if an unparsable part of the heap was
// encountered; that only happens when invoked concurrently with the
< prev index next >