< prev index next >

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

Print this page




 803   }
 804   virtual_space()->print_space_boundaries_on(st);
 805   st->print("  eden"); eden_space()->print_on(st);
 806   st->print("  from"); from_space()->print_on(st);
 807   st->print("  to  "); to_space()->print_on(st);
 808 }
 809 
 810 // Note that a space is not printed before the [NAME:
 811 void PSYoungGen::print_used_change(size_t prev_used) const {
 812   gclog_or_tty->print("[%s:", name());
 813   gclog_or_tty->print(" "  SIZE_FORMAT "K"
 814                       "->" SIZE_FORMAT "K"
 815                       "("  SIZE_FORMAT "K)",
 816                       prev_used / K, used_in_bytes() / K,
 817                       capacity_in_bytes() / K);
 818   gclog_or_tty->print("]");
 819 }
 820 
 821 size_t PSYoungGen::available_for_expansion() {
 822   ShouldNotReachHere();
 823   return 0;
 824 }
 825 
 826 size_t PSYoungGen::available_for_contraction() {
 827   ShouldNotReachHere();
 828   return 0;
 829 }
 830 
 831 size_t PSYoungGen::available_to_min_gen() {
 832   assert(virtual_space()->committed_size() >= min_gen_size(), "Invariant");
 833   return virtual_space()->committed_size() - min_gen_size();
 834 }
 835 
 836 // This method assumes that from-space has live data and that
 837 // any shrinkage of the young gen is limited by location of
 838 // from-space.
 839 size_t PSYoungGen::available_to_live() {
 840   size_t delta_in_survivor = 0;
 841   ParallelScavengeHeap* heap = ParallelScavengeHeap::heap();
 842   const size_t space_alignment = heap->space_alignment();
 843   const size_t gen_alignment = heap->generation_alignment();
 844 
 845   MutableSpace* space_shrinking = NULL;
 846   if (from_space()->end() > to_space()->end()) {
 847     space_shrinking = from_space();
 848   } else {




 803   }
 804   virtual_space()->print_space_boundaries_on(st);
 805   st->print("  eden"); eden_space()->print_on(st);
 806   st->print("  from"); from_space()->print_on(st);
 807   st->print("  to  "); to_space()->print_on(st);
 808 }
 809 
 810 // Note that a space is not printed before the [NAME:
 811 void PSYoungGen::print_used_change(size_t prev_used) const {
 812   gclog_or_tty->print("[%s:", name());
 813   gclog_or_tty->print(" "  SIZE_FORMAT "K"
 814                       "->" SIZE_FORMAT "K"
 815                       "("  SIZE_FORMAT "K)",
 816                       prev_used / K, used_in_bytes() / K,
 817                       capacity_in_bytes() / K);
 818   gclog_or_tty->print("]");
 819 }
 820 
 821 size_t PSYoungGen::available_for_expansion() {
 822   ShouldNotReachHere();

 823 }
 824 
 825 size_t PSYoungGen::available_for_contraction() {
 826   ShouldNotReachHere();

 827 }
 828 
 829 size_t PSYoungGen::available_to_min_gen() {
 830   assert(virtual_space()->committed_size() >= min_gen_size(), "Invariant");
 831   return virtual_space()->committed_size() - min_gen_size();
 832 }
 833 
 834 // This method assumes that from-space has live data and that
 835 // any shrinkage of the young gen is limited by location of
 836 // from-space.
 837 size_t PSYoungGen::available_to_live() {
 838   size_t delta_in_survivor = 0;
 839   ParallelScavengeHeap* heap = ParallelScavengeHeap::heap();
 840   const size_t space_alignment = heap->space_alignment();
 841   const size_t gen_alignment = heap->generation_alignment();
 842 
 843   MutableSpace* space_shrinking = NULL;
 844   if (from_space()->end() > to_space()->end()) {
 845     space_shrinking = from_space();
 846   } else {


< prev index next >