src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hsx-gc Sdiff src/share/vm/gc_implementation/parallelScavenge

src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.hpp

Print this page




  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSPROMOTIONMANAGER_HPP
  26 #define SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSPROMOTIONMANAGER_HPP
  27 
  28 #include "gc_implementation/parallelScavenge/psPromotionLAB.hpp"
  29 #include "gc_implementation/shared/gcTrace.hpp"
  30 #include "gc_implementation/shared/copyFailedInfo.hpp"
  31 #include "memory/allocation.hpp"


  32 #include "utilities/taskqueue.hpp"
  33 
  34 //
  35 // psPromotionManager is used by a single thread to manage object survival
  36 // during a scavenge. The promotion manager contains thread local data only.
  37 //
  38 // NOTE! Be careful when allocating the stacks on cheap. If you are going
  39 // to use a promotion manager in more than one thread, the stacks MUST be
  40 // on cheap. This can lead to memory leaks, though, as they are not auto
  41 // deallocated.
  42 //
  43 // FIX ME FIX ME Add a destructor, and don't rely on the user to drain/flush/deallocate!
  44 //
  45 
  46 // Move to some global location
  47 #define HAS_BEEN_MOVED 0x1501d01d
  48 // End move to some global location
  49 
  50 class MutableSpace;
  51 class PSOldGen;
  52 class ParCompactionManager;
  53 
  54 class PSPromotionManager : public CHeapObj<mtGC> {
  55   friend class PSScavenge;
  56   friend class PSRefProcTaskExecutor;
  57  private:
  58   static PSPromotionManager**         _manager_array;
  59   static OopStarTaskQueueSet*         _stack_array_depth;
  60   static PSOldGen*                    _old_gen;
  61   static MutableSpace*                _young_space;
  62 
  63 #if TASKQUEUE_STATS
  64   size_t                              _masked_pushes;
  65   size_t                              _masked_steals;
  66   size_t                              _arrays_chunked;
  67   size_t                              _array_chunks_processed;
  68 
  69   void print_taskqueue_stats(uint i) const;
  70   void print_local_stats(uint i) const;
  71   static void print_stats();
  72 
  73   void reset_stats();
  74 #endif // TASKQUEUE_STATS
  75 
  76   PSYoungPromotionLAB                 _young_lab;
  77   PSOldPromotionLAB                   _old_lab;
  78   bool                                _young_gen_is_full;




  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSPROMOTIONMANAGER_HPP
  26 #define SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSPROMOTIONMANAGER_HPP
  27 
  28 #include "gc_implementation/parallelScavenge/psPromotionLAB.hpp"
  29 #include "gc_implementation/shared/gcTrace.hpp"
  30 #include "gc_implementation/shared/copyFailedInfo.hpp"
  31 #include "memory/allocation.hpp"
  32 #include "memory/padded.hpp"
  33 #include "utilities/globalDefinitions.hpp"
  34 #include "utilities/taskqueue.hpp"
  35 
  36 //
  37 // psPromotionManager is used by a single thread to manage object survival
  38 // during a scavenge. The promotion manager contains thread local data only.
  39 //
  40 // NOTE! Be careful when allocating the stacks on cheap. If you are going
  41 // to use a promotion manager in more than one thread, the stacks MUST be
  42 // on cheap. This can lead to memory leaks, though, as they are not auto
  43 // deallocated.
  44 //
  45 // FIX ME FIX ME Add a destructor, and don't rely on the user to drain/flush/deallocate!
  46 //
  47 
  48 // Move to some global location
  49 #define HAS_BEEN_MOVED 0x1501d01d
  50 // End move to some global location
  51 
  52 class MutableSpace;
  53 class PSOldGen;
  54 class ParCompactionManager;
  55 
  56 class PSPromotionManager VALUE_OBJ_CLASS_SPEC {
  57   friend class PSScavenge;
  58   friend class PSRefProcTaskExecutor;
  59  private:
  60   static PaddedEnd<PSPromotionManager>* _manager_array;
  61   static OopStarTaskQueueSet*           _stack_array_depth;
  62   static PSOldGen*                      _old_gen;
  63   static MutableSpace*                  _young_space;
  64 
  65 #if TASKQUEUE_STATS
  66   size_t                              _masked_pushes;
  67   size_t                              _masked_steals;
  68   size_t                              _arrays_chunked;
  69   size_t                              _array_chunks_processed;
  70 
  71   void print_taskqueue_stats(uint i) const;
  72   void print_local_stats(uint i) const;
  73   static void print_stats();
  74 
  75   void reset_stats();
  76 #endif // TASKQUEUE_STATS
  77 
  78   PSYoungPromotionLAB                 _young_lab;
  79   PSOldPromotionLAB                   _old_lab;
  80   bool                                _young_gen_is_full;


src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File