static long long stat_major_blocks_freed = 0;
static long long stat_major_objects_evacuated = 0;
static long long stat_time_wait_for_sweep = 0;
-#ifdef SGEN_PARALLEL_MARK
-static long long stat_slots_allocated_in_vain = 0;
-#endif
static gboolean ms_sweep_in_progress = FALSE;
static MonoNativeThreadId ms_sweep_thread;
for (i = 0; i < num_block_obj_sizes; ++i)
if (block_obj_sizes [i] >= size)
return i;
- g_assert_not_reached ();
+ g_error ("no object of size %d\n", size);
}
#define FREE_BLOCKS_FROM(lists,p,r) (lists [((p) ? MS_BLOCK_FLAG_PINNED : 0) | ((r) ? MS_BLOCK_FLAG_REFS : 0)])
if (nursery_align)
g_assert (nursery_align % MS_BLOCK_SIZE == 0);
- nursery_start = mono_sgen_alloc_os_memory_aligned (alloc_size, nursery_align ? nursery_align : MS_BLOCK_SIZE, TRUE);
+ nursery_start = sgen_alloc_os_memory_aligned (alloc_size, nursery_align ? nursery_align : MS_BLOCK_SIZE, TRUE);
ms_heap_start = nursery_start + nursery_size;
ms_heap_end = ms_heap_start + major_heap_size;
- block_infos = mono_sgen_alloc_internal_dynamic (sizeof (MSBlockInfo) * ms_heap_num_blocks, INTERNAL_MEM_MS_BLOCK_INFO);
+ block_infos = sgen_alloc_internal_dynamic (sizeof (MSBlockInfo) * ms_heap_num_blocks, INTERNAL_MEM_MS_BLOCK_INFO);
for (i = 0; i < ms_heap_num_blocks; ++i) {
block_infos [i].block = ms_heap_start + i * MS_BLOCK_SIZE;
{
char *start;
if (nursery_align)
- start = mono_sgen_alloc_os_memory_aligned (nursery_size, nursery_align, TRUE);
+ start = sgen_alloc_os_memory_aligned (nursery_size, nursery_align, TRUE);
else
- start = mono_sgen_alloc_os_memory (nursery_size, TRUE);
+ start = sgen_alloc_os_memory (nursery_size, TRUE);
return start;
}
static void
update_heap_boundaries_for_block (MSBlockInfo *block)
{
- mono_sgen_update_heap_boundaries ((mword)block->block, (mword)block->block + MS_BLOCK_SIZE);
+ sgen_update_heap_boundaries ((mword)block->block, (mword)block->block + MS_BLOCK_SIZE);
}
#ifdef FIXED_HEAP
empty_blocks = block;
block->used = FALSE;
block->zeroed = FALSE;
- mono_sgen_release_space (MS_BLOCK_SIZE, SPACE_MAJOR);
+ sgen_release_space (MS_BLOCK_SIZE, SPACE_MAJOR);
}
#else
static void*
retry:
if (!empty_blocks) {
- p = mono_sgen_alloc_os_memory_aligned (MS_BLOCK_SIZE * MS_BLOCK_ALLOC_NUM, MS_BLOCK_SIZE, TRUE);
+ p = sgen_alloc_os_memory_aligned (MS_BLOCK_SIZE * MS_BLOCK_ALLOC_NUM, MS_BLOCK_SIZE, TRUE);
for (i = 0; i < MS_BLOCK_ALLOC_NUM; ++i) {
block = p;
{
void *empty;
- mono_sgen_release_space (MS_BLOCK_SIZE, SPACE_MAJOR);
+ sgen_release_space (MS_BLOCK_SIZE, SPACE_MAJOR);
memset (block, 0, MS_BLOCK_SIZE);
do {
char *obj_start;
int i;
- if (!mono_sgen_try_alloc_space (MS_BLOCK_SIZE, SPACE_MAJOR))
+ if (!sgen_try_alloc_space (MS_BLOCK_SIZE, SPACE_MAJOR))
return FALSE;
#ifdef FIXED_HEAP
info = ms_get_empty_block ();
#else
- info = mono_sgen_alloc_internal (INTERNAL_MEM_MS_BLOCK_INFO);
+ info = sgen_alloc_internal (INTERNAL_MEM_MS_BLOCK_INFO);
#endif
DEBUG (9, g_assert (count >= 2));
info->pinned = pinned;
info->has_references = has_references;
info->has_pinned = pinned;
- info->is_to_space = (mono_sgen_get_current_collection_generation () == GENERATION_OLD);
+ info->is_to_space = (sgen_get_current_collection_generation () == GENERATION_OLD); /*FIXME WHY??? */
#ifndef FIXED_HEAP
info->block = ms_get_empty_block ();
HEAVY_STAT (++stat_objects_alloced_degraded);
HEAVY_STAT (stat_bytes_alloced_degraded += size);
g_assert (num_major_sections >= old_num_sections);
- mono_sgen_register_major_sections_alloced (num_major_sections - old_num_sections);
+ sgen_register_major_sections_alloced (num_major_sections - old_num_sections);
}
return obj;
}
mword objsize;
#endif
- if (mono_sgen_ptr_in_nursery (obj))
+ if (sgen_ptr_in_nursery (obj))
return FALSE;
#ifdef FIXED_HEAP
if (!MS_PTR_IN_SMALL_MAJOR_HEAP (obj))
return FALSE;
#else
- objsize = SGEN_ALIGN_UP (mono_sgen_safe_object_get_size ((MonoObject*)obj));
+ objsize = SGEN_ALIGN_UP (sgen_safe_object_get_size ((MonoObject*)obj));
/* LOS */
if (objsize > SGEN_MAX_SMALL_OBJ_SIZE)
} END_FOREACH_BLOCK;
}
+static gboolean
+major_is_valid_object (char *object)
+{
+ MSBlockInfo *block;
+
+ ms_wait_for_sweep_done ();
+ FOREACH_BLOCK (block) {
+ int idx;
+ char *obj;
+
+ if ((block->block > object) || ((block->block + MS_BLOCK_SIZE) <= object))
+ continue;
+
+ idx = MS_BLOCK_OBJ_INDEX (object, block);
+ obj = (char*)MS_BLOCK_OBJ (block, idx);
+ if (obj != object)
+ return FALSE;
+ return MS_OBJ_ALLOCED (obj, block);
+ } END_FOREACH_BLOCK;
+
+ return FALSE;
+}
+
+
+static gboolean
+major_describe_pointer (char *ptr)
+{
+ MSBlockInfo *block;
+
+ FOREACH_BLOCK (block) {
+ int idx;
+ char *obj;
+ gboolean live;
+ MonoVTable *vtable;
+
+ if ((block->block > ptr) || ((block->block + MS_BLOCK_SIZE) <= ptr))
+ continue;
+
+ fprintf (gc_debug_file, "major-ptr (block %p sz %d pin %d ref %d) ",
+ block->block, block->obj_size, block->pinned, block->has_references);
+
+ idx = MS_BLOCK_OBJ_INDEX (ptr, block);
+ obj = (char*)MS_BLOCK_OBJ (block, idx);
+ live = MS_OBJ_ALLOCED (obj, block);
+ vtable = live ? (MonoVTable*)SGEN_LOAD_VTABLE (obj) : NULL;
+
+ if (obj == ptr) {
+ if (live)
+ fprintf (gc_debug_file, "(object %s.%s)", vtable->klass->name_space, vtable->klass->name);
+ else
+ fprintf (gc_debug_file, "(dead-object)");
+ } else {
+ if (live)
+ fprintf (gc_debug_file, "(interior-ptr offset %td of %p %s.%s)",
+ ptr - obj,
+ obj, vtable->klass->name_space, vtable->klass->name);
+ else
+ fprintf (gc_debug_file, "(dead-interior-ptr to %td to %p)",
+ ptr - obj, obj);
+ }
+
+ return TRUE;
+ } END_FOREACH_BLOCK;
+
+ return FALSE;
+}
+
static void
major_check_scan_starts (void)
{
start = i;
} else {
if (start >= 0) {
- mono_sgen_dump_occupied (MS_BLOCK_OBJ (block, start), MS_BLOCK_OBJ (block, i), block->block);
+ sgen_dump_occupied (MS_BLOCK_OBJ (block, start), MS_BLOCK_OBJ (block, i), block->block);
start = -1;
}
}
MS_SET_MARK_BIT ((block), __word, __bit); \
if ((block)->has_references) \
GRAY_OBJECT_ENQUEUE ((queue), (obj)); \
- binary_protocol_mark ((obj), (gpointer)LOAD_VTABLE ((obj)), mono_sgen_safe_object_get_size ((MonoObject*)(obj))); \
+ binary_protocol_mark ((obj), (gpointer)LOAD_VTABLE ((obj)), sgen_safe_object_get_size ((MonoObject*)(obj))); \
} \
} while (0)
#define MS_MARK_OBJECT_AND_ENQUEUE(obj,block,queue) do { \
MS_SET_MARK_BIT ((block), __word, __bit); \
if ((block)->has_references) \
GRAY_OBJECT_ENQUEUE ((queue), (obj)); \
- binary_protocol_mark ((obj), (gpointer)LOAD_VTABLE ((obj)), mono_sgen_safe_object_get_size ((MonoObject*)(obj))); \
+ binary_protocol_mark ((obj), (gpointer)LOAD_VTABLE ((obj)), sgen_safe_object_get_size ((MonoObject*)(obj))); \
} \
} while (0)
#define MS_PAR_MARK_OBJECT_AND_ENQUEUE(obj,block,queue) do { \
if (!__was_marked) { \
if ((block)->has_references) \
GRAY_OBJECT_ENQUEUE ((queue), (obj)); \
- binary_protocol_mark ((obj), (gpointer)LOAD_VTABLE ((obj)), mono_sgen_safe_object_get_size ((MonoObject*)(obj))); \
+ binary_protocol_mark ((obj), (gpointer)LOAD_VTABLE ((obj)), sgen_safe_object_get_size ((MonoObject*)(obj))); \
} \
} while (0)
static void
-pin_major_object (void *obj, SgenGrayQueue *queue)
+pin_major_object (char *obj, SgenGrayQueue *queue)
{
MSBlockInfo *block = MS_BLOCK_FOR_OBJ (obj);
block->has_pinned = TRUE;
MS_MARK_OBJECT_AND_ENQUEUE (obj, block, queue);
}
-#ifdef SGEN_PARALLEL_MARK
-static void
-pin_or_update_par (void **ptr, void *obj, MonoVTable *vt, SgenGrayQueue *queue)
-{
- for (;;) {
- mword vtable_word;
- gboolean major_pinned = FALSE;
-
- if (mono_sgen_ptr_in_nursery (obj)) {
- if (SGEN_CAS_PTR (obj, (void*)((mword)vt | SGEN_PINNED_BIT), vt) == vt) {
- mono_sgen_pin_object (obj, queue);
- break;
- }
- } else {
- pin_major_object (obj, queue);
- major_pinned = TRUE;
- }
-
- vtable_word = *(mword*)obj;
- /*someone else forwarded it, update the pointer and bail out*/
- if (vtable_word & SGEN_FORWARDED_BIT) {
- *ptr = (void*)(vtable_word & ~SGEN_VTABLE_BITS_MASK);
- break;
- }
-
- /*someone pinned it, nothing to do.*/
- if (vtable_word & SGEN_PINNED_BIT || major_pinned)
- break;
- }
-}
-#endif
-
#include "sgen-major-copy-object.h"
#ifdef SGEN_PARALLEL_MARK
DEBUG (9, g_assert (obj));
DEBUG (9, g_assert (current_collection_generation == GENERATION_OLD));
- if (mono_sgen_ptr_in_nursery (obj)) {
+ if (sgen_ptr_in_nursery (obj)) {
int word, bit;
gboolean has_references;
void *destination;
if (vtable_word & SGEN_PINNED_BIT)
return;
+ /* An object in the nursery To Space has already been copied and grayed. Nothing to do. */
+ if (sgen_nursery_is_to_space (obj))
+ return;
+
HEAVY_STAT (++stat_objects_copied_major);
do_copy_object:
- objsize = SGEN_ALIGN_UP (mono_sgen_par_object_get_size (vt, (MonoObject*)obj));
+ objsize = SGEN_ALIGN_UP (sgen_par_object_get_size (vt, (MonoObject*)obj));
has_references = SGEN_VTABLE_HAS_REFERENCES (vt);
- destination = alloc_obj_par (objsize, FALSE, has_references);
+ destination = sgen_minor_collector.par_alloc_for_promotion (obj, objsize, has_references);
if (G_UNLIKELY (!destination)) {
- if (!mono_sgen_ptr_in_nursery (obj)) {
+ if (!sgen_ptr_in_nursery (obj)) {
int size_index;
block = MS_BLOCK_FOR_OBJ (obj);
size_index = block->obj_size_index;
evacuate_block_obj_sizes [size_index] = FALSE;
}
- pin_or_update_par (ptr, obj, vt, queue);
- mono_sgen_set_pinned_from_failed_allocation (objsize);
+ sgen_parallel_pin_or_update (ptr, obj, vt, queue);
+ sgen_set_pinned_from_failed_allocation (objsize);
return;
}
* FIXME: If we make major_alloc_object() give
* us the block info, too, we won't have to
* re-fetch it here.
+ *
+ * FIXME (2): We should rework this to avoid all those nursery checks.
*/
- block = MS_BLOCK_FOR_OBJ (obj);
- MS_CALC_MARK_BIT (word, bit, obj);
- DEBUG (9, g_assert (!MS_MARK_BIT (block, word, bit)));
- MS_PAR_SET_MARK_BIT (was_marked, block, word, bit);
+ /*
+ * For the split nursery allocator the object
+ * might still be in the nursery despite
+ * having being promoted, in which case we
+ * can't mark it.
+ */
+ if (!sgen_ptr_in_nursery (obj)) {
+ block = MS_BLOCK_FOR_OBJ (obj);
+ MS_CALC_MARK_BIT (word, bit, obj);
+ DEBUG (9, g_assert (!MS_MARK_BIT (block, word, bit)));
+ MS_PAR_SET_MARK_BIT (was_marked, block, word, bit);
+ }
} else {
/*
* FIXME: We have allocated destination, but
*ptr = obj;
- ++stat_slots_allocated_in_vain;
+ HEAVY_STAT (++stat_slots_allocated_in_vain);
}
} else {
#ifdef FIXED_HEAP
*ptr = (void*)vt;
return;
}
- objsize = SGEN_ALIGN_UP (mono_sgen_par_object_get_size (vt, (MonoObject*)obj));
+ objsize = SGEN_ALIGN_UP (sgen_par_object_get_size (vt, (MonoObject*)obj));
if (objsize <= SGEN_MAX_SMALL_OBJ_SIZE)
#endif
if (vtable_word & SGEN_PINNED_BIT)
return;
- binary_protocol_pin (obj, vt, mono_sgen_safe_object_get_size ((MonoObject*)obj));
+ binary_protocol_pin (obj, vt, sgen_safe_object_get_size ((MonoObject*)obj));
if (SGEN_CAS_PTR (obj, (void*)(vtable_word | SGEN_PINNED_BIT), (void*)vtable_word) == (void*)vtable_word) {
if (SGEN_VTABLE_HAS_REFERENCES (vt))
GRAY_OBJECT_ENQUEUE (queue, obj);
DEBUG (9, g_assert (obj));
DEBUG (9, g_assert (current_collection_generation == GENERATION_OLD));
- if (mono_sgen_ptr_in_nursery (obj)) {
+ if (sgen_ptr_in_nursery (obj)) {
int word, bit;
char *forwarded, *old_obj;
if (SGEN_OBJECT_IS_PINNED (obj))
return;
+ /* An object in the nursery To Space has already been copied and grayed. Nothing to do. */
+ if (sgen_nursery_is_to_space (obj))
+ return;
+
HEAVY_STAT (++stat_objects_copied_major);
do_copy_object:
obj = copy_object_no_checks (obj, queue);
if (G_UNLIKELY (old_obj == obj)) {
/*If we fail to evacuate an object we just stop doing it for a given block size as all other will surely fail too.*/
- if (!mono_sgen_ptr_in_nursery (obj)) {
+ if (!sgen_ptr_in_nursery (obj)) {
int size_index;
block = MS_BLOCK_FOR_OBJ (obj);
size_index = block->obj_size_index;
* we have that, we can let the allocation function
* give us the block info, too, and we won't have to
* re-fetch it.
+ *
+ * FIXME (2): We should rework this to avoid all those nursery checks.
+ */
+ /*
+ * For the split nursery allocator the object might
+ * still be in the nursery despite having being
+ * promoted, in which case we can't mark it.
*/
- block = MS_BLOCK_FOR_OBJ (obj);
- MS_CALC_MARK_BIT (word, bit, obj);
- DEBUG (9, g_assert (!MS_MARK_BIT (block, word, bit)));
- MS_SET_MARK_BIT (block, word, bit);
+ if (!sgen_ptr_in_nursery (obj)) {
+ block = MS_BLOCK_FOR_OBJ (obj);
+ MS_CALC_MARK_BIT (word, bit, obj);
+ DEBUG (9, g_assert (!MS_MARK_BIT (block, word, bit)));
+ MS_SET_MARK_BIT (block, word, bit);
+ }
} else {
char *forwarded;
#ifdef FIXED_HEAP
return;
}
- objsize = SGEN_ALIGN_UP (mono_sgen_safe_object_get_size ((MonoObject*)obj));
+ objsize = SGEN_ALIGN_UP (sgen_safe_object_get_size ((MonoObject*)obj));
if (objsize <= SGEN_MAX_SMALL_OBJ_SIZE)
#endif
} else {
if (SGEN_OBJECT_IS_PINNED (obj))
return;
- binary_protocol_pin (obj, (gpointer)SGEN_LOAD_VTABLE (obj), mono_sgen_safe_object_get_size ((MonoObject*)obj));
+ binary_protocol_pin (obj, (gpointer)SGEN_LOAD_VTABLE (obj), sgen_safe_object_get_size ((MonoObject*)obj));
SGEN_PIN_OBJECT (obj);
/* FIXME: only enqueue if object has references */
GRAY_OBJECT_ENQUEUE (queue, obj);
#else
ms_free_block (block->block);
- mono_sgen_free_internal (block, INTERNAL_MEM_MS_BLOCK_INFO);
+ sgen_free_internal (block, INTERNAL_MEM_MS_BLOCK_INFO);
#endif
--num_major_sections;
while ((result = MONO_SEM_WAIT (&ms_sweep_cmd_semaphore)) != 0) {
if (errno != EINTR)
- g_error ("MONO_SEM_WAIT");
+ g_error ("MONO_SEM_WAIT FAILED with %d errno %d (%s)", result, errno, strerror (errno));
}
ms_sweep ();
#ifdef MARKSWEEP_CONSISTENCY_CHECK
consistency_check ();
#endif
- mono_sgen_register_major_sections_alloced (num_major_sections - old_num_major_sections);
+ sgen_register_major_sections_alloced (num_major_sections - old_num_major_sections);
}
static void
major_have_computer_minor_collection_allowance (void)
{
#ifndef FIXED_HEAP
- int section_reserve = mono_sgen_get_minor_collection_allowance () / MS_BLOCK_SIZE;
+ int section_reserve = sgen_get_minor_collection_allowance () / MS_BLOCK_SIZE;
g_assert (have_swept);
ms_wait_for_sweep_done ();
while (num_empty_blocks > section_reserve) {
void *next = *(void**)empty_blocks;
- mono_sgen_free_os_memory (empty_blocks, MS_BLOCK_SIZE);
+ sgen_free_os_memory (empty_blocks, MS_BLOCK_SIZE);
empty_blocks = next;
/*
* Needs not be atomic because this is running
MSBlockInfo *block;
FOREACH_BLOCK (block) {
- block->pin_queue_start = mono_sgen_find_optimized_pin_queue_area (block->block + MS_BLOCK_SKIP, block->block + MS_BLOCK_SIZE,
+ block->pin_queue_start = sgen_find_optimized_pin_queue_area (block->block + MS_BLOCK_SKIP, block->block + MS_BLOCK_SIZE,
&block->pin_queue_num_entries);
} END_FOREACH_BLOCK;
}
major_scan_card_table (SgenGrayQueue *queue)
{
MSBlockInfo *block;
+ ScanObjectFunc scan_func = sgen_get_current_object_ops ()->scan_object;
FOREACH_BLOCK (block) {
int block_obj_size;
obj += block_obj_size;
}
} else {
- ScanObjectFunc scan_func = mono_sgen_get_minor_scan_object ();
guint8 *card_data, *card_base;
guint8 *card_data_end;
{
int i;
for (i = 0; i < MS_BLOCK_TYPE_MAX; ++i)
- lists [i] = mono_sgen_alloc_internal_dynamic (sizeof (MSBlockInfo*) * num_block_obj_sizes, INTERNAL_MEM_MS_TABLES);
+ lists [i] = sgen_alloc_internal_dynamic (sizeof (MSBlockInfo*) * num_block_obj_sizes, INTERNAL_MEM_MS_TABLES);
}
#ifdef SGEN_PARALLEL_MARK
post_param_init (void)
{
if (concurrent_sweep) {
- if (mono_native_thread_create (&ms_sweep_thread, ms_sweep_thread_func, NULL)) {
+ if (!mono_native_thread_create (&ms_sweep_thread, ms_sweep_thread_func, NULL)) {
fprintf (stderr, "Error: Could not create sweep thread.\n");
exit (1);
}
void
#ifdef SGEN_PARALLEL_MARK
#ifdef FIXED_HEAP
-mono_sgen_marksweep_fixed_par_init
+sgen_marksweep_fixed_par_init
#else
-mono_sgen_marksweep_par_init
+sgen_marksweep_par_init
#endif
#else
#ifdef FIXED_HEAP
-mono_sgen_marksweep_fixed_init
+sgen_marksweep_fixed_init
#else
-mono_sgen_marksweep_init
+sgen_marksweep_init
#endif
#endif
(SgenMajorCollector *collector)
int i;
#ifndef FIXED_HEAP
- mono_sgen_register_fixed_internal_mem_type (INTERNAL_MEM_MS_BLOCK_INFO, sizeof (MSBlockInfo));
+ sgen_register_fixed_internal_mem_type (INTERNAL_MEM_MS_BLOCK_INFO, sizeof (MSBlockInfo));
#endif
num_block_obj_sizes = ms_calculate_block_obj_sizes (MS_BLOCK_OBJ_SIZE_FACTOR, NULL);
- block_obj_sizes = mono_sgen_alloc_internal_dynamic (sizeof (int) * num_block_obj_sizes, INTERNAL_MEM_MS_TABLES);
+ block_obj_sizes = sgen_alloc_internal_dynamic (sizeof (int) * num_block_obj_sizes, INTERNAL_MEM_MS_TABLES);
ms_calculate_block_obj_sizes (MS_BLOCK_OBJ_SIZE_FACTOR, block_obj_sizes);
- evacuate_block_obj_sizes = mono_sgen_alloc_internal_dynamic (sizeof (gboolean) * num_block_obj_sizes, INTERNAL_MEM_MS_TABLES);
+ evacuate_block_obj_sizes = sgen_alloc_internal_dynamic (sizeof (gboolean) * num_block_obj_sizes, INTERNAL_MEM_MS_TABLES);
for (i = 0; i < num_block_obj_sizes; ++i)
evacuate_block_obj_sizes [i] = FALSE;
mono_counters_register ("# major objects evacuated", MONO_COUNTER_GC | MONO_COUNTER_LONG, &stat_major_objects_evacuated);
mono_counters_register ("Wait for sweep time", MONO_COUNTER_GC | MONO_COUNTER_TIME_INTERVAL, &stat_time_wait_for_sweep);
#ifdef SGEN_PARALLEL_MARK
- mono_counters_register ("Slots allocated in vain", MONO_COUNTER_GC | MONO_COUNTER_LONG, &stat_slots_allocated_in_vain);
-
#ifndef HAVE_KW_THREAD
mono_native_tls_alloc (&workers_free_block_lists_key, NULL);
#endif
collector->is_object_live = major_is_object_live;
collector->alloc_small_pinned_obj = major_alloc_small_pinned_obj;
collector->alloc_degraded = major_alloc_degraded;
- collector->copy_or_mark_object = major_copy_or_mark_object;
+
collector->alloc_object = major_alloc_object;
#ifdef SGEN_PARALLEL_MARK
collector->par_alloc_object = major_par_alloc_object;
collector->free_non_pinned_object = major_free_non_pinned_object;
collector->find_pin_queue_start_ends = major_find_pin_queue_start_ends;
collector->pin_objects = major_pin_objects;
+ collector->pin_major_object = pin_major_object;
#ifdef SGEN_HAVE_CARDTABLE
collector->scan_card_table = major_scan_card_table;
collector->iterate_live_block_ranges = (void*)(void*) major_iterate_live_block_ranges;
collector->print_gc_param_usage = major_print_gc_param_usage;
collector->is_worker_thread = major_is_worker_thread;
collector->post_param_init = post_param_init;
+ collector->is_valid_object = major_is_valid_object;
+ collector->describe_pointer = major_describe_pointer;
- FILL_COLLECTOR_COPY_OBJECT (collector);
- FILL_COLLECTOR_SCAN_OBJECT (collector);
+ collector->major_ops.copy_or_mark_object = major_copy_or_mark_object;
+ collector->major_ops.scan_object = major_scan_object;
#ifdef SGEN_HAVE_CARDTABLE
/*cardtable requires major pages to be 8 cards aligned*/