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

Print this page
rev 5623 : 8027960: Assertion assert(end >= start) failed during nightly testing on solaris
Summary: Needed to update _space_alignment in generation sizer to ensure correct sizing of spaces.
Reviewed-by:


  58   if (MinSurvivorRatio < 3) {
  59     FLAG_SET_ERGO(uintx, MinSurvivorRatio, 3);
  60   }
  61 
  62   if (InitialSurvivorRatio < 3) {
  63     FLAG_SET_ERGO(uintx, InitialSurvivorRatio, 3);
  64   }
  65 }
  66 
  67 void GenerationSizer::initialize_size_info() {
  68   trace_gen_sizes("ps heap raw");
  69   const size_t page_sz = os::page_size_for_region(_min_heap_byte_size,
  70                                                   _max_heap_byte_size,
  71                                                   8);
  72 
  73   // Can a page size be something else than a power of two?
  74   assert(is_power_of_2((intptr_t)page_sz), "must be a power of 2");
  75   size_t new_alignment = round_to(page_sz, _gen_alignment);
  76   if (new_alignment != _gen_alignment) {
  77     _gen_alignment = new_alignment;

  78     // Redo everything from the start
  79     initialize_flags();
  80   }
  81   TwoGenerationCollectorPolicy::initialize_size_info();
  82 
  83   trace_gen_sizes("ps heap rnd");
  84 }


  58   if (MinSurvivorRatio < 3) {
  59     FLAG_SET_ERGO(uintx, MinSurvivorRatio, 3);
  60   }
  61 
  62   if (InitialSurvivorRatio < 3) {
  63     FLAG_SET_ERGO(uintx, InitialSurvivorRatio, 3);
  64   }
  65 }
  66 
  67 void GenerationSizer::initialize_size_info() {
  68   trace_gen_sizes("ps heap raw");
  69   const size_t page_sz = os::page_size_for_region(_min_heap_byte_size,
  70                                                   _max_heap_byte_size,
  71                                                   8);
  72 
  73   // Can a page size be something else than a power of two?
  74   assert(is_power_of_2((intptr_t)page_sz), "must be a power of 2");
  75   size_t new_alignment = round_to(page_sz, _gen_alignment);
  76   if (new_alignment != _gen_alignment) {
  77     _gen_alignment = new_alignment;
  78     _space_alignment = new_alignment;
  79     // Redo everything from the start
  80     initialize_flags();
  81   }
  82   TwoGenerationCollectorPolicy::initialize_size_info();
  83 
  84   trace_gen_sizes("ps heap rnd");
  85 }