< prev index next >

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

Print this page




  38 
  39 class TenuredGeneration: public CardGeneration {
  40   friend class VMStructs;
  41   // Abstractly, this is a subtype that gets access to protected fields.
  42   friend class VM_PopulateDumpSharedSpace;
  43 
  44  protected:
  45   ContiguousSpace*  _the_space;       // Actual space holding objects
  46 
  47   GenerationCounters*   _gen_counters;
  48   CSpaceCounters*       _space_counters;
  49 
  50   // Allocation failure
  51   virtual bool expand(size_t bytes, size_t expand_bytes);
  52 
  53   // Accessing spaces
  54   ContiguousSpace* space() const { return _the_space; }
  55 
  56   void assert_correct_size_change_locking();
  57  public:
  58   TenuredGeneration(ReservedSpace rs, size_t initial_byte_size,
  59                                int level, GenRemSet* remset);

  60 
  61   Generation::Name kind() { return Generation::MarkSweepCompact; }
  62 
  63   // Printing
  64   const char* name() const { return "tenured generation"; }
  65   const char* short_name() const { return "Tenured"; }
  66 
  67   // Does a "full" (forced) collection invoked on this generation collect
  68   // all younger generations as well? Note that this is a
  69   // hack to allow the collection of the younger gen first if the flag is
  70   // set.
  71   virtual bool full_collects_younger_generations() const {
  72     return !ScavengeBeforeFullGC;
  73   }
  74 
  75   size_t unsafe_max_alloc_nogc() const;
  76   size_t contiguous_available() const;
  77 
  78   // Iteration
  79   void object_iterate(ObjectClosure* blk);


 103                                 bool parallel = false);
 104 
 105   virtual void prepare_for_verify();
 106 
 107 
 108   virtual void gc_prologue(bool full);
 109   virtual void gc_epilogue(bool full);
 110   bool should_collect(bool   full,
 111                       size_t word_size,
 112                       bool   is_tlab);
 113 
 114   virtual void compute_new_size();
 115 
 116   // Performance Counter support
 117   void update_counters();
 118 
 119   virtual void record_spaces_top();
 120 
 121   // Statistics
 122 
 123   virtual void update_gc_stats(int level, bool full);
 124 
 125   virtual bool promotion_attempt_is_safe(size_t max_promoted_in_bytes) const;
 126 
 127   virtual void verify();
 128   virtual void print_on(outputStream* st) const;
 129 };
 130 
 131 #endif // SHARE_VM_GC_SERIAL_TENUREDGENERATION_HPP


  38 
  39 class TenuredGeneration: public CardGeneration {
  40   friend class VMStructs;
  41   // Abstractly, this is a subtype that gets access to protected fields.
  42   friend class VM_PopulateDumpSharedSpace;
  43 
  44  protected:
  45   ContiguousSpace*  _the_space;       // Actual space holding objects
  46 
  47   GenerationCounters*   _gen_counters;
  48   CSpaceCounters*       _space_counters;
  49 
  50   // Allocation failure
  51   virtual bool expand(size_t bytes, size_t expand_bytes);
  52 
  53   // Accessing spaces
  54   ContiguousSpace* space() const { return _the_space; }
  55 
  56   void assert_correct_size_change_locking();
  57  public:
  58   TenuredGeneration(ReservedSpace rs,
  59                     size_t initial_byte_size,
  60                     GenRemSet* remset);
  61 
  62   Generation::Name kind() { return Generation::MarkSweepCompact; }
  63 
  64   // Printing
  65   const char* name() const { return "tenured generation"; }
  66   const char* short_name() const { return "Tenured"; }
  67 
  68   // Does a "full" (forced) collection invoked on this generation collect
  69   // all younger generations as well? Note that this is a
  70   // hack to allow the collection of the younger gen first if the flag is
  71   // set.
  72   virtual bool full_collects_younger_generations() const {
  73     return !ScavengeBeforeFullGC;
  74   }
  75 
  76   size_t unsafe_max_alloc_nogc() const;
  77   size_t contiguous_available() const;
  78 
  79   // Iteration
  80   void object_iterate(ObjectClosure* blk);


 104                                 bool parallel = false);
 105 
 106   virtual void prepare_for_verify();
 107 
 108 
 109   virtual void gc_prologue(bool full);
 110   virtual void gc_epilogue(bool full);
 111   bool should_collect(bool   full,
 112                       size_t word_size,
 113                       bool   is_tlab);
 114 
 115   virtual void compute_new_size();
 116 
 117   // Performance Counter support
 118   void update_counters();
 119 
 120   virtual void record_spaces_top();
 121 
 122   // Statistics
 123 
 124   virtual void update_gc_stats(Generation* current_generation, bool full);
 125 
 126   virtual bool promotion_attempt_is_safe(size_t max_promoted_in_bytes) const;
 127 
 128   virtual void verify();
 129   virtual void print_on(outputStream* st) const;
 130 };
 131 
 132 #endif // SHARE_VM_GC_SERIAL_TENUREDGENERATION_HPP
< prev index next >