hotspot/src/share/vm/memory/tenuredGeneration.hpp

Print this page
rev 611 : Merge
   1 #ifdef USE_PRAGMA_IDENT_HDR
   2 #pragma ident "@(#)tenuredGeneration.hpp        1.27 07/05/29 09:44:17 JVM"
   3 #endif
   4 /*
   5  * Copyright 2001-2007 Sun Microsystems, Inc.  All Rights Reserved.
   6  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   7  *
   8  * This code is free software; you can redistribute it and/or modify it
   9  * under the terms of the GNU General Public License version 2 only, as
  10  * published by the Free Software Foundation.
  11  *
  12  * This code is distributed in the hope that it will be useful, but WITHOUT
  13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  14  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  15  * version 2 for more details (a copy is included in the LICENSE file that
  16  * accompanied this code).
  17  *
  18  * You should have received a copy of the GNU General Public License version
  19  * 2 along with this work; if not, write to the Free Software Foundation,
  20  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  21  *
  22  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  23  * CA 95054 USA or visit www.sun.com if you need additional information or
  24  * have any questions.
  25  *  


  59   
  60   Generation::Name kind() { return Generation::MarkSweepCompact; }
  61   
  62   // Printing
  63   const char* name() const;
  64   const char* short_name() const { return "Tenured"; }
  65   bool must_be_youngest() const { return false; }
  66   bool must_be_oldest() const { return true; }
  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. This is better than using th policy's should_collect_gen0_first()
  72   // since that causes us to do an extra unnecessary pair of restart-&-stop-world.
  73   virtual bool full_collects_younger_generations() const {
  74     return !CollectGen0First;
  75   }
  76 
  77   // Mark sweep support
  78   void compute_new_size();
  79   int allowed_dead_ratio() const;
  80 
  81   virtual void gc_prologue(bool full);
  82   virtual void gc_epilogue(bool full);
  83   bool should_collect(bool   full,
  84                       size_t word_size,
  85                       bool   is_tlab);
  86 
  87   virtual void collect(bool full,
  88                        bool clear_all_soft_refs,
  89                        size_t size, 
  90                        bool is_tlab);
  91 
  92 #ifndef SERIALGC
  93   // Overrides.
  94   virtual oop par_promote(int thread_num,
  95                           oop obj, markOop m, size_t word_sz);
  96   virtual void par_promote_alloc_undo(int thread_num,
  97                                       HeapWord* obj, size_t word_sz);
  98   virtual void par_promote_alloc_done(int thread_num);
  99 #endif // SERIALGC
   1 #ifdef USE_PRAGMA_IDENT_HDR
   2 #pragma ident "@(#)tenuredGeneration.hpp        1.27 07/05/29 09:44:17 JVM"
   3 #endif
   4 /*
   5  * Copyright 2001-2008 Sun Microsystems, Inc.  All Rights Reserved.
   6  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   7  *
   8  * This code is free software; you can redistribute it and/or modify it
   9  * under the terms of the GNU General Public License version 2 only, as
  10  * published by the Free Software Foundation.
  11  *
  12  * This code is distributed in the hope that it will be useful, but WITHOUT
  13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  14  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  15  * version 2 for more details (a copy is included in the LICENSE file that
  16  * accompanied this code).
  17  *
  18  * You should have received a copy of the GNU General Public License version
  19  * 2 along with this work; if not, write to the Free Software Foundation,
  20  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  21  *
  22  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  23  * CA 95054 USA or visit www.sun.com if you need additional information or
  24  * have any questions.
  25  *  


  59   
  60   Generation::Name kind() { return Generation::MarkSweepCompact; }
  61   
  62   // Printing
  63   const char* name() const;
  64   const char* short_name() const { return "Tenured"; }
  65   bool must_be_youngest() const { return false; }
  66   bool must_be_oldest() const { return true; }
  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. This is better than using th policy's should_collect_gen0_first()
  72   // since that causes us to do an extra unnecessary pair of restart-&-stop-world.
  73   virtual bool full_collects_younger_generations() const {
  74     return !CollectGen0First;
  75   }
  76 
  77   // Mark sweep support
  78   void compute_new_size();

  79 
  80   virtual void gc_prologue(bool full);
  81   virtual void gc_epilogue(bool full);
  82   bool should_collect(bool   full,
  83                       size_t word_size,
  84                       bool   is_tlab);
  85 
  86   virtual void collect(bool full,
  87                        bool clear_all_soft_refs,
  88                        size_t size, 
  89                        bool is_tlab);
  90 
  91 #ifndef SERIALGC
  92   // Overrides.
  93   virtual oop par_promote(int thread_num,
  94                           oop obj, markOop m, size_t word_sz);
  95   virtual void par_promote_alloc_undo(int thread_num,
  96                                       HeapWord* obj, size_t word_sz);
  97   virtual void par_promote_alloc_done(int thread_num);
  98 #endif // SERIALGC