comparison src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @ 3920:af2ab04e0038

6929868: G1: introduce min / max young gen size bounds Summary: Make G1 handle young gen size command line flags more consistently Reviewed-by: tonyp, jwilhelm
author brutisso
date Thu, 08 Sep 2011 16:29:41 +0200
parents 4f41766176cf
children 663cb89032b1
comparison
equal deleted inserted replaced
3919:4f41766176cf 3920:af2ab04e0038
1680 _hr_printer.commit(curr, curr_end); 1680 _hr_printer.commit(curr, curr_end);
1681 curr = curr_end; 1681 curr = curr_end;
1682 } 1682 }
1683 assert(curr == mr.end(), "post-condition"); 1683 assert(curr == mr.end(), "post-condition");
1684 } 1684 }
1685 g1_policy()->calculate_reserve(n_regions()); 1685 g1_policy()->record_new_heap_size(n_regions());
1686 } else { 1686 } else {
1687 ergo_verbose0(ErgoHeapSizing, 1687 ergo_verbose0(ErgoHeapSizing,
1688 "did not expand the heap", 1688 "did not expand the heap",
1689 ergo_format_reason("heap expansion operation failed")); 1689 ergo_format_reason("heap expansion operation failed"));
1690 // The expansion of the virtual storage space was unsuccessful. 1690 // The expansion of the virtual storage space was unsuccessful.
1731 assert(mr.start() == new_end, "post-condition"); 1731 assert(mr.start() == new_end, "post-condition");
1732 1732
1733 _expansion_regions += num_regions_deleted; 1733 _expansion_regions += num_regions_deleted;
1734 update_committed_space(old_end, new_end); 1734 update_committed_space(old_end, new_end);
1735 HeapRegionRemSet::shrink_heap(n_regions()); 1735 HeapRegionRemSet::shrink_heap(n_regions());
1736 g1_policy()->calculate_reserve(n_regions()); 1736 g1_policy()->record_new_heap_size(n_regions());
1737 } else { 1737 } else {
1738 ergo_verbose0(ErgoHeapSizing, 1738 ergo_verbose0(ErgoHeapSizing,
1739 "did not shrink the heap", 1739 "did not shrink the heap",
1740 ergo_format_reason("heap shrinking operation failed")); 1740 ergo_format_reason("heap shrinking operation failed"));
1741 } 1741 }
3523 g1_policy()->print_collection_set(g1_policy()->inc_cset_head(), gclog_or_tty); 3523 g1_policy()->print_collection_set(g1_policy()->inc_cset_head(), gclog_or_tty);
3524 #endif // YOUNG_LIST_VERBOSE 3524 #endif // YOUNG_LIST_VERBOSE
3525 3525
3526 init_mutator_alloc_region(); 3526 init_mutator_alloc_region();
3527 3527
3528 {
3529 size_t expand_bytes = g1_policy()->expansion_amount();
3530 if (expand_bytes > 0) {
3531 size_t bytes_before = capacity();
3532 if (!expand(expand_bytes)) {
3533 // We failed to expand the heap so let's verify that
3534 // committed/uncommitted amount match the backing store
3535 assert(capacity() == _g1_storage.committed_size(), "committed size mismatch");
3536 assert(max_capacity() == _g1_storage.reserved_size(), "reserved size mismatch");
3537 }
3538 }
3539 }
3540
3528 double end_time_sec = os::elapsedTime(); 3541 double end_time_sec = os::elapsedTime();
3529 double pause_time_ms = (end_time_sec - start_time_sec) * MILLIUNITS; 3542 double pause_time_ms = (end_time_sec - start_time_sec) * MILLIUNITS;
3530 g1_policy()->record_pause_time_ms(pause_time_ms); 3543 g1_policy()->record_pause_time_ms(pause_time_ms);
3531 g1_policy()->record_collection_pause_end(); 3544 g1_policy()->record_collection_pause_end();
3532 3545