hotspot/src/share/vm/gc/serial/tenuredGeneration.hpp
changeset 32623 390a27af5657
parent 31358 693058672cc6
child 33212 906b3d079b13
equal deleted inserted replaced
32622:7ed47d0b888a 32623:390a27af5657
    40   friend class VMStructs;
    40   friend class VMStructs;
    41   // Abstractly, this is a subtype that gets access to protected fields.
    41   // Abstractly, this is a subtype that gets access to protected fields.
    42   friend class VM_PopulateDumpSharedSpace;
    42   friend class VM_PopulateDumpSharedSpace;
    43 
    43 
    44  protected:
    44  protected:
    45   ContiguousSpace*  _the_space;       // Actual space holding objects
    45   ContiguousSpace*    _the_space;       // Actual space holding objects
    46 
    46 
    47   GenerationCounters*   _gen_counters;
    47   GenerationCounters* _gen_counters;
    48   CSpaceCounters*       _space_counters;
    48   CSpaceCounters*     _space_counters;
    49 
    49 
    50   // Allocation failure
    50   // Allocation failure
    51   virtual bool expand(size_t bytes, size_t expand_bytes);
    51   virtual bool expand(size_t bytes, size_t expand_bytes);
    52 
    52 
    53   // Accessing spaces
    53   // Accessing spaces
    54   ContiguousSpace* space() const { return _the_space; }
    54   ContiguousSpace* space() const { return _the_space; }
    55 
    55 
    56   void assert_correct_size_change_locking();
    56   void assert_correct_size_change_locking();
       
    57 
    57  public:
    58  public:
    58   TenuredGeneration(ReservedSpace rs,
    59   TenuredGeneration(ReservedSpace rs,
    59                     size_t initial_byte_size,
    60                     size_t initial_byte_size,
    60                     GenRemSet* remset);
    61                     GenRemSet* remset);
    61 
    62 
    64   // Printing
    65   // Printing
    65   const char* name() const { return "tenured generation"; }
    66   const char* name() const { return "tenured generation"; }
    66   const char* short_name() const { return "Tenured"; }
    67   const char* short_name() const { return "Tenured"; }
    67 
    68 
    68   // Does a "full" (forced) collection invoked on this generation collect
    69   // Does a "full" (forced) collection invoked on this generation collect
    69   // all younger generations as well? Note that this is a
    70   // the young generation as well? Note that this is a hack to allow the
    70   // hack to allow the collection of the younger gen first if the flag is
    71   // collection of the young gen first if the flag is set.
    71   // set.
    72   virtual bool full_collects_young_generation() const {
    72   virtual bool full_collects_younger_generations() const {
       
    73     return !ScavengeBeforeFullGC;
    73     return !ScavengeBeforeFullGC;
    74   }
    74   }
    75 
    75 
    76   size_t unsafe_max_alloc_nogc() const;
    76   size_t unsafe_max_alloc_nogc() const;
    77   size_t contiguous_available() const;
    77   size_t contiguous_available() const;
    97 
    97 
    98   virtual void collect(bool full,
    98   virtual void collect(bool full,
    99                        bool clear_all_soft_refs,
    99                        bool clear_all_soft_refs,
   100                        size_t size,
   100                        size_t size,
   101                        bool is_tlab);
   101                        bool is_tlab);
       
   102 
   102   HeapWord* expand_and_allocate(size_t size,
   103   HeapWord* expand_and_allocate(size_t size,
   103                                 bool is_tlab,
   104                                 bool is_tlab,
   104                                 bool parallel = false);
   105                                 bool parallel = false);
   105 
   106 
   106   virtual void prepare_for_verify();
   107   virtual void prepare_for_verify();
   107 
   108 
   108 
       
   109   virtual void gc_prologue(bool full);
   109   virtual void gc_prologue(bool full);
   110   virtual void gc_epilogue(bool full);
   110   virtual void gc_epilogue(bool full);
       
   111 
   111   bool should_collect(bool   full,
   112   bool should_collect(bool   full,
   112                       size_t word_size,
   113                       size_t word_size,
   113                       bool   is_tlab);
   114                       bool   is_tlab);
   114 
   115 
   115   virtual void compute_new_size();
   116   virtual void compute_new_size();