< prev index next >
hotspot/src/share/vm/gc_implementation/g1/concurrentMark.hpp
Print this page
rev 7368 : 8075215: SATB buffer processing found reclaimed humongous object
Summary: Don't assume SATB buffer entries are valid objects
Reviewed-by: brutisso, ecaspole
*** 791,808 ****
void note_end_of_gc() {
_markStack.note_end_of_gc();
}
// Verify that there are no CSet oops on the stacks (taskqueues /
! // global mark stack), enqueued SATB buffers, per-thread SATB
! // buffers, and fingers (global / per-task). The boolean parameters
! // decide which of the above data structures to verify. If marking
! // is not in progress, it's a no-op.
! void verify_no_cset_oops(bool verify_stacks,
! bool verify_enqueued_buffers,
! bool verify_thread_buffers,
! bool verify_fingers) PRODUCT_RETURN;
bool isPrevMarked(oop p) const {
assert(p != NULL && p->is_oop(), "expected an oop");
HeapWord* addr = (HeapWord*)p;
assert(addr >= _prevMarkBitMap->startWord() ||
--- 791,803 ----
void note_end_of_gc() {
_markStack.note_end_of_gc();
}
// Verify that there are no CSet oops on the stacks (taskqueues /
! // global mark stack) and fingers (global / per-task).
! // If marking is not in progress, it's a no-op.
! void verify_no_cset_oops() PRODUCT_RETURN;
bool isPrevMarked(oop p) const {
assert(p != NULL && p->is_oop(), "expected an oop");
HeapWord* addr = (HeapWord*)p;
assert(addr >= _prevMarkBitMap->startWord() ||
*** 1106,1115 ****
--- 1101,1116 ----
// it checks a bunch of conditions that might cause the marking step
// to abort
void regular_clock_call();
bool concurrent() { return _concurrent; }
+ // Test whether obj might have already been passed over by the
+ // mark bitmap scan, and so needs to be pushed onto the mark stack.
+ bool is_below_finger(oop obj, HeapWord* global_finger) const;
+
+ template<bool scan> void process_grey_object(oop obj);
+
public:
// It resets the task; it should be called right at the beginning of
// a marking phase.
void reset(CMBitMap* _nextMarkBitMap);
// it clears all the fields that correspond to a claimed region.
*** 1153,1168 ****
bool has_timed_out() { return _has_timed_out; }
bool claimed() { return _claimed; }
void set_cm_oop_closure(G1CMOopClosure* cm_oop_closure);
! // It grays the object by marking it and, if necessary, pushing it
! // on the local queue
inline void deal_with_reference(oop obj);
// It scans an object and visits its children.
! void scan_object(oop obj);
// It pushes an object on the local queue.
inline void push(oop obj);
// These two move entries to/from the global stack.
--- 1154,1179 ----
bool has_timed_out() { return _has_timed_out; }
bool claimed() { return _claimed; }
void set_cm_oop_closure(G1CMOopClosure* cm_oop_closure);
! // Increment the number of references this task has visited.
! void increment_refs_reached() { ++_refs_reached; }
!
! // Grey the object by marking it. If not already marked, push it on
! // the local queue if below the finger.
! // Precondition: obj is in region.
! // Precondition: obj is below region's NTAMS.
! inline void make_reference_grey(oop obj, HeapRegion* region);
!
! // Grey the object (by calling make_grey_reference) if required,
! // e.g. obj is below its containing region's NTAMS.
! // Precondition: obj is a valid heap object.
inline void deal_with_reference(oop obj);
// It scans an object and visits its children.
! void scan_object(oop obj) { process_grey_object<true>(obj); }
// It pushes an object on the local queue.
inline void push(oop obj);
// These two move entries to/from the global stack.
< prev index next >