< prev index next >

src/share/vm/gc/serial/defNewGeneration.hpp

Print this page




  30 #include "gc/shared/copyFailedInfo.hpp"
  31 #include "gc/shared/generation.hpp"
  32 #include "gc/shared/generationCounters.hpp"
  33 #include "utilities/stack.hpp"
  34 
  35 class ContiguousSpace;
  36 class ScanClosure;
  37 class STWGCTimer;
  38 class CSpaceCounters;
  39 class ScanWeakRefClosure;
  40 
  41 // DefNewGeneration is a young generation containing eden, from- and
  42 // to-space.
  43 
  44 class DefNewGeneration: public Generation {
  45   friend class VMStructs;
  46 
  47 protected:
  48   Generation* _old_gen;
  49   uint        _tenuring_threshold;   // Tenuring threshold for next collection.
  50   ageTable    _age_table;
  51   // Size of object to pretenure in words; command line provides bytes
  52   size_t      _pretenure_size_threshold_words;
  53 
  54   ageTable*   age_table() { return &_age_table; }
  55 
  56   // Initialize state to optimistically assume no promotion failure will
  57   // happen.
  58   void   init_assuming_no_promotion_failure();
  59   // True iff a promotion has failed in the current collection.
  60   bool   _promotion_failed;
  61   bool   promotion_failed() { return _promotion_failed; }
  62   PromotionFailedInfo _promotion_failed_info;
  63 
  64   // Handling promotion failure.  A young generation collection
  65   // can fail if a live object cannot be copied out of its
  66   // location in eden or from-space during the collection.  If
  67   // a collection fails, the young generation is left in a
  68   // consistent state such that it can be collected by a
  69   // full collection.
  70   //   Before the collection
  71   //     Objects are in eden or from-space
  72   //     All roots into the young generation point into eden or from-space.
  73   //
  74   //   After a failed collection




  30 #include "gc/shared/copyFailedInfo.hpp"
  31 #include "gc/shared/generation.hpp"
  32 #include "gc/shared/generationCounters.hpp"
  33 #include "utilities/stack.hpp"
  34 
  35 class ContiguousSpace;
  36 class ScanClosure;
  37 class STWGCTimer;
  38 class CSpaceCounters;
  39 class ScanWeakRefClosure;
  40 
  41 // DefNewGeneration is a young generation containing eden, from- and
  42 // to-space.
  43 
  44 class DefNewGeneration: public Generation {
  45   friend class VMStructs;
  46 
  47 protected:
  48   Generation* _old_gen;
  49   uint        _tenuring_threshold;   // Tenuring threshold for next collection.
  50   AgeTable    _age_table;
  51   // Size of object to pretenure in words; command line provides bytes
  52   size_t      _pretenure_size_threshold_words;
  53 
  54   AgeTable*   age_table() { return &_age_table; }
  55 
  56   // Initialize state to optimistically assume no promotion failure will
  57   // happen.
  58   void   init_assuming_no_promotion_failure();
  59   // True iff a promotion has failed in the current collection.
  60   bool   _promotion_failed;
  61   bool   promotion_failed() { return _promotion_failed; }
  62   PromotionFailedInfo _promotion_failed_info;
  63 
  64   // Handling promotion failure.  A young generation collection
  65   // can fail if a live object cannot be copied out of its
  66   // location in eden or from-space during the collection.  If
  67   // a collection fails, the young generation is left in a
  68   // consistent state such that it can be collected by a
  69   // full collection.
  70   //   Before the collection
  71   //     Objects are in eden or from-space
  72   //     All roots into the young generation point into eden or from-space.
  73   //
  74   //   After a failed collection


< prev index next >