< prev index next >

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

Print this page




 262 
 263     // Let the size policy know we're done
 264     size_policy->major_collection_end(old_gen->used_in_bytes(), gc_cause);
 265 
 266     if (UseAdaptiveSizePolicy) {
 267 
 268       if (PrintAdaptiveSizePolicy) {
 269         gclog_or_tty->print("AdaptiveSizeStart: ");
 270         gclog_or_tty->stamp();
 271         gclog_or_tty->print_cr(" collection: %d ",
 272                        heap->total_collections());
 273         if (Verbose) {
 274           gclog_or_tty->print("old_gen_capacity: %d young_gen_capacity: %d",
 275             old_gen->capacity_in_bytes(), young_gen->capacity_in_bytes());
 276         }
 277       }
 278 
 279       // Don't check if the size_policy is ready here.  Let
 280       // the size_policy check that internally.
 281       if (UseAdaptiveGenerationSizePolicyAtMajorCollection &&
 282           ((gc_cause != GCCause::_java_lang_system_gc) ||
 283             UseAdaptiveSizePolicyWithSystemGC)) {
 284         // Calculate optimal free space amounts
 285         assert(young_gen->max_size() >
 286           young_gen->from_space()->capacity_in_bytes() +
 287           young_gen->to_space()->capacity_in_bytes(),
 288           "Sizes of space in young gen are out-of-bounds");
 289 
 290         size_t young_live = young_gen->used_in_bytes();
 291         size_t eden_live = young_gen->eden_space()->used_in_bytes();
 292         size_t old_live = old_gen->used_in_bytes();
 293         size_t cur_eden = young_gen->eden_space()->capacity_in_bytes();
 294         size_t max_old_gen_size = old_gen->max_gen_size();
 295         size_t max_eden_size = young_gen->max_size() -
 296           young_gen->from_space()->capacity_in_bytes() -
 297           young_gen->to_space()->capacity_in_bytes();
 298 
 299         // Used for diagnostics
 300         size_policy->clear_generation_free_space_flags();
 301 
 302         size_policy->compute_generations_free_space(young_live,




 262 
 263     // Let the size policy know we're done
 264     size_policy->major_collection_end(old_gen->used_in_bytes(), gc_cause);
 265 
 266     if (UseAdaptiveSizePolicy) {
 267 
 268       if (PrintAdaptiveSizePolicy) {
 269         gclog_or_tty->print("AdaptiveSizeStart: ");
 270         gclog_or_tty->stamp();
 271         gclog_or_tty->print_cr(" collection: %d ",
 272                        heap->total_collections());
 273         if (Verbose) {
 274           gclog_or_tty->print("old_gen_capacity: %d young_gen_capacity: %d",
 275             old_gen->capacity_in_bytes(), young_gen->capacity_in_bytes());
 276         }
 277       }
 278 
 279       // Don't check if the size_policy is ready here.  Let
 280       // the size_policy check that internally.
 281       if (UseAdaptiveGenerationSizePolicyAtMajorCollection &&
 282           (!GCCause::is_user_requested_gc(gc_cause) ||
 283             UseAdaptiveSizePolicyWithSystemGC)) {
 284         // Calculate optimal free space amounts
 285         assert(young_gen->max_size() >
 286           young_gen->from_space()->capacity_in_bytes() +
 287           young_gen->to_space()->capacity_in_bytes(),
 288           "Sizes of space in young gen are out-of-bounds");
 289 
 290         size_t young_live = young_gen->used_in_bytes();
 291         size_t eden_live = young_gen->eden_space()->used_in_bytes();
 292         size_t old_live = old_gen->used_in_bytes();
 293         size_t cur_eden = young_gen->eden_space()->capacity_in_bytes();
 294         size_t max_old_gen_size = old_gen->max_gen_size();
 295         size_t max_eden_size = young_gen->max_size() -
 296           young_gen->from_space()->capacity_in_bytes() -
 297           young_gen->to_space()->capacity_in_bytes();
 298 
 299         // Used for diagnostics
 300         size_policy->clear_generation_free_space_flags();
 301 
 302         size_policy->compute_generations_free_space(young_live,


< prev index next >