Skip to content

Commit

Permalink
[sgen] Don't scan cards in no-reference LOS objects.
Browse files Browse the repository at this point in the history
  • Loading branch information
schani committed Apr 16, 2014
1 parent 83b5158 commit 9f6ab33
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion mono/metadata/sgen-los.c
Original file line number Diff line number Diff line change
Expand Up @@ -548,10 +548,16 @@ sgen_los_scan_card_table (gboolean mod_union, SgenGrayQueue *queue)
LOSObject *obj;

for (obj = los_object_list; obj; obj = obj->next) {
guint8 *cards = NULL;
guint8 *cards;

if (!SGEN_OBJECT_HAS_REFERENCES (obj->data))
continue;

if (mod_union) {
cards = obj->cardtable_mod_union;
g_assert (cards);
} else {
cards = NULL;
}

sgen_cardtable_scan_object (obj->data, obj->size, cards, mod_union, queue);
Expand All @@ -564,6 +570,8 @@ sgen_los_update_cardtable_mod_union (void)
LOSObject *obj;

for (obj = los_object_list; obj; obj = obj->next) {
if (!SGEN_OBJECT_HAS_REFERENCES (obj->data))
continue;
obj->cardtable_mod_union = sgen_card_table_update_mod_union (obj->cardtable_mod_union,
obj->data, obj->size, NULL);
}
Expand Down

0 comments on commit 9f6ab33

Please sign in to comment.