vm: promote objects referenced from compiled code blocks directly to tenured in an aging collection

db4
Slava Pestov 2009-11-01 23:14:34 -06:00
parent f21199005d
commit 94e9230ba3
1 changed files with 9 additions and 8 deletions

View File

@ -28,7 +28,15 @@ void factor_vm::collect_aging()
full_unmarker());
current_gc->event->ended_card_scan(collector.cards_scanned,collector.decks_scanned);
current_gc->event->started_code_scan();
collector.trace_code_heap_roots(&code->points_to_aging);
current_gc->event->ended_code_scan(collector.code_blocks_scanned);
collector.tenure_reachable_objects();
current_gc->event->started_code_sweep();
update_code_heap_for_minor_gc(&code->points_to_aging);
current_gc->event->ended_code_sweep();
}
{
/* If collection fails here, do a to_tenured collection. */
@ -42,18 +50,11 @@ void factor_vm::collect_aging()
collector.trace_roots();
collector.trace_contexts();
current_gc->event->started_code_scan();
collector.trace_code_heap_roots(&code->points_to_aging);
current_gc->event->ended_code_scan(collector.code_blocks_scanned);
collector.cheneys_algorithm();
current_gc->event->started_code_sweep();
update_code_heap_for_minor_gc(&code->points_to_aging);
current_gc->event->ended_code_sweep();
data->reset_generation(&nursery);
code->points_to_nursery.clear();
code->points_to_aging.clear();
}
}