src/share/vm/gc_implementation/g1/concurrentMark.hpp

Print this page
rev 6541 : 8055919: Remove dead code in G1 concurrent marking code
Reviewed-by: jmasa, jwilhelm

*** 681,691 **** // Attempts to steal an object from the task queues of other tasks bool try_stealing(uint worker_id, int* hash_seed, oop& obj) { return _task_queues->steal(worker_id, hash_seed, obj); } ! ConcurrentMark(G1CollectedHeap* g1h, G1RegionToSpaceMapper* prev_bitmap_storage, G1RegionToSpaceMapper* next_bitmap_storage); ~ConcurrentMark(); ConcurrentMarkThread* cmThread() { return _cmThread; } CMBitMapRO* prevMarkBitMap() const { return _prevMarkBitMap; } --- 681,693 ---- // Attempts to steal an object from the task queues of other tasks bool try_stealing(uint worker_id, int* hash_seed, oop& obj) { return _task_queues->steal(worker_id, hash_seed, obj); } ! ConcurrentMark(G1CollectedHeap* g1h, ! G1RegionToSpaceMapper* prev_bitmap_storage, ! G1RegionToSpaceMapper* next_bitmap_storage); ~ConcurrentMark(); ConcurrentMarkThread* cmThread() { return _cmThread; } CMBitMapRO* prevMarkBitMap() const { return _prevMarkBitMap; }
*** 710,721 **** // responsible for dealing with this issue (e.g., get the size from // the from-space image when the to-space image might be // inconsistent) and always passing the size. hr is the region that // contains the object and it's passed optionally from callers who // might already have it (no point in recalculating it). ! inline void grayRoot(oop obj, size_t word_size, ! uint worker_id, HeapRegion* hr = NULL); // It iterates over the heap and for each object it comes across it // will dump the contents of its reference fields, as well as // liveness information for the object and its referents. The dump // will be written to a file with the following name: --- 712,725 ---- // responsible for dealing with this issue (e.g., get the size from // the from-space image when the to-space image might be // inconsistent) and always passing the size. hr is the region that // contains the object and it's passed optionally from callers who // might already have it (no point in recalculating it). ! inline void grayRoot(oop obj, ! size_t word_size, ! uint worker_id, ! HeapRegion* hr = NULL); // It iterates over the heap and for each object it comes across it // will dump the contents of its reference fields, as well as // liveness information for the object and its referents. The dump // will be written to a file with the following name:
*** 732,742 **** // O : an object outside the G1 heap (typically: in the perm gen) // NOT : a reference field whose referent is not live // AND MARKED : indicates that an object is both explicitly and // implicitly live (it should be one or the other, not both) void print_reachable(const char* str, ! VerifyOption vo, bool all) PRODUCT_RETURN; // Clear the next marking bitmap (will be called concurrently). void clearNextBitmap(); // Return whether the next mark bitmap has no marks set. To be used for assertions --- 736,747 ---- // O : an object outside the G1 heap (typically: in the perm gen) // NOT : a reference field whose referent is not live // AND MARKED : indicates that an object is both explicitly and // implicitly live (it should be one or the other, not both) void print_reachable(const char* str, ! VerifyOption vo, ! bool all) PRODUCT_RETURN; // Clear the next marking bitmap (will be called concurrently). void clearNextBitmap(); // Return whether the next mark bitmap has no marks set. To be used for assertions
*** 769,784 **** // Mark in the previous bitmap. NB: this is usually read-only, so use // this carefully! inline void markPrev(oop p); ! // Clears marks for all objects in the given range, for the prev, ! // next, or both bitmaps. NB: the previous bitmap is usually // read-only, so use this carefully! void clearRangePrevBitmap(MemRegion mr); void clearRangeNextBitmap(MemRegion mr); - void clearRangeBothBitmaps(MemRegion mr); // Notify data structures that a GC has started. void note_start_of_gc() { _markStack.note_start_of_gc(); } --- 774,788 ---- // Mark in the previous bitmap. NB: this is usually read-only, so use // this carefully! inline void markPrev(oop p); ! // Clears marks for all objects in the given range, for the prev or ! // next bitmaps. NB: the previous bitmap is usually // read-only, so use this carefully! void clearRangePrevBitmap(MemRegion mr); void clearRangeNextBitmap(MemRegion mr); // Notify data structures that a GC has started. void note_start_of_gc() { _markStack.note_start_of_gc(); }
*** 796,820 **** void verify_no_cset_oops(bool verify_stacks, bool verify_enqueued_buffers, bool verify_thread_buffers, bool verify_fingers) PRODUCT_RETURN; - bool isMarked(oop p) const { - assert(p != NULL && p->is_oop(), "expected an oop"); - HeapWord* addr = (HeapWord*)p; - assert(addr >= _nextMarkBitMap->startWord() || - addr < _nextMarkBitMap->endWord(), "in a region"); - - return _nextMarkBitMap->isMarked(addr); - } - - inline bool not_yet_marked(oop p) const; - - // XXX Debug code - bool containing_card_is_marked(void* p); - bool containing_cards_are_marked(void* start, void* last); - bool isPrevMarked(oop p) const { assert(p != NULL && p->is_oop(), "expected an oop"); HeapWord* addr = (HeapWord*)p; assert(addr >= _prevMarkBitMap->startWord() || addr < _prevMarkBitMap->endWord(), "in a region"); --- 800,809 ----
*** 896,963 **** // Counts the size of the given memory region in the the given // marked_bytes array slot for the given HeapRegion. // Sets the bits in the given card bitmap that are associated with the // cards that are spanned by the memory region. ! inline void count_region(MemRegion mr, HeapRegion* hr, size_t* marked_bytes_array, BitMap* task_card_bm); // Counts the given memory region in the task/worker counting // data structures for the given worker id. inline void count_region(MemRegion mr, HeapRegion* hr, uint worker_id); - // Counts the given memory region in the task/worker counting - // data structures for the given worker id. - inline void count_region(MemRegion mr, uint worker_id); - // Counts the given object in the given task/worker counting // data structures. ! inline void count_object(oop obj, HeapRegion* hr, size_t* marked_bytes_array, BitMap* task_card_bm); - // Counts the given object in the task/worker counting data - // structures for the given worker id. - inline void count_object(oop obj, HeapRegion* hr, uint worker_id); - // Attempts to mark the given object and, if successful, counts // the object in the given task/worker counting structures. ! inline bool par_mark_and_count(oop obj, HeapRegion* hr, size_t* marked_bytes_array, BitMap* task_card_bm); // Attempts to mark the given object and, if successful, counts // the object in the task/worker counting structures for the // given worker id. ! inline bool par_mark_and_count(oop obj, size_t word_size, ! HeapRegion* hr, uint worker_id); ! ! // Attempts to mark the given object and, if successful, counts ! // the object in the task/worker counting structures for the ! // given worker id. ! inline bool par_mark_and_count(oop obj, HeapRegion* hr, uint worker_id); ! ! // Similar to the above routine but we don't know the heap region that ! // contains the object to be marked/counted, which this routine looks up. ! inline bool par_mark_and_count(oop obj, uint worker_id); ! ! // Similar to the above routine but there are times when we cannot ! // safely calculate the size of obj due to races and we, therefore, ! // pass the size in as a parameter. It is the caller's reponsibility ! // to ensure that the size passed in for obj is valid. ! inline bool par_mark_and_count(oop obj, size_t word_size, uint worker_id); ! ! // Unconditionally mark the given object, and unconditinally count ! // the object in the counting structures for worker id 0. ! // Should *not* be called from parallel code. ! inline bool mark_and_count(oop obj, HeapRegion* hr); ! ! // Similar to the above routine but we don't know the heap region that ! // contains the object to be marked/counted, which this routine looks up. ! // Should *not* be called from parallel code. ! inline bool mark_and_count(oop obj); // Returns true if initialization was successfully completed. bool completed_initialization() const { return _completed_initialization; } --- 885,924 ---- // Counts the size of the given memory region in the the given // marked_bytes array slot for the given HeapRegion. // Sets the bits in the given card bitmap that are associated with the // cards that are spanned by the memory region. ! inline void count_region(MemRegion mr, ! HeapRegion* hr, size_t* marked_bytes_array, BitMap* task_card_bm); // Counts the given memory region in the task/worker counting // data structures for the given worker id. inline void count_region(MemRegion mr, HeapRegion* hr, uint worker_id); // Counts the given object in the given task/worker counting // data structures. ! inline void count_object(oop obj, ! HeapRegion* hr, size_t* marked_bytes_array, BitMap* task_card_bm); // Attempts to mark the given object and, if successful, counts // the object in the given task/worker counting structures. ! inline bool par_mark_and_count(oop obj, ! HeapRegion* hr, size_t* marked_bytes_array, BitMap* task_card_bm); // Attempts to mark the given object and, if successful, counts // the object in the task/worker counting structures for the // given worker id. ! inline bool par_mark_and_count(oop obj, ! size_t word_size, ! HeapRegion* hr, ! uint worker_id); // Returns true if initialization was successfully completed. bool completed_initialization() const { return _completed_initialization; }
*** 1225,1237 **** inline void move_finger_to(HeapWord* new_finger) { assert(new_finger >= _finger && new_finger < _region_limit, "invariant"); _finger = new_finger; } ! CMTask(uint worker_id, ConcurrentMark *cm, ! size_t* marked_bytes, BitMap* card_bm, ! CMTaskQueue* task_queue, CMTaskQueueSet* task_queues); // it prints statistics associated with this task void print_stats(); #if _MARKING_STATS_ --- 1186,1201 ---- inline void move_finger_to(HeapWord* new_finger) { assert(new_finger >= _finger && new_finger < _region_limit, "invariant"); _finger = new_finger; } ! CMTask(uint worker_id, ! ConcurrentMark *cm, ! size_t* marked_bytes, ! BitMap* card_bm, ! CMTaskQueue* task_queue, ! CMTaskQueueSet* task_queues); // it prints statistics associated with this task void print_stats(); #if _MARKING_STATS_