hotspot/src/share/vm/gc/shared/generation.hpp
changeset 33580 c2d95df2c54e
parent 33212 906b3d079b13
child 35061 be6025ebffea
equal deleted inserted replaced
33579:01ade4446d96 33580:c2d95df2c54e
   139     assert(_ref_processor == NULL, "clobbering existing _ref_processor");
   139     assert(_ref_processor == NULL, "clobbering existing _ref_processor");
   140     _ref_processor = rp;
   140     _ref_processor = rp;
   141   }
   141   }
   142 
   142 
   143   virtual Generation::Name kind() { return Generation::Other; }
   143   virtual Generation::Name kind() { return Generation::Other; }
   144   GenerationSpec* spec();
       
   145 
   144 
   146   // This properly belongs in the collector, but for now this
   145   // This properly belongs in the collector, but for now this
   147   // will do.
   146   // will do.
   148   virtual bool refs_discovery_is_atomic() const { return true;  }
   147   virtual bool refs_discovery_is_atomic() const { return true;  }
   149   virtual bool refs_discovery_is_mt()     const { return false; }
   148   virtual bool refs_discovery_is_mt()     const { return false; }
   150 
   149 
   151   // Space enquiries (results in bytes)
   150   // Space inquiries (results in bytes)
       
   151   size_t initial_size();
   152   virtual size_t capacity() const = 0;  // The maximum number of object bytes the
   152   virtual size_t capacity() const = 0;  // The maximum number of object bytes the
   153                                         // generation can currently hold.
   153                                         // generation can currently hold.
   154   virtual size_t used() const = 0;      // The number of used bytes in the gen.
   154   virtual size_t used() const = 0;      // The number of used bytes in the gen.
   155   virtual size_t free() const = 0;      // The number of free bytes in the gen.
   155   virtual size_t free() const = 0;      // The number of free bytes in the gen.
   156 
   156 
   306   // Informs the current generation that all oop_since_save_marks_iterates
   306   // Informs the current generation that all oop_since_save_marks_iterates
   307   // performed by "thread_num" in the current collection, if any, have been
   307   // performed by "thread_num" in the current collection, if any, have been
   308   // completed; any supporting data structures can be reset.  Default is to
   308   // completed; any supporting data structures can be reset.  Default is to
   309   // do nothing.
   309   // do nothing.
   310   virtual void par_oop_since_save_marks_iterate_done(int thread_num) {}
   310   virtual void par_oop_since_save_marks_iterate_done(int thread_num) {}
   311 
       
   312   // This generation will collect all younger generations
       
   313   // during a full collection.
       
   314   virtual bool full_collects_young_generation() const { return false; }
       
   315 
   311 
   316   // This generation does in-place marking, meaning that mark words
   312   // This generation does in-place marking, meaning that mark words
   317   // are mutated during the marking phase and presumably reinitialized
   313   // are mutated during the marking phase and presumably reinitialized
   318   // to a canonical value after the GC. This is currently used by the
   314   // to a canonical value after the GC. This is currently used by the
   319   // biased locking implementation to determine whether additional
   315   // biased locking implementation to determine whether additional
   401   // Generations may keep statistics about collection. This method
   397   // Generations may keep statistics about collection. This method
   402   // updates those statistics. current_generation is the generation
   398   // updates those statistics. current_generation is the generation
   403   // that was most recently collected. This allows the generation to
   399   // that was most recently collected. This allows the generation to
   404   // decide what statistics are valid to collect. For example, the
   400   // decide what statistics are valid to collect. For example, the
   405   // generation can decide to gather the amount of promoted data if
   401   // generation can decide to gather the amount of promoted data if
   406   // the collection of the younger generations has completed.
   402   // the collection of the young generation has completed.
   407   GCStats* gc_stats() const { return _gc_stats; }
   403   GCStats* gc_stats() const { return _gc_stats; }
   408   virtual void update_gc_stats(Generation* current_generation, bool full) {}
   404   virtual void update_gc_stats(Generation* current_generation, bool full) {}
   409 
   405 
   410   // Mark sweep support phase2
   406   // Mark sweep support phase2
   411   virtual void prepare_for_compaction(CompactPoint* cp);
   407   virtual void prepare_for_compaction(CompactPoint* cp);