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

Print this page
rev 4773 : 8005849: JEP 167: Event-Based JVM Tracing
Reviewed-by: acorn, coleenp, sla
Contributed-by: Karen Kinnear <karen.kinnear@oracle.com>, Bengt Rutisson <bengt.rutisson@oracle.com>, Calvin Cheung <calvin.cheung@oracle.com>, Erik Gahlin <erik.gahlin@oracle.com>, Erik Helin <erik.helin@oracle.com>, Jesper Wilhelmsson <jesper.wilhelmsson@oracle.com>, Keith McGuigan <keith.mcguigan@oracle.com>, Mattias Tobiasson <mattias.tobiasson@oracle.com>, Markus Gronlund <markus.gronlund@oracle.com>, Mikael Auno <mikael.auno@oracle.com>, Nils Eliasson <nils.eliasson@oracle.com>, Nils Loodin <nils.loodin@oracle.com>, Rickard Backman <rickard.backman@oracle.com>, Staffan Larsen <staffan.larsen@oracle.com>, Stefan Karlsson <stefan.karlsson@oracle.com>, Yekaterina Kantserova <yekaterina.kantserova@oracle.com>


 552     return _tasks[id];
 553   }
 554 
 555   // Returns the task queue with the given id
 556   CMTaskQueue* task_queue(int id) {
 557     assert(0 <= id && id < (int) _active_tasks,
 558            "task queue id not within active bounds");
 559     return (CMTaskQueue*) _task_queues->queue(id);
 560   }
 561 
 562   // Returns the task queue set
 563   CMTaskQueueSet* task_queues()  { return _task_queues; }
 564 
 565   // Access / manipulation of the overflow flag which is set to
 566   // indicate that the global stack has overflown
 567   bool has_overflown()           { return _has_overflown; }
 568   void set_has_overflown()       { _has_overflown = true; }
 569   void clear_has_overflown()     { _has_overflown = false; }
 570   bool restart_for_overflow()    { return _restart_for_overflow; }
 571 
 572   bool has_aborted()             { return _has_aborted; }
 573 
 574   // Methods to enter the two overflow sync barriers
 575   void enter_first_sync_barrier(uint worker_id);
 576   void enter_second_sync_barrier(uint worker_id);
 577 
 578   ForceOverflowSettings* force_overflow_conc() {
 579     return &_force_overflow_conc;
 580   }
 581 
 582   ForceOverflowSettings* force_overflow_stw() {
 583     return &_force_overflow_stw;
 584   }
 585 
 586   ForceOverflowSettings* force_overflow() {
 587     if (concurrent()) {
 588       return force_overflow_conc();
 589     } else {
 590       return force_overflow_stw();
 591     }
 592   }
 593 


 804 
 805   // XXX Debug code
 806   bool containing_card_is_marked(void* p);
 807   bool containing_cards_are_marked(void* start, void* last);
 808 
 809   bool isPrevMarked(oop p) const {
 810     assert(p != NULL && p->is_oop(), "expected an oop");
 811     HeapWord* addr = (HeapWord*)p;
 812     assert(addr >= _prevMarkBitMap->startWord() ||
 813            addr < _prevMarkBitMap->endWord(), "in a region");
 814 
 815     return _prevMarkBitMap->isMarked(addr);
 816   }
 817 
 818   inline bool do_yield_check(uint worker_i = 0);
 819   inline bool should_yield();
 820 
 821   // Called to abort the marking cycle after a Full GC takes palce.
 822   void abort();
 823 


 824   // This prints the global/local fingers. It is used for debugging.
 825   NOT_PRODUCT(void print_finger();)
 826 
 827   void print_summary_info();
 828 
 829   void print_worker_threads_on(outputStream* st) const;
 830 
 831   void print_on_error(outputStream* st) const;
 832 
 833   // The following indicate whether a given verbose level has been
 834   // set. Notice that anything above stats is conditional to
 835   // _MARKING_VERBOSE_ having been set to 1
 836   bool verbose_stats() {
 837     return _verbose_level >= stats_verbose;
 838   }
 839   bool verbose_low() {
 840     return _MARKING_VERBOSE_ && _verbose_level >= low_verbose;
 841   }
 842   bool verbose_medium() {
 843     return _MARKING_VERBOSE_ && _verbose_level >= medium_verbose;




 552     return _tasks[id];
 553   }
 554 
 555   // Returns the task queue with the given id
 556   CMTaskQueue* task_queue(int id) {
 557     assert(0 <= id && id < (int) _active_tasks,
 558            "task queue id not within active bounds");
 559     return (CMTaskQueue*) _task_queues->queue(id);
 560   }
 561 
 562   // Returns the task queue set
 563   CMTaskQueueSet* task_queues()  { return _task_queues; }
 564 
 565   // Access / manipulation of the overflow flag which is set to
 566   // indicate that the global stack has overflown
 567   bool has_overflown()           { return _has_overflown; }
 568   void set_has_overflown()       { _has_overflown = true; }
 569   void clear_has_overflown()     { _has_overflown = false; }
 570   bool restart_for_overflow()    { return _restart_for_overflow; }
 571 


 572   // Methods to enter the two overflow sync barriers
 573   void enter_first_sync_barrier(uint worker_id);
 574   void enter_second_sync_barrier(uint worker_id);
 575 
 576   ForceOverflowSettings* force_overflow_conc() {
 577     return &_force_overflow_conc;
 578   }
 579 
 580   ForceOverflowSettings* force_overflow_stw() {
 581     return &_force_overflow_stw;
 582   }
 583 
 584   ForceOverflowSettings* force_overflow() {
 585     if (concurrent()) {
 586       return force_overflow_conc();
 587     } else {
 588       return force_overflow_stw();
 589     }
 590   }
 591 


 802 
 803   // XXX Debug code
 804   bool containing_card_is_marked(void* p);
 805   bool containing_cards_are_marked(void* start, void* last);
 806 
 807   bool isPrevMarked(oop p) const {
 808     assert(p != NULL && p->is_oop(), "expected an oop");
 809     HeapWord* addr = (HeapWord*)p;
 810     assert(addr >= _prevMarkBitMap->startWord() ||
 811            addr < _prevMarkBitMap->endWord(), "in a region");
 812 
 813     return _prevMarkBitMap->isMarked(addr);
 814   }
 815 
 816   inline bool do_yield_check(uint worker_i = 0);
 817   inline bool should_yield();
 818 
 819   // Called to abort the marking cycle after a Full GC takes palce.
 820   void abort();
 821 
 822   bool has_aborted()      { return _has_aborted; }
 823 
 824   // This prints the global/local fingers. It is used for debugging.
 825   NOT_PRODUCT(void print_finger();)
 826 
 827   void print_summary_info();
 828 
 829   void print_worker_threads_on(outputStream* st) const;
 830 
 831   void print_on_error(outputStream* st) const;
 832 
 833   // The following indicate whether a given verbose level has been
 834   // set. Notice that anything above stats is conditional to
 835   // _MARKING_VERBOSE_ having been set to 1
 836   bool verbose_stats() {
 837     return _verbose_level >= stats_verbose;
 838   }
 839   bool verbose_low() {
 840     return _MARKING_VERBOSE_ && _verbose_level >= low_verbose;
 841   }
 842   bool verbose_medium() {
 843     return _MARKING_VERBOSE_ && _verbose_level >= medium_verbose;