< prev index next >

src/hotspot/share/gc/shared/genCollectedHeap.cpp

Print this page
rev 60538 : imported patch jep387-misc.patch


  42 #include "gc/shared/gcTrace.hpp"
  43 #include "gc/shared/gcTraceTime.inline.hpp"
  44 #include "gc/shared/genArguments.hpp"
  45 #include "gc/shared/gcVMOperations.hpp"
  46 #include "gc/shared/genCollectedHeap.hpp"
  47 #include "gc/shared/genOopClosures.inline.hpp"
  48 #include "gc/shared/generationSpec.hpp"
  49 #include "gc/shared/gcInitLogger.hpp"
  50 #include "gc/shared/locationPrinter.inline.hpp"
  51 #include "gc/shared/oopStorage.inline.hpp"
  52 #include "gc/shared/oopStorageSet.inline.hpp"
  53 #include "gc/shared/oopStorageParState.inline.hpp"
  54 #include "gc/shared/scavengableNMethods.hpp"
  55 #include "gc/shared/space.hpp"
  56 #include "gc/shared/strongRootsScope.hpp"
  57 #include "gc/shared/weakProcessor.hpp"
  58 #include "gc/shared/workgroup.hpp"
  59 #include "memory/filemap.hpp"
  60 #include "memory/iterator.hpp"
  61 #include "memory/metaspaceCounters.hpp"

  62 #include "memory/resourceArea.hpp"
  63 #include "memory/universe.hpp"
  64 #include "oops/oop.inline.hpp"
  65 #include "runtime/biasedLocking.hpp"
  66 #include "runtime/handles.hpp"
  67 #include "runtime/handles.inline.hpp"
  68 #include "runtime/java.hpp"
  69 #include "runtime/vmThread.hpp"
  70 #include "services/memoryService.hpp"
  71 #include "utilities/autoRestore.hpp"
  72 #include "utilities/debug.hpp"
  73 #include "utilities/formatBuffer.hpp"
  74 #include "utilities/macros.hpp"
  75 #include "utilities/stack.inline.hpp"
  76 #include "utilities/vmError.hpp"
  77 #if INCLUDE_JVMCI
  78 #include "jvmci/jvmci.hpp"
  79 #endif
  80 
  81 GenCollectedHeap::GenCollectedHeap(Generation::Name young,


 645     // is set, by calling increment_total_collections above. However, we also need to
 646     // account Full collections that had "complete" unset.
 647     if (!complete) {
 648       increment_total_full_collections();
 649     }
 650 
 651     collect_generation(_old_gen,
 652                        full,
 653                        size,
 654                        is_tlab,
 655                        run_verification && VerifyGCLevel <= 1,
 656                        do_clear_all_soft_refs,
 657                        true);
 658 
 659     // Adjust generation sizes.
 660     _old_gen->compute_new_size();
 661     _young_gen->compute_new_size();
 662 
 663     // Delete metaspaces for unloaded class loaders and clean up loader_data graph
 664     ClassLoaderDataGraph::purge();
 665     MetaspaceUtils::verify_metrics();
 666     // Resize the metaspace capacity after full collections
 667     MetaspaceGC::compute_new_size();
 668     update_full_collections_completed();
 669 
 670     print_heap_change(pre_gc_values);
 671 
 672     // Track memory usage and detect low memory after GC finishes
 673     MemoryService::track_memory_usage();
 674 
 675     // Need to tell the epilogue code we are done with Full GC, regardless what was
 676     // the initial value for "complete" flag.
 677     gc_epilogue(true);
 678 
 679     BiasedLocking::restore_marks();
 680 
 681     print_heap_after_gc();
 682   }
 683 }
 684 
 685 bool GenCollectedHeap::should_do_full_collection(size_t size, bool full, bool is_tlab,




  42 #include "gc/shared/gcTrace.hpp"
  43 #include "gc/shared/gcTraceTime.inline.hpp"
  44 #include "gc/shared/genArguments.hpp"
  45 #include "gc/shared/gcVMOperations.hpp"
  46 #include "gc/shared/genCollectedHeap.hpp"
  47 #include "gc/shared/genOopClosures.inline.hpp"
  48 #include "gc/shared/generationSpec.hpp"
  49 #include "gc/shared/gcInitLogger.hpp"
  50 #include "gc/shared/locationPrinter.inline.hpp"
  51 #include "gc/shared/oopStorage.inline.hpp"
  52 #include "gc/shared/oopStorageSet.inline.hpp"
  53 #include "gc/shared/oopStorageParState.inline.hpp"
  54 #include "gc/shared/scavengableNMethods.hpp"
  55 #include "gc/shared/space.hpp"
  56 #include "gc/shared/strongRootsScope.hpp"
  57 #include "gc/shared/weakProcessor.hpp"
  58 #include "gc/shared/workgroup.hpp"
  59 #include "memory/filemap.hpp"
  60 #include "memory/iterator.hpp"
  61 #include "memory/metaspaceCounters.hpp"
  62 #include "memory/metaspace/metaspaceSizesSnapshot.hpp"
  63 #include "memory/resourceArea.hpp"
  64 #include "memory/universe.hpp"
  65 #include "oops/oop.inline.hpp"
  66 #include "runtime/biasedLocking.hpp"
  67 #include "runtime/handles.hpp"
  68 #include "runtime/handles.inline.hpp"
  69 #include "runtime/java.hpp"
  70 #include "runtime/vmThread.hpp"
  71 #include "services/memoryService.hpp"
  72 #include "utilities/autoRestore.hpp"
  73 #include "utilities/debug.hpp"
  74 #include "utilities/formatBuffer.hpp"
  75 #include "utilities/macros.hpp"
  76 #include "utilities/stack.inline.hpp"
  77 #include "utilities/vmError.hpp"
  78 #if INCLUDE_JVMCI
  79 #include "jvmci/jvmci.hpp"
  80 #endif
  81 
  82 GenCollectedHeap::GenCollectedHeap(Generation::Name young,


 646     // is set, by calling increment_total_collections above. However, we also need to
 647     // account Full collections that had "complete" unset.
 648     if (!complete) {
 649       increment_total_full_collections();
 650     }
 651 
 652     collect_generation(_old_gen,
 653                        full,
 654                        size,
 655                        is_tlab,
 656                        run_verification && VerifyGCLevel <= 1,
 657                        do_clear_all_soft_refs,
 658                        true);
 659 
 660     // Adjust generation sizes.
 661     _old_gen->compute_new_size();
 662     _young_gen->compute_new_size();
 663 
 664     // Delete metaspaces for unloaded class loaders and clean up loader_data graph
 665     ClassLoaderDataGraph::purge();
 666     DEBUG_ONLY(MetaspaceUtils::verify(false);)
 667     // Resize the metaspace capacity after full collections
 668     MetaspaceGC::compute_new_size();
 669     update_full_collections_completed();
 670 
 671     print_heap_change(pre_gc_values);
 672 
 673     // Track memory usage and detect low memory after GC finishes
 674     MemoryService::track_memory_usage();
 675 
 676     // Need to tell the epilogue code we are done with Full GC, regardless what was
 677     // the initial value for "complete" flag.
 678     gc_epilogue(true);
 679 
 680     BiasedLocking::restore_marks();
 681 
 682     print_heap_after_gc();
 683   }
 684 }
 685 
 686 bool GenCollectedHeap::should_do_full_collection(size_t size, bool full, bool is_tlab,


< prev index next >