src/share/vm/gc/cms/concurrentMarkSweepGeneration.hpp

Print this page




 538   }
 539 
 540   OopTaskQueueSet* _task_queues;
 541 
 542   // Overflow list of grey objects, threaded through mark-word
 543   // Manipulated with CAS in the parallel/multi-threaded case.
 544   oop _overflow_list;
 545   // The following array-pair keeps track of mark words
 546   // displaced for accommodating overflow list above.
 547   // This code will likely be revisited under RFE#4922830.
 548   Stack<oop, mtGC>     _preserved_oop_stack;
 549   Stack<markOop, mtGC> _preserved_mark_stack;
 550 
 551   int*             _hash_seed;
 552 
 553   // In support of multi-threaded concurrent phases
 554   YieldingFlexibleWorkGang* _conc_workers;
 555 
 556   // Performance Counters
 557   CollectorCounters* _gc_counters;
 558   CollectorCounters* _cgc_counters;
 559 
 560   // Initialization Errors
 561   bool _completed_initialization;
 562 
 563   // In support of ExplicitGCInvokesConcurrent
 564   static bool _full_gc_requested;
 565   static GCCause::Cause _full_gc_cause;
 566   unsigned int _collection_count_start;
 567 
 568   // Should we unload classes this concurrent cycle?
 569   bool _should_unload_classes;
 570   unsigned int  _concurrent_cycles_since_last_unload;
 571   unsigned int concurrent_cycles_since_last_unload() const {
 572     return _concurrent_cycles_since_last_unload;
 573   }
 574   // Did we (allow) unload classes in the previous concurrent cycle?
 575   bool unloaded_classes_last_cycle() const {
 576     return concurrent_cycles_since_last_unload() == 0;
 577   }
 578   // Root scanning options for perm gen


 914 
 915   CMSBitMap* markBitMap()  { return &_markBitMap; }
 916   void directAllocated(HeapWord* start, size_t size);
 917 
 918   // Main CMS steps and related support
 919   void checkpointRootsInitial();
 920   bool markFromRoots();  // a return value of false indicates failure
 921                          // due to stack overflow
 922   void preclean();
 923   void checkpointRootsFinal();
 924   void sweep();
 925 
 926   // Check that the currently executing thread is the expected
 927   // one (foreground collector or background collector).
 928   static void check_correct_thread_executing() PRODUCT_RETURN;
 929 
 930   NOT_PRODUCT(bool is_cms_reachable(HeapWord* addr);)
 931 
 932   // Performance Counter Support
 933   CollectorCounters* counters()     { return _gc_counters; }
 934   CollectorCounters* cgc_counters() { return _cgc_counters; }
 935 
 936   // Timer stuff
 937   void    startTimer() { assert(!_timer.is_active(), "Error"); _timer.start();   }
 938   void    stopTimer()  { assert( _timer.is_active(), "Error"); _timer.stop();    }
 939   void    resetTimer() { assert(!_timer.is_active(), "Error"); _timer.reset();   }
 940   jlong   timerTicks() { assert(!_timer.is_active(), "Error"); return _timer.ticks(); }
 941 
 942   int  yields()          { return _numYields; }
 943   void resetYields()     { _numYields = 0;    }
 944   void incrementYields() { _numYields++;      }
 945   void resetNumDirtyCards()               { _numDirtyCards = 0; }
 946   void incrementNumDirtyCards(size_t num) { _numDirtyCards += num; }
 947   size_t  numDirtyCards()                 { return _numDirtyCards; }
 948 
 949   static bool foregroundGCShouldWait() { return _foregroundGCShouldWait; }
 950   static void set_foregroundGCShouldWait(bool v) { _foregroundGCShouldWait = v; }
 951   static bool foregroundGCIsActive() { return _foregroundGCIsActive; }
 952   static void set_foregroundGCIsActive(bool v) { _foregroundGCIsActive = v; }
 953   size_t sweep_count() const             { return _sweep_count; }
 954   void   increment_sweep_count()         { _sweep_count++; }




 538   }
 539 
 540   OopTaskQueueSet* _task_queues;
 541 
 542   // Overflow list of grey objects, threaded through mark-word
 543   // Manipulated with CAS in the parallel/multi-threaded case.
 544   oop _overflow_list;
 545   // The following array-pair keeps track of mark words
 546   // displaced for accommodating overflow list above.
 547   // This code will likely be revisited under RFE#4922830.
 548   Stack<oop, mtGC>     _preserved_oop_stack;
 549   Stack<markOop, mtGC> _preserved_mark_stack;
 550 
 551   int*             _hash_seed;
 552 
 553   // In support of multi-threaded concurrent phases
 554   YieldingFlexibleWorkGang* _conc_workers;
 555 
 556   // Performance Counters
 557   CollectorCounters* _gc_counters;

 558 
 559   // Initialization Errors
 560   bool _completed_initialization;
 561 
 562   // In support of ExplicitGCInvokesConcurrent
 563   static bool _full_gc_requested;
 564   static GCCause::Cause _full_gc_cause;
 565   unsigned int _collection_count_start;
 566 
 567   // Should we unload classes this concurrent cycle?
 568   bool _should_unload_classes;
 569   unsigned int  _concurrent_cycles_since_last_unload;
 570   unsigned int concurrent_cycles_since_last_unload() const {
 571     return _concurrent_cycles_since_last_unload;
 572   }
 573   // Did we (allow) unload classes in the previous concurrent cycle?
 574   bool unloaded_classes_last_cycle() const {
 575     return concurrent_cycles_since_last_unload() == 0;
 576   }
 577   // Root scanning options for perm gen


 913 
 914   CMSBitMap* markBitMap()  { return &_markBitMap; }
 915   void directAllocated(HeapWord* start, size_t size);
 916 
 917   // Main CMS steps and related support
 918   void checkpointRootsInitial();
 919   bool markFromRoots();  // a return value of false indicates failure
 920                          // due to stack overflow
 921   void preclean();
 922   void checkpointRootsFinal();
 923   void sweep();
 924 
 925   // Check that the currently executing thread is the expected
 926   // one (foreground collector or background collector).
 927   static void check_correct_thread_executing() PRODUCT_RETURN;
 928 
 929   NOT_PRODUCT(bool is_cms_reachable(HeapWord* addr);)
 930 
 931   // Performance Counter Support
 932   CollectorCounters* counters()    { return _gc_counters; }

 933 
 934   // Timer stuff
 935   void    startTimer() { assert(!_timer.is_active(), "Error"); _timer.start();   }
 936   void    stopTimer()  { assert( _timer.is_active(), "Error"); _timer.stop();    }
 937   void    resetTimer() { assert(!_timer.is_active(), "Error"); _timer.reset();   }
 938   jlong   timerTicks() { assert(!_timer.is_active(), "Error"); return _timer.ticks(); }
 939 
 940   int  yields()          { return _numYields; }
 941   void resetYields()     { _numYields = 0;    }
 942   void incrementYields() { _numYields++;      }
 943   void resetNumDirtyCards()               { _numDirtyCards = 0; }
 944   void incrementNumDirtyCards(size_t num) { _numDirtyCards += num; }
 945   size_t  numDirtyCards()                 { return _numDirtyCards; }
 946 
 947   static bool foregroundGCShouldWait() { return _foregroundGCShouldWait; }
 948   static void set_foregroundGCShouldWait(bool v) { _foregroundGCShouldWait = v; }
 949   static bool foregroundGCIsActive() { return _foregroundGCIsActive; }
 950   static void set_foregroundGCIsActive(bool v) { _foregroundGCIsActive = v; }
 951   size_t sweep_count() const             { return _sweep_count; }
 952   void   increment_sweep_count()         { _sweep_count++; }