src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/gc_implementation/parallelScavenge

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

Print this page
rev 5732 : [mq]: comments2


 656                         "->" SIZE_FORMAT "K"
 657                         "("  SIZE_FORMAT "K)",
 658                         prev_used / K, used() / K, capacity() / K);
 659   }
 660 }
 661 
 662 void ParallelScavengeHeap::trace_heap(GCWhen::Type when, GCTracer* gc_tracer) {
 663   const PSHeapSummary& heap_summary = create_ps_heap_summary();
 664   const MetaspaceSummary& metaspace_summary = create_metaspace_summary();
 665   gc_tracer->report_gc_heap_summary(when, heap_summary, metaspace_summary);
 666 }
 667 
 668 ParallelScavengeHeap* ParallelScavengeHeap::heap() {
 669   assert(_psh != NULL, "Uninitialized access to ParallelScavengeHeap::heap()");
 670   assert(_psh->kind() == CollectedHeap::ParallelScavengeHeap, "not a parallel scavenge heap");
 671   return _psh;
 672 }
 673 
 674 // Before delegating the resize to the young generation,
 675 // the reserved space for the young and old generations
 676 // may be changed to accomodate the desired resize.
 677 void ParallelScavengeHeap::resize_young_gen(size_t eden_size,
 678     size_t survivor_size) {
 679   if (UseAdaptiveGCBoundary) {
 680     if (size_policy()->bytes_absorbed_from_eden() != 0) {
 681       size_policy()->reset_bytes_absorbed_from_eden();
 682       return;  // The generation changed size already.
 683     }
 684     gens()->adjust_boundary_for_young_gen_needs(eden_size, survivor_size);
 685   }
 686 
 687   // Delegate the resize to the generation.
 688   _young_gen->resize(eden_size, survivor_size);
 689 }
 690 
 691 // Before delegating the resize to the old generation,
 692 // the reserved space for the young and old generations
 693 // may be changed to accomodate the desired resize.
 694 void ParallelScavengeHeap::resize_old_gen(size_t desired_free_space) {
 695   if (UseAdaptiveGCBoundary) {
 696     if (size_policy()->bytes_absorbed_from_eden() != 0) {
 697       size_policy()->reset_bytes_absorbed_from_eden();
 698       return;  // The generation changed size already.
 699     }
 700     gens()->adjust_boundary_for_old_gen_needs(desired_free_space);
 701   }
 702 
 703   // Delegate the resize to the generation.
 704   _old_gen->resize(desired_free_space);
 705 }
 706 
 707 ParallelScavengeHeap::ParStrongRootsScope::ParStrongRootsScope() {
 708   // nothing particular
 709 }
 710 
 711 ParallelScavengeHeap::ParStrongRootsScope::~ParStrongRootsScope() {
 712   // nothing particular
 713 }


 656                         "->" SIZE_FORMAT "K"
 657                         "("  SIZE_FORMAT "K)",
 658                         prev_used / K, used() / K, capacity() / K);
 659   }
 660 }
 661 
 662 void ParallelScavengeHeap::trace_heap(GCWhen::Type when, GCTracer* gc_tracer) {
 663   const PSHeapSummary& heap_summary = create_ps_heap_summary();
 664   const MetaspaceSummary& metaspace_summary = create_metaspace_summary();
 665   gc_tracer->report_gc_heap_summary(when, heap_summary, metaspace_summary);
 666 }
 667 
 668 ParallelScavengeHeap* ParallelScavengeHeap::heap() {
 669   assert(_psh != NULL, "Uninitialized access to ParallelScavengeHeap::heap()");
 670   assert(_psh->kind() == CollectedHeap::ParallelScavengeHeap, "not a parallel scavenge heap");
 671   return _psh;
 672 }
 673 
 674 // Before delegating the resize to the young generation,
 675 // the reserved space for the young and old generations
 676 // may be changed to accommodate the desired resize.
 677 void ParallelScavengeHeap::resize_young_gen(size_t eden_size,
 678     size_t survivor_size) {
 679   if (UseAdaptiveGCBoundary) {
 680     if (size_policy()->bytes_absorbed_from_eden() != 0) {
 681       size_policy()->reset_bytes_absorbed_from_eden();
 682       return;  // The generation changed size already.
 683     }
 684     gens()->adjust_boundary_for_young_gen_needs(eden_size, survivor_size);
 685   }
 686 
 687   // Delegate the resize to the generation.
 688   _young_gen->resize(eden_size, survivor_size);
 689 }
 690 
 691 // Before delegating the resize to the old generation,
 692 // the reserved space for the young and old generations
 693 // may be changed to accommodate the desired resize.
 694 void ParallelScavengeHeap::resize_old_gen(size_t desired_free_space) {
 695   if (UseAdaptiveGCBoundary) {
 696     if (size_policy()->bytes_absorbed_from_eden() != 0) {
 697       size_policy()->reset_bytes_absorbed_from_eden();
 698       return;  // The generation changed size already.
 699     }
 700     gens()->adjust_boundary_for_old_gen_needs(desired_free_space);
 701   }
 702 
 703   // Delegate the resize to the generation.
 704   _old_gen->resize(desired_free_space);
 705 }
 706 
 707 ParallelScavengeHeap::ParStrongRootsScope::ParStrongRootsScope() {
 708   // nothing particular
 709 }
 710 
 711 ParallelScavengeHeap::ParStrongRootsScope::~ParStrongRootsScope() {
 712   // nothing particular
 713 }
src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File