vm: debugging new card marking
parent
1ce39963fd
commit
236efe4881
|
@ -170,7 +170,7 @@ cell factor_vm::compute_relocation(relocation_entry rel, cell index, code_block
|
|||
case RT_HERE:
|
||||
{
|
||||
fixnum arg = untag_fixnum(ARG);
|
||||
return (arg >= 0 ? offset + arg : (cell)(compiled +1) - arg);
|
||||
return (arg >= 0 ? offset + arg : (cell)(compiled + 1) - arg);
|
||||
}
|
||||
case RT_THIS:
|
||||
return (cell)(compiled + 1);
|
||||
|
@ -372,7 +372,6 @@ struct code_block_relocator {
|
|||
{
|
||||
myvm->relocate_code_block_step(rel,index,compiled);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/* Perform all fixups on a code block */
|
||||
|
|
|
@ -102,6 +102,8 @@ struct copying_collector : collector<TargetGeneration,Policy> {
|
|||
{
|
||||
if(decks[deck_index] & mask)
|
||||
{
|
||||
this->myvm->gc_stats.decks_scanned++;
|
||||
|
||||
cell first_card = first_card_in_deck(deck_index);
|
||||
cell last_card = last_card_in_deck(deck_index);
|
||||
|
||||
|
@ -111,7 +113,9 @@ struct copying_collector : collector<TargetGeneration,Policy> {
|
|||
{
|
||||
if(cards[card_index] & mask)
|
||||
{
|
||||
if(card_start_address(card_index) >= end)
|
||||
this->myvm->gc_stats.cards_scanned++;
|
||||
|
||||
if(end < card_start_address(card_index))
|
||||
{
|
||||
start = gen->find_object_containing_card(card_index - gen_start_card);
|
||||
binary_start = start + this->myvm->binary_payload_start((object *)start);
|
||||
|
@ -134,17 +138,20 @@ scan_next_object: {
|
|||
if(end < card_end_address(card_index))
|
||||
{
|
||||
start = gen->next_object_after(this->myvm,start);
|
||||
if(!start) goto end;
|
||||
if(start)
|
||||
{
|
||||
binary_start = start + this->myvm->binary_payload_start((object *)start);
|
||||
end = start + this->myvm->untagged_object_size((object *)start);
|
||||
goto scan_next_object;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unmarker(card_dirty,&cards[card_index]);
|
||||
this->myvm->gc_stats.cards_scanned++;
|
||||
|
||||
deck_dirty |= card_dirty;
|
||||
|
||||
if(!start) goto end;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -155,7 +155,7 @@ void factor_vm::collect_growing_heap(cell requested_bytes, bool trace_contexts_p
|
|||
{
|
||||
data_heap *old = data;
|
||||
set_data_heap(data->grow(requested_bytes));
|
||||
collect_full(trace_contexts_p);
|
||||
collect_full_impl(trace_contexts_p);
|
||||
free_unmarked_code_blocks(true);
|
||||
delete old;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue