< prev index next >

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

Print this page




 732   to_space()->object_iterate(blk);
 733 }
 734 
 735 #if INCLUDE_SERIALGC
 736 
 737 void PSYoungGen::precompact() {
 738   eden_mark_sweep()->precompact();
 739   from_mark_sweep()->precompact();
 740   to_mark_sweep()->precompact();
 741 }
 742 
 743 void PSYoungGen::adjust_pointers() {
 744   eden_mark_sweep()->adjust_pointers();
 745   from_mark_sweep()->adjust_pointers();
 746   to_mark_sweep()->adjust_pointers();
 747 }
 748 
 749 void PSYoungGen::compact() {
 750   eden_mark_sweep()->compact(ZapUnusedHeapArea);
 751   from_mark_sweep()->compact(ZapUnusedHeapArea);
 752   // Mark sweep stores preserved markWords in to space, don't disturb!
 753   to_mark_sweep()->compact(false);
 754 }
 755 
 756 #endif // INCLUDE_SERIALGC
 757 
 758 void PSYoungGen::print() const { print_on(tty); }
 759 void PSYoungGen::print_on(outputStream* st) const {
 760   st->print(" %-15s", "PSYoungGen");
 761   st->print(" total " SIZE_FORMAT "K, used " SIZE_FORMAT "K",
 762              capacity_in_bytes()/K, used_in_bytes()/K);
 763   virtual_space()->print_space_boundaries_on(st);
 764   st->print("  eden"); eden_space()->print_on(st);
 765   st->print("  from"); from_space()->print_on(st);
 766   st->print("  to  "); to_space()->print_on(st);






 767 }
 768 
 769 size_t PSYoungGen::available_for_expansion() {
 770   ShouldNotReachHere();
 771   return 0;
 772 }
 773 
 774 size_t PSYoungGen::available_for_contraction() {
 775   ShouldNotReachHere();
 776   return 0;
 777 }
 778 
 779 size_t PSYoungGen::available_to_min_gen() {
 780   assert(virtual_space()->committed_size() >= min_gen_size(), "Invariant");
 781   return virtual_space()->committed_size() - min_gen_size();
 782 }
 783 
 784 // This method assumes that from-space has live data and that
 785 // any shrinkage of the young gen is limited by location of
 786 // from-space.




 732   to_space()->object_iterate(blk);
 733 }
 734 
 735 #if INCLUDE_SERIALGC
 736 
 737 void PSYoungGen::precompact() {
 738   eden_mark_sweep()->precompact();
 739   from_mark_sweep()->precompact();
 740   to_mark_sweep()->precompact();
 741 }
 742 
 743 void PSYoungGen::adjust_pointers() {
 744   eden_mark_sweep()->adjust_pointers();
 745   from_mark_sweep()->adjust_pointers();
 746   to_mark_sweep()->adjust_pointers();
 747 }
 748 
 749 void PSYoungGen::compact() {
 750   eden_mark_sweep()->compact(ZapUnusedHeapArea);
 751   from_mark_sweep()->compact(ZapUnusedHeapArea);
 752   // Mark sweep stores preserved markOops in to space, don't disturb!
 753   to_mark_sweep()->compact(false);
 754 }
 755 
 756 #endif // INCLUDE_SERIALGC
 757 
 758 void PSYoungGen::print() const { print_on(tty); }
 759 void PSYoungGen::print_on(outputStream* st) const {
 760   st->print(" %-15s", "PSYoungGen");
 761   st->print(" total " SIZE_FORMAT "K, used " SIZE_FORMAT "K",
 762              capacity_in_bytes()/K, used_in_bytes()/K);
 763   virtual_space()->print_space_boundaries_on(st);
 764   st->print("  eden"); eden_space()->print_on(st);
 765   st->print("  from"); from_space()->print_on(st);
 766   st->print("  to  "); to_space()->print_on(st);
 767 }
 768 
 769 // Note that a space is not printed before the [NAME:
 770 void PSYoungGen::print_used_change(size_t prev_used) const {
 771   log_info(gc, heap)("%s: "  SIZE_FORMAT "K->" SIZE_FORMAT "K("  SIZE_FORMAT "K)",
 772       name(), prev_used / K, used_in_bytes() / K, capacity_in_bytes() / K);
 773 }
 774 
 775 size_t PSYoungGen::available_for_expansion() {
 776   ShouldNotReachHere();
 777   return 0;
 778 }
 779 
 780 size_t PSYoungGen::available_for_contraction() {
 781   ShouldNotReachHere();
 782   return 0;
 783 }
 784 
 785 size_t PSYoungGen::available_to_min_gen() {
 786   assert(virtual_space()->committed_size() >= min_gen_size(), "Invariant");
 787   return virtual_space()->committed_size() - min_gen_size();
 788 }
 789 
 790 // This method assumes that from-space has live data and that
 791 // any shrinkage of the young gen is limited by location of
 792 // from-space.


< prev index next >