51 real_length + 52 PADDING_ELEM_NUM; 53 _surviving_young_words_base = NEW_C_HEAP_ARRAY(size_t, array_length, mtGC); 54 if (_surviving_young_words_base == NULL) 55 vm_exit_out_of_memory(array_length * sizeof(size_t), OOM_MALLOC_ERROR, 56 "Not enough space for young surv histo."); 57 _surviving_young_words = _surviving_young_words_base + PADDING_ELEM_NUM; 58 memset(_surviving_young_words, 0, (size_t) real_length * sizeof(size_t)); 59 60 _g1_par_allocator = G1ParGCAllocator::create_allocator(_g1h); 61 62 _dest[InCSetState::NotInCSet] = InCSetState::NotInCSet; 63 // The dest for Young is used when the objects are aged enough to 64 // need to be moved to the next space. 65 _dest[InCSetState::Young] = InCSetState::Old; 66 _dest[InCSetState::Old] = InCSetState::Old; 67 68 _start = os::elapsedTime(); 69 } 70 71 G1ParScanThreadState::~G1ParScanThreadState() { 72 _g1_par_allocator->retire_alloc_buffers(); 73 delete _g1_par_allocator; 74 FREE_C_HEAP_ARRAY(size_t, _surviving_young_words_base); 75 } 76 77 void 78 G1ParScanThreadState::print_termination_stats_hdr(outputStream* const st) 79 { 80 st->print_raw_cr("GC Termination Stats"); 81 st->print_raw_cr(" elapsed --strong roots-- -------termination-------" 82 " ------waste (KiB)------"); 83 st->print_raw_cr("thr ms ms % ms % attempts" 84 " total alloc undo"); 85 st->print_raw_cr("--- --------- --------- ------ --------- ------ --------" 86 " ------- ------- -------"); 87 } 88 89 void 90 G1ParScanThreadState::print_termination_stats(int i, | 51 real_length + 52 PADDING_ELEM_NUM; 53 _surviving_young_words_base = NEW_C_HEAP_ARRAY(size_t, array_length, mtGC); 54 if (_surviving_young_words_base == NULL) 55 vm_exit_out_of_memory(array_length * sizeof(size_t), OOM_MALLOC_ERROR, 56 "Not enough space for young surv histo."); 57 _surviving_young_words = _surviving_young_words_base + PADDING_ELEM_NUM; 58 memset(_surviving_young_words, 0, (size_t) real_length * sizeof(size_t)); 59 60 _g1_par_allocator = G1ParGCAllocator::create_allocator(_g1h); 61 62 _dest[InCSetState::NotInCSet] = InCSetState::NotInCSet; 63 // The dest for Young is used when the objects are aged enough to 64 // need to be moved to the next space. 65 _dest[InCSetState::Young] = InCSetState::Old; 66 _dest[InCSetState::Old] = InCSetState::Old; 67 68 _start = os::elapsedTime(); 69 } 70 71 void G1ParScanThreadState::retire_alloc_buffers() { 72 _g1_par_allocator->retire_alloc_buffers(); 73 } 74 75 G1ParScanThreadState::~G1ParScanThreadState() { 76 _g1_par_allocator->retire_alloc_buffers(); 77 delete _g1_par_allocator; 78 FREE_C_HEAP_ARRAY(size_t, _surviving_young_words_base); 79 } 80 81 void 82 G1ParScanThreadState::print_termination_stats_hdr(outputStream* const st) 83 { 84 st->print_raw_cr("GC Termination Stats"); 85 st->print_raw_cr(" elapsed --strong roots-- -------termination-------" 86 " ------waste (KiB)------"); 87 st->print_raw_cr("thr ms ms % ms % attempts" 88 " total alloc undo"); 89 st->print_raw_cr("--- --------- --------- ------ --------- ------ --------" 90 " ------- ------- -------"); 91 } 92 93 void 94 G1ParScanThreadState::print_termination_stats(int i, |