75
76 // When collecting the permanent generation Method*s may be moving,
77 // so we either have to flush all bcp data or convert it into bci.
78 CodeCache::gc_prologue();
79
80 // Increment the invocation count
81 _total_invocations++;
82
83 // Capture used regions for each generation that will be
84 // subject to collection, so that card table adjustments can
85 // be made intelligently (see clear / invalidate further below).
86 gch->save_used_regions();
87
88 allocate_stacks();
89
90 mark_sweep_phase1(clear_all_softrefs);
91
92 mark_sweep_phase2();
93
94 // Don't add any more derived pointers during phase3
95 #if defined(COMPILER2) || INCLUDE_JVMCI
96 assert(DerivedPointerTable::is_active(), "Sanity");
97 DerivedPointerTable::set_active(false);
98 #endif
99
100 mark_sweep_phase3();
101
102 mark_sweep_phase4();
103
104 restore_marks();
105
106 // Set saved marks for allocation profiler (and other things? -- dld)
107 // (Should this be in general part?)
108 gch->save_marks();
109
110 deallocate_stacks();
111
112 // If compaction completely evacuated the young generation then we
113 // can clear the card table. Otherwise, we must invalidate
114 // it (consider all cards dirty). In the future, we might consider doing
115 // compaction within generations only, and doing card-table sliding.
|
75
76 // When collecting the permanent generation Method*s may be moving,
77 // so we either have to flush all bcp data or convert it into bci.
78 CodeCache::gc_prologue();
79
80 // Increment the invocation count
81 _total_invocations++;
82
83 // Capture used regions for each generation that will be
84 // subject to collection, so that card table adjustments can
85 // be made intelligently (see clear / invalidate further below).
86 gch->save_used_regions();
87
88 allocate_stacks();
89
90 mark_sweep_phase1(clear_all_softrefs);
91
92 mark_sweep_phase2();
93
94 // Don't add any more derived pointers during phase3
95 #if COMPILER2_OR_JVMCI
96 assert(DerivedPointerTable::is_active(), "Sanity");
97 DerivedPointerTable::set_active(false);
98 #endif
99
100 mark_sweep_phase3();
101
102 mark_sweep_phase4();
103
104 restore_marks();
105
106 // Set saved marks for allocation profiler (and other things? -- dld)
107 // (Should this be in general part?)
108 gch->save_marks();
109
110 deallocate_stacks();
111
112 // If compaction completely evacuated the young generation then we
113 // can clear the card table. Otherwise, we must invalidate
114 // it (consider all cards dirty). In the future, we might consider doing
115 // compaction within generations only, and doing card-table sliding.
|