hotspot/src/share/vm/gc_implementation/parallelScavenge/psAdaptiveSizePolicy.cpp
changeset 17842 0d11fa49f81f
parent 17393 7e99f263902c
child 18093 39cccba02d17
equal deleted inserted replaced
17841:a5608110c0a9 17842:0d11fa49f81f
   192   set_change_young_gen_for_maj_pauses(0);
   192   set_change_young_gen_for_maj_pauses(0);
   193 }
   193 }
   194 
   194 
   195 // If this is not a full GC, only test and modify the young generation.
   195 // If this is not a full GC, only test and modify the young generation.
   196 
   196 
   197 void PSAdaptiveSizePolicy::compute_generation_free_space(
   197 void PSAdaptiveSizePolicy::compute_generations_free_space(
   198                                            size_t young_live,
   198                                            size_t young_live,
   199                                            size_t eden_live,
   199                                            size_t eden_live,
   200                                            size_t old_live,
   200                                            size_t old_live,
   201                                            size_t cur_eden,
   201                                            size_t cur_eden,
   202                                            size_t max_old_gen_size,
   202                                            size_t max_old_gen_size,
   727     }
   727     }
   728   }
   728   }
   729 
   729 
   730   if (PrintAdaptiveSizePolicy && Verbose) {
   730   if (PrintAdaptiveSizePolicy && Verbose) {
   731     gclog_or_tty->print_cr(
   731     gclog_or_tty->print_cr(
   732       "PSAdaptiveSizePolicy::compute_old_gen_free_space "
   732       "PSAdaptiveSizePolicy::adjust_promo_for_pause_time "
   733       "adjusting gen sizes for major pause (avg %f goal %f). "
   733       "adjusting gen sizes for major pause (avg %f goal %f). "
   734       "desired_promo_size " SIZE_FORMAT " promo delta " SIZE_FORMAT,
   734       "desired_promo_size " SIZE_FORMAT " promo delta " SIZE_FORMAT,
   735       _avg_major_pause->average(), gc_pause_goal_sec(),
   735       _avg_major_pause->average(), gc_pause_goal_sec(),
   736       *desired_promo_size_ptr, promo_heap_delta);
   736       *desired_promo_size_ptr, promo_heap_delta);
   737   }
   737   }
   784     }
   784     }
   785   }
   785   }
   786 
   786 
   787   if (PrintAdaptiveSizePolicy && Verbose) {
   787   if (PrintAdaptiveSizePolicy && Verbose) {
   788     gclog_or_tty->print_cr(
   788     gclog_or_tty->print_cr(
   789       "PSAdaptiveSizePolicy::compute_eden_space_size "
   789       "PSAdaptiveSizePolicy::adjust_eden_for_pause_time "
   790       "adjusting gen sizes for major pause (avg %f goal %f). "
   790       "adjusting gen sizes for major pause (avg %f goal %f). "
   791       "desired_eden_size " SIZE_FORMAT " eden delta " SIZE_FORMAT,
   791       "desired_eden_size " SIZE_FORMAT " eden delta " SIZE_FORMAT,
   792       _avg_major_pause->average(), gc_pause_goal_sec(),
   792       _avg_major_pause->average(), gc_pause_goal_sec(),
   793       *desired_eden_size_ptr, eden_heap_delta);
   793       *desired_eden_size_ptr, eden_heap_delta);
   794   }
   794   }
   999 
   999 
  1000   size_t reduced_size = desired_promo_size - change;
  1000   size_t reduced_size = desired_promo_size - change;
  1001 
  1001 
  1002   if (PrintAdaptiveSizePolicy && Verbose) {
  1002   if (PrintAdaptiveSizePolicy && Verbose) {
  1003     gclog_or_tty->print_cr(
  1003     gclog_or_tty->print_cr(
  1004       "AdaptiveSizePolicy::compute_generation_free_space "
  1004       "AdaptiveSizePolicy::adjust_promo_for_footprint "
  1005       "adjusting tenured gen for footprint. "
  1005       "adjusting tenured gen for footprint. "
  1006       "starting promo size " SIZE_FORMAT
  1006       "starting promo size " SIZE_FORMAT
  1007       " reduced promo size " SIZE_FORMAT,
  1007       " reduced promo size " SIZE_FORMAT,
  1008       " promo delta " SIZE_FORMAT,
  1008       " promo delta " SIZE_FORMAT,
  1009       desired_promo_size, reduced_size, change );
  1009       desired_promo_size, reduced_size, change );
  1023 
  1023 
  1024   size_t reduced_size = desired_eden_size - change;
  1024   size_t reduced_size = desired_eden_size - change;
  1025 
  1025 
  1026   if (PrintAdaptiveSizePolicy && Verbose) {
  1026   if (PrintAdaptiveSizePolicy && Verbose) {
  1027     gclog_or_tty->print_cr(
  1027     gclog_or_tty->print_cr(
  1028       "AdaptiveSizePolicy::compute_generation_free_space "
  1028       "AdaptiveSizePolicy::adjust_eden_for_footprint "
  1029       "adjusting eden for footprint. "
  1029       "adjusting eden for footprint. "
  1030       " starting eden size " SIZE_FORMAT
  1030       " starting eden size " SIZE_FORMAT
  1031       " reduced eden size " SIZE_FORMAT
  1031       " reduced eden size " SIZE_FORMAT
  1032       " eden delta " SIZE_FORMAT,
  1032       " eden delta " SIZE_FORMAT,
  1033       desired_eden_size, reduced_size, change);
  1033       desired_eden_size, reduced_size, change);
  1278   }
  1278   }
  1279   avg_promoted()->sample(promoted + _avg_pretenured->padded_average());
  1279   avg_promoted()->sample(promoted + _avg_pretenured->padded_average());
  1280 
  1280 
  1281   if (PrintAdaptiveSizePolicy) {
  1281   if (PrintAdaptiveSizePolicy) {
  1282     gclog_or_tty->print(
  1282     gclog_or_tty->print(
  1283                   "AdaptiveSizePolicy::compute_survivor_space_size_and_thresh:"
  1283                   "AdaptiveSizePolicy::update_averages:"
  1284                   "  survived: "  SIZE_FORMAT
  1284                   "  survived: "  SIZE_FORMAT
  1285                   "  promoted: "  SIZE_FORMAT
  1285                   "  promoted: "  SIZE_FORMAT
  1286                   "  overflow: %s",
  1286                   "  overflow: %s",
  1287                   survived, promoted, is_survivor_overflow ? "true" : "false");
  1287                   survived, promoted, is_survivor_overflow ? "true" : "false");
  1288   }
  1288   }