src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp

Print this page




 894 }
 895 
 896 void PSParallelCompact::initialize_space_info()
 897 {
 898   memset(&_space_info, 0, sizeof(_space_info));
 899 
 900   ParallelScavengeHeap* heap = gc_heap();
 901   PSYoungGen* young_gen = heap->young_gen();
 902 
 903   _space_info[old_space_id].set_space(heap->old_gen()->object_space());
 904   _space_info[eden_space_id].set_space(young_gen->eden_space());
 905   _space_info[from_space_id].set_space(young_gen->from_space());
 906   _space_info[to_space_id].set_space(young_gen->to_space());
 907 
 908   _space_info[old_space_id].set_start_array(heap->old_gen()->start_array());
 909 }
 910 
 911 void PSParallelCompact::initialize_dead_wood_limiter()
 912 {
 913   const size_t max = 100;
 914   _dwl_mean = double(MIN2(ParallelOldDeadWoodLimiterMean, max)) / 100.0;
 915   _dwl_std_dev = double(MIN2(ParallelOldDeadWoodLimiterStdDev, max)) / 100.0;
 916   _dwl_first_term = 1.0 / (sqrt(2.0 * M_PI) * _dwl_std_dev);
 917   DEBUG_ONLY(_dwl_initialized = true;)
 918   _dwl_adjustment = normal_distribution(1.0);
 919 }
 920 
 921 // Simple class for storing info about the heap at the start of GC, to be used
 922 // after GC for comparison/printing.
 923 class PreGCValues {
 924 public:
 925   PreGCValues() { }
 926   PreGCValues(ParallelScavengeHeap* heap) { fill(heap); }
 927 
 928   void fill(ParallelScavengeHeap* heap) {
 929     _heap_used      = heap->used();
 930     _young_gen_used = heap->young_gen()->used_in_bytes();
 931     _old_gen_used   = heap->old_gen()->used_in_bytes();
 932     _metadata_used  = MetaspaceAux::used_bytes();
 933   };
 934 
 935   size_t heap_used() const      { return _heap_used; }




 894 }
 895 
 896 void PSParallelCompact::initialize_space_info()
 897 {
 898   memset(&_space_info, 0, sizeof(_space_info));
 899 
 900   ParallelScavengeHeap* heap = gc_heap();
 901   PSYoungGen* young_gen = heap->young_gen();
 902 
 903   _space_info[old_space_id].set_space(heap->old_gen()->object_space());
 904   _space_info[eden_space_id].set_space(young_gen->eden_space());
 905   _space_info[from_space_id].set_space(young_gen->from_space());
 906   _space_info[to_space_id].set_space(young_gen->to_space());
 907 
 908   _space_info[old_space_id].set_start_array(heap->old_gen()->start_array());
 909 }
 910 
 911 void PSParallelCompact::initialize_dead_wood_limiter()
 912 {
 913   const size_t max = 100;
 914   _dwl_mean = double(MIN2((size_t)ParallelOldDeadWoodLimiterMean, max)) / 100.0;
 915   _dwl_std_dev = double(MIN2((size_t)ParallelOldDeadWoodLimiterStdDev, max)) / 100.0;
 916   _dwl_first_term = 1.0 / (sqrt(2.0 * M_PI) * _dwl_std_dev);
 917   DEBUG_ONLY(_dwl_initialized = true;)
 918   _dwl_adjustment = normal_distribution(1.0);
 919 }
 920 
 921 // Simple class for storing info about the heap at the start of GC, to be used
 922 // after GC for comparison/printing.
 923 class PreGCValues {
 924 public:
 925   PreGCValues() { }
 926   PreGCValues(ParallelScavengeHeap* heap) { fill(heap); }
 927 
 928   void fill(ParallelScavengeHeap* heap) {
 929     _heap_used      = heap->used();
 930     _young_gen_used = heap->young_gen()->used_in_bytes();
 931     _old_gen_used   = heap->old_gen()->used_in_bytes();
 932     _metadata_used  = MetaspaceAux::used_bytes();
 933   };
 934 
 935   size_t heap_used() const      { return _heap_used; }