@@ -112,6 +112,24 @@ void ShenandoahConcurrentGC::entry_concurrent_update_refs_prepare(ShenandoahHeap
112112 heap->concurrent_prepare_for_update_refs ();
113113}
114114
115+ void ShenandoahConcurrentGC::entry_update_card_table () {
116+ ShenandoahHeap* const heap = ShenandoahHeap::heap ();
117+ TraceCollectorStats tcs (heap->monitoring_support ()->concurrent_collection_counters ());
118+
119+ static const char * msg = " Concurrent update cards" ;
120+ ShenandoahConcurrentPhase gc_phase (msg, ShenandoahPhaseTimings::conc_update_card_table);
121+ EventMark em (" %s" , msg);
122+
123+ ShenandoahWorkerScope scope (heap->workers (),
124+ ShenandoahWorkerPolicy::calc_workers_for_conc_evac (),
125+ " concurrent update cards" );
126+
127+ // Heap needs to be parsable here.
128+ // Also, parallel heap region iterate must have a phase set.
129+ assert (ShenandoahTimingsTracker::is_current_phase_valid (), " Current phase must be set" );
130+ ShenandoahGenerationalHeap::heap ()->old_generation ()->update_card_table ();
131+ }
132+
115133bool ShenandoahConcurrentGC::collect (GCCause::Cause cause) {
116134 ShenandoahHeap* const heap = ShenandoahHeap::heap ();
117135 _generation->ref_processor ()->set_soft_reference_policy (
@@ -206,6 +224,11 @@ bool ShenandoahConcurrentGC::collect(GCCause::Cause cause) {
206224
207225 // Perform update-refs phase.
208226 entry_concurrent_update_refs_prepare (heap);
227+
228+ if (ShenandoahHeap::heap ()->mode ()->is_generational ()) {
229+ entry_update_card_table ();
230+ }
231+
209232 if (ShenandoahVerify) {
210233 vmop_entry_init_update_refs ();
211234 }
0 commit comments