5 void factor_vm::collect_to_tenured() {
6 // Copy live objects from aging space to tenured space.
8 slot_visitor
<from_tenured_refs_copier
>
9 visitor(this, from_tenured_refs_copier(data
->tenured
, &mark_stack
));
11 visitor
.visit_all_roots();
12 gc_event
* event
= current_gc
->event
;
16 visitor
.visit_cards(data
->tenured
, card_points_to_aging
, 0xff);
18 event
->ended_phase(PHASE_CARD_SCAN
);
19 event
->cards_scanned
+= visitor
.cards_scanned
;
20 event
->decks_scanned
+= visitor
.decks_scanned
;
25 visitor
.visit_code_heap_roots(&code
->points_to_aging
);
27 event
->ended_phase(PHASE_CODE_SCAN
);
28 event
->code_blocks_scanned
+= code
->points_to_aging
.size();
30 visitor
.visit_mark_stack(&mark_stack
);
32 data
->reset_nursery();
34 code
->clear_remembered_set();