38 #include "gc/shared/collectedHeap.inline.hpp"
39 #include "gc/shared/collectorCounters.hpp"
40 #include "gc/shared/gcId.hpp"
41 #include "gc/shared/gcLocker.hpp"
42 #include "gc/shared/gcPolicyCounters.hpp"
43 #include "gc/shared/gcTrace.hpp"
44 #include "gc/shared/gcTraceTime.inline.hpp"
45 #include "gc/shared/genArguments.hpp"
46 #include "gc/shared/gcVMOperations.hpp"
47 #include "gc/shared/genCollectedHeap.hpp"
48 #include "gc/shared/genOopClosures.inline.hpp"
49 #include "gc/shared/generationSpec.hpp"
50 #include "gc/shared/oopStorageParState.inline.hpp"
51 #include "gc/shared/scavengableNMethods.hpp"
52 #include "gc/shared/space.hpp"
53 #include "gc/shared/strongRootsScope.hpp"
54 #include "gc/shared/weakProcessor.hpp"
55 #include "gc/shared/workgroup.hpp"
56 #include "memory/filemap.hpp"
57 #include "memory/metaspaceCounters.hpp"
58 #include "memory/resourceArea.hpp"
59 #include "memory/universe.hpp"
60 #include "oops/oop.inline.hpp"
61 #include "runtime/biasedLocking.hpp"
62 #include "runtime/flags/flagSetting.hpp"
63 #include "runtime/handles.hpp"
64 #include "runtime/handles.inline.hpp"
65 #include "runtime/java.hpp"
66 #include "runtime/vmThread.hpp"
67 #include "services/management.hpp"
68 #include "services/memoryService.hpp"
69 #include "utilities/debug.hpp"
70 #include "utilities/formatBuffer.hpp"
71 #include "utilities/macros.hpp"
72 #include "utilities/stack.inline.hpp"
73 #include "utilities/vmError.hpp"
74 #if INCLUDE_JVMCI
75 #include "jvmci/jvmci.hpp"
76 #endif
77
662 // is set, by calling increment_total_collections above. However, we also need to
663 // account Full collections that had "complete" unset.
664 if (!complete) {
665 increment_total_full_collections();
666 }
667
668 collect_generation(_old_gen,
669 full,
670 size,
671 is_tlab,
672 run_verification && VerifyGCLevel <= 1,
673 do_clear_all_soft_refs,
674 true);
675
676 // Adjust generation sizes.
677 _old_gen->compute_new_size();
678 _young_gen->compute_new_size();
679
680 // Delete metaspaces for unloaded class loaders and clean up loader_data graph
681 ClassLoaderDataGraph::purge();
682 MetaspaceUtils::verify_metrics();
683 // Resize the metaspace capacity after full collections
684 MetaspaceGC::compute_new_size();
685 update_full_collections_completed();
686
687 print_heap_change(young_prev_used, old_prev_used);
688 MetaspaceUtils::print_metaspace_change(prev_meta_sizes);
689
690 // Track memory usage and detect low memory after GC finishes
691 MemoryService::track_memory_usage();
692
693 // Need to tell the epilogue code we are done with Full GC, regardless what was
694 // the initial value for "complete" flag.
695 gc_epilogue(true);
696
697 BiasedLocking::restore_marks();
698
699 print_heap_after_gc();
700 }
701
702 #ifdef TRACESPINNING
|
38 #include "gc/shared/collectedHeap.inline.hpp"
39 #include "gc/shared/collectorCounters.hpp"
40 #include "gc/shared/gcId.hpp"
41 #include "gc/shared/gcLocker.hpp"
42 #include "gc/shared/gcPolicyCounters.hpp"
43 #include "gc/shared/gcTrace.hpp"
44 #include "gc/shared/gcTraceTime.inline.hpp"
45 #include "gc/shared/genArguments.hpp"
46 #include "gc/shared/gcVMOperations.hpp"
47 #include "gc/shared/genCollectedHeap.hpp"
48 #include "gc/shared/genOopClosures.inline.hpp"
49 #include "gc/shared/generationSpec.hpp"
50 #include "gc/shared/oopStorageParState.inline.hpp"
51 #include "gc/shared/scavengableNMethods.hpp"
52 #include "gc/shared/space.hpp"
53 #include "gc/shared/strongRootsScope.hpp"
54 #include "gc/shared/weakProcessor.hpp"
55 #include "gc/shared/workgroup.hpp"
56 #include "memory/filemap.hpp"
57 #include "memory/metaspaceCounters.hpp"
58 #include "memory/metaspace/metaspaceSizesSnapshot.hpp"
59 #include "memory/resourceArea.hpp"
60 #include "memory/universe.hpp"
61 #include "oops/oop.inline.hpp"
62 #include "runtime/biasedLocking.hpp"
63 #include "runtime/flags/flagSetting.hpp"
64 #include "runtime/handles.hpp"
65 #include "runtime/handles.inline.hpp"
66 #include "runtime/java.hpp"
67 #include "runtime/vmThread.hpp"
68 #include "services/management.hpp"
69 #include "services/memoryService.hpp"
70 #include "utilities/debug.hpp"
71 #include "utilities/formatBuffer.hpp"
72 #include "utilities/macros.hpp"
73 #include "utilities/stack.inline.hpp"
74 #include "utilities/vmError.hpp"
75 #if INCLUDE_JVMCI
76 #include "jvmci/jvmci.hpp"
77 #endif
78
663 // is set, by calling increment_total_collections above. However, we also need to
664 // account Full collections that had "complete" unset.
665 if (!complete) {
666 increment_total_full_collections();
667 }
668
669 collect_generation(_old_gen,
670 full,
671 size,
672 is_tlab,
673 run_verification && VerifyGCLevel <= 1,
674 do_clear_all_soft_refs,
675 true);
676
677 // Adjust generation sizes.
678 _old_gen->compute_new_size();
679 _young_gen->compute_new_size();
680
681 // Delete metaspaces for unloaded class loaders and clean up loader_data graph
682 ClassLoaderDataGraph::purge();
683 DEBUG_ONLY(MetaspaceUtils::verify(false);)
684 // Resize the metaspace capacity after full collections
685 MetaspaceGC::compute_new_size();
686 update_full_collections_completed();
687
688 print_heap_change(young_prev_used, old_prev_used);
689 MetaspaceUtils::print_metaspace_change(prev_meta_sizes);
690
691 // Track memory usage and detect low memory after GC finishes
692 MemoryService::track_memory_usage();
693
694 // Need to tell the epilogue code we are done with Full GC, regardless what was
695 // the initial value for "complete" flag.
696 gc_epilogue(true);
697
698 BiasedLocking::restore_marks();
699
700 print_heap_after_gc();
701 }
702
703 #ifdef TRACESPINNING
|