< prev index next >

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

Print this page




 408 
 409   // Two sync barriers that are used to synchronize tasks when an
 410   // overflow occurs. The algorithm is the following. All tasks enter
 411   // the first one to ensure that they have all stopped manipulating
 412   // the global data structures. After they exit it, they re-initialize
 413   // their data structures and task 0 re-initializes the global data
 414   // structures. Then, they enter the second sync barrier. This
 415   // ensure, that no task starts doing work before all data
 416   // structures (local and global) have been re-initialized. When they
 417   // exit it, they are free to start working again.
 418   WorkGangBarrierSync     _first_overflow_barrier_sync;
 419   WorkGangBarrierSync     _second_overflow_barrier_sync;
 420 
 421   // This is set by any task, when an overflow on the global data
 422   // structures is detected
 423   volatile bool           _has_overflown;
 424   // True: marking is concurrent, false: we're in remark
 425   volatile bool           _concurrent;
 426   // Set at the end of a Full GC so that marking aborts
 427   volatile bool           _has_aborted;
 428   GCId                    _aborted_gc_id;
 429 
 430   // Used when remark aborts due to an overflow to indicate that
 431   // another concurrent marking phase should start
 432   volatile bool           _restart_for_overflow;
 433 
 434   // This is true from the very start of concurrent marking until the
 435   // point when all the tasks complete their work. It is really used
 436   // to determine the points between the end of concurrent marking and
 437   // time of remark.
 438   volatile bool           _concurrent_marking_in_progress;
 439 
 440   // Verbose level
 441   CMVerboseLevel          _verbose_level;
 442 
 443   // All of these times are in ms
 444   NumberSeq _init_times;
 445   NumberSeq _remark_times;
 446   NumberSeq _remark_mark_times;
 447   NumberSeq _remark_weak_ref_times;
 448   NumberSeq _cleanup_times;


 750   // Verify that there are no CSet oops on the stacks (taskqueues /
 751   // global mark stack) and fingers (global / per-task).
 752   // If marking is not in progress, it's a no-op.
 753   void verify_no_cset_oops() PRODUCT_RETURN;
 754 
 755   bool isPrevMarked(oop p) const {
 756     assert(p != NULL && p->is_oop(), "expected an oop");
 757     HeapWord* addr = (HeapWord*)p;
 758     assert(addr >= _prevMarkBitMap->startWord() ||
 759            addr < _prevMarkBitMap->endWord(), "in a region");
 760 
 761     return _prevMarkBitMap->isMarked(addr);
 762   }
 763 
 764   inline bool do_yield_check(uint worker_i = 0);
 765 
 766   // Called to abort the marking cycle after a Full GC takes place.
 767   void abort();
 768 
 769   bool has_aborted()      { return _has_aborted; }
 770 
 771   const GCId& concurrent_gc_id();
 772 
 773   // This prints the global/local fingers. It is used for debugging.
 774   NOT_PRODUCT(void print_finger();)
 775 
 776   void print_summary_info();
 777 
 778   void print_worker_threads_on(outputStream* st) const;
 779 
 780   void print_on_error(outputStream* st) const;
 781 
 782   // The following indicate whether a given verbose level has been
 783   // set. Notice that anything above stats is conditional to
 784   // _MARKING_VERBOSE_ having been set to 1
 785   bool verbose_stats() {
 786     return _verbose_level >= stats_verbose;
 787   }
 788   bool verbose_low() {
 789     return _MARKING_VERBOSE_ && _verbose_level >= low_verbose;
 790   }
 791   bool verbose_medium() {




 408 
 409   // Two sync barriers that are used to synchronize tasks when an
 410   // overflow occurs. The algorithm is the following. All tasks enter
 411   // the first one to ensure that they have all stopped manipulating
 412   // the global data structures. After they exit it, they re-initialize
 413   // their data structures and task 0 re-initializes the global data
 414   // structures. Then, they enter the second sync barrier. This
 415   // ensure, that no task starts doing work before all data
 416   // structures (local and global) have been re-initialized. When they
 417   // exit it, they are free to start working again.
 418   WorkGangBarrierSync     _first_overflow_barrier_sync;
 419   WorkGangBarrierSync     _second_overflow_barrier_sync;
 420 
 421   // This is set by any task, when an overflow on the global data
 422   // structures is detected
 423   volatile bool           _has_overflown;
 424   // True: marking is concurrent, false: we're in remark
 425   volatile bool           _concurrent;
 426   // Set at the end of a Full GC so that marking aborts
 427   volatile bool           _has_aborted;

 428 
 429   // Used when remark aborts due to an overflow to indicate that
 430   // another concurrent marking phase should start
 431   volatile bool           _restart_for_overflow;
 432 
 433   // This is true from the very start of concurrent marking until the
 434   // point when all the tasks complete their work. It is really used
 435   // to determine the points between the end of concurrent marking and
 436   // time of remark.
 437   volatile bool           _concurrent_marking_in_progress;
 438 
 439   // Verbose level
 440   CMVerboseLevel          _verbose_level;
 441 
 442   // All of these times are in ms
 443   NumberSeq _init_times;
 444   NumberSeq _remark_times;
 445   NumberSeq _remark_mark_times;
 446   NumberSeq _remark_weak_ref_times;
 447   NumberSeq _cleanup_times;


 749   // Verify that there are no CSet oops on the stacks (taskqueues /
 750   // global mark stack) and fingers (global / per-task).
 751   // If marking is not in progress, it's a no-op.
 752   void verify_no_cset_oops() PRODUCT_RETURN;
 753 
 754   bool isPrevMarked(oop p) const {
 755     assert(p != NULL && p->is_oop(), "expected an oop");
 756     HeapWord* addr = (HeapWord*)p;
 757     assert(addr >= _prevMarkBitMap->startWord() ||
 758            addr < _prevMarkBitMap->endWord(), "in a region");
 759 
 760     return _prevMarkBitMap->isMarked(addr);
 761   }
 762 
 763   inline bool do_yield_check(uint worker_i = 0);
 764 
 765   // Called to abort the marking cycle after a Full GC takes place.
 766   void abort();
 767 
 768   bool has_aborted()      { return _has_aborted; }


 769 
 770   // This prints the global/local fingers. It is used for debugging.
 771   NOT_PRODUCT(void print_finger();)
 772 
 773   void print_summary_info();
 774 
 775   void print_worker_threads_on(outputStream* st) const;
 776 
 777   void print_on_error(outputStream* st) const;
 778 
 779   // The following indicate whether a given verbose level has been
 780   // set. Notice that anything above stats is conditional to
 781   // _MARKING_VERBOSE_ having been set to 1
 782   bool verbose_stats() {
 783     return _verbose_level >= stats_verbose;
 784   }
 785   bool verbose_low() {
 786     return _MARKING_VERBOSE_ && _verbose_level >= low_verbose;
 787   }
 788   bool verbose_medium() {


< prev index next >