< prev index next >

src/hotspot/share/gc/parallel/psParallelCompact.cpp

8221260: Initialize more class members on construction, remove some unused ones
Reviewed-by:

388   const MutableSpace* space;                                                                                               
389   do {                                                                                                                     
390     space = space_info[id].space();                                                                                        
391     print_initial_summary_data(summary_data, space);                                                                       
392   } while (++id < PSParallelCompact::eden_space_id);                                                                       
393 
394   do {                                                                                                                     
395     space = space_info[id].space();                                                                                        
396     print_generic_summary_data(summary_data, space->bottom(), space->top());                                               
397   } while (++id < PSParallelCompact::last_space_id);                                                                       
398 }                                                                                                                          
399 #endif  // #ifndef PRODUCT                                                                                                 
400 
401 #ifdef  ASSERT                                                                                                             
402 size_t add_obj_count;                                                                                                      
403 size_t add_obj_size;                                                                                                       
404 size_t mark_bitmap_count;                                                                                                  
405 size_t mark_bitmap_size;                                                                                                   
406 #endif  // #ifdef ASSERT                                                                                                   
407 
408 ParallelCompactData::ParallelCompactData()                                                                                 
409 {                                                                                                                          
410   _region_start = 0;                                                                                                       
411                                                                                                                            
412   _region_vspace = 0;                                                                                                      
413   _reserved_byte_size = 0;                                                                                                 
414   _region_data = 0;                                                                                                        
415   _region_count = 0;                                                                                                       
416                                                                                                                            
417   _block_vspace = 0;                                                                                                       
418   _block_data = 0;                                                                                                         
419   _block_count = 0;                                                                                                        
420 }                                                                                                                          
421 
422 bool ParallelCompactData::initialize(MemRegion covered_region)                                                             
423 {                                                                                                                          
424   _region_start = covered_region.start();                                                                                  
425   const size_t region_size = covered_region.word_size();                                                                   
426   DEBUG_ONLY(_region_end = _region_start + region_size;)                                                                   
427 
428   assert(region_align_down(_region_start) == _region_start,                                                                
429          "region start not aligned");                                                                                      
430   assert((region_size & RegionSizeOffsetMask) == 0,                                                                        
431          "region size not a multiple of RegionSize");                                                                      
432 
433   bool result = initialize_region_data(region_size) && initialize_block_data();                                            
434   return result;                                                                                                           
435 }                                                                                                                          
436 
437 PSVirtualSpace*                                                                                                            
438 ParallelCompactData::create_vspace(size_t count, size_t element_size)                                                      
439 {                                                                                                                          

388   const MutableSpace* space;
389   do {
390     space = space_info[id].space();
391     print_initial_summary_data(summary_data, space);
392   } while (++id < PSParallelCompact::eden_space_id);
393 
394   do {
395     space = space_info[id].space();
396     print_generic_summary_data(summary_data, space->bottom(), space->top());
397   } while (++id < PSParallelCompact::last_space_id);
398 }
399 #endif  // #ifndef PRODUCT
400 
401 #ifdef  ASSERT
402 size_t add_obj_count;
403 size_t add_obj_size;
404 size_t mark_bitmap_count;
405 size_t mark_bitmap_size;
406 #endif  // #ifdef ASSERT
407 
408 ParallelCompactData::ParallelCompactData() :
409   _region_start(NULL),
410 #ifdef  ASSERT
411   _region_end(NULL),
412 #endif  // #ifdef ASSERT
413   _region_vspace(NULL),
414   _reserved_byte_size(0),
415   _region_data(NULL),
416   _region_count(0),
417   _block_vspace(NULL),
418   _block_data(NULL),
419   _block_count(0) {}

420 
421 bool ParallelCompactData::initialize(MemRegion covered_region)
422 {
423   _region_start = covered_region.start();
424   const size_t region_size = covered_region.word_size();
425   DEBUG_ONLY(_region_end = _region_start + region_size;)
426 
427   assert(region_align_down(_region_start) == _region_start,
428          "region start not aligned");
429   assert((region_size & RegionSizeOffsetMask) == 0,
430          "region size not a multiple of RegionSize");
431 
432   bool result = initialize_region_data(region_size) && initialize_block_data();
433   return result;
434 }
435 
436 PSVirtualSpace*
437 ParallelCompactData::create_vspace(size_t count, size_t element_size)
438 {
< prev index next >