Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[sgen] Remove unnecessary entries from remembered set function table.

  • Loading branch information...
commit d0ee020c473e7422c00c4659e97added41c28e53 1 parent a337176
Mark Probst schani authored
35 mono/metadata/sgen-gc.c
View
@@ -2536,9 +2536,6 @@ collect_nursery (SgenGrayQueue *unpin_queue, gboolean finish_up_concurrent_mark)
stat_minor_gcs++;
gc_stats.minor_gc_count ++;
- if (remset.prepare_for_minor_collection)
- remset.prepare_for_minor_collection ();
-
MONO_GC_CHECKPOINT_1 (GENERATION_NURSERY);
sgen_process_fin_stage_entries ();
@@ -2576,14 +2573,6 @@ collect_nursery (SgenGrayQueue *unpin_queue, gboolean finish_up_concurrent_mark)
sgen_check_consistency ();
sgen_workers_start_all_workers ();
-
- /*
- * Perform the sequential part of remembered set scanning.
- * This usually involves scanning global information that might later be produced by evacuation.
- */
- if (remset.begin_scan_remsets)
- remset.begin_scan_remsets (sgen_get_nursery_start (), nursery_next, WORKERS_DISTRIBUTE_GRAY_QUEUE);
-
sgen_workers_start_marking ();
frssjd = sgen_alloc_internal_dynamic (sizeof (FinishRememberedSetScanJobData), INTERNAL_MEM_WORKER_JOB_DATA, TRUE);
@@ -2726,8 +2715,7 @@ collect_nursery (SgenGrayQueue *unpin_queue, gboolean finish_up_concurrent_mark)
g_assert (sgen_gray_object_queue_is_empty (&gray_queue));
- if (remset.finish_minor_collection)
- remset.finish_minor_collection ();
+ remset.finish_minor_collection ();
check_scan_starts ();
@@ -3930,13 +3918,6 @@ mono_gc_deregister_root (char* addr)
unsigned int sgen_global_stop_count = 0;
-void
-sgen_fill_thread_info_for_suspend (SgenThreadInfo *info)
-{
- if (remset.fill_thread_info_for_suspend)
- remset.fill_thread_info_for_suspend (info);
-}
-
int
sgen_get_current_collection_generation (void)
{
@@ -4111,9 +4092,6 @@ sgen_thread_register (SgenThreadInfo* info, void *addr)
stack_end = info->stack_end;
#endif
- if (remset.register_thread)
- remset.register_thread (info);
-
SGEN_LOG (3, "registered thread %p (%p) stack end %p", info, (gpointer)mono_thread_info_get_tid (info), info->stack_end);
if (gc_callbacks.thread_attach_func)
@@ -4124,13 +4102,6 @@ sgen_thread_register (SgenThreadInfo* info, void *addr)
}
static void
-sgen_wbarrier_cleanup_thread (SgenThreadInfo *p)
-{
- if (remset.cleanup_thread)
- remset.cleanup_thread (p);
-}
-
-static void
sgen_thread_unregister (SgenThreadInfo *p)
{
/* If a delegate is passed to native code and invoked on a thread we dont
@@ -4181,7 +4152,6 @@ sgen_thread_unregister (SgenThreadInfo *p)
gc_callbacks.thread_detach_func (p->runtime_data);
p->runtime_data = NULL;
}
- sgen_wbarrier_cleanup_thread (p);
mono_threads_unregister_current_thread (p);
UNLOCK_GC;
@@ -5242,9 +5212,6 @@ mono_gc_base_init (void)
sgen_card_table_init (&remset);
- if (remset.register_thread)
- remset.register_thread (mono_thread_info_current ());
-
gc_initialized = 1;
}
9 mono/metadata/sgen-gc.h
View
@@ -378,8 +378,6 @@ void sgen_wait_for_suspend_ack (int count) MONO_INTERNAL;
gboolean sgen_park_current_thread_if_doing_handshake (SgenThreadInfo *p) MONO_INTERNAL;
void sgen_os_init (void) MONO_INTERNAL;
-void sgen_fill_thread_info_for_suspend (SgenThreadInfo *info) MONO_INTERNAL;
-
gboolean sgen_is_worker_thread (MonoNativeThreadId thread) MONO_INTERNAL;
void sgen_update_heap_boundaries (mword low, mword high) MONO_INTERNAL;
@@ -685,16 +683,11 @@ typedef struct {
void (*wbarrier_generic_nostore) (gpointer ptr);
void (*record_pointer) (gpointer ptr);
- void (*begin_scan_remsets) (void *start_nursery, void *end_nursery, SgenGrayQueue *queue); /* OPTIONAL */
void (*finish_scan_remsets) (void *start_nursery, void *end_nursery, SgenGrayQueue *queue);
- void (*register_thread) (SgenThreadInfo *p); /* OPTIONAL */
- void (*cleanup_thread) (SgenThreadInfo *p); /* OPTIONAL */
- void (*fill_thread_info_for_suspend) (SgenThreadInfo *info); /* OPTIONAL */
- void (*prepare_for_minor_collection) (void); /* OPTIONAL */
void (*prepare_for_major_collection) (void);
- void (*finish_minor_collection) (void); /* OPTIONAL */
+ void (*finish_minor_collection) (void);
gboolean (*find_address) (char *addr);
} SgenRemeberedSet;
2  mono/metadata/sgen-os-posix.c
View
@@ -66,8 +66,6 @@ suspend_thread (SgenThreadInfo *info, void *context)
if (0 && info->stop_count == stop_count)
return;
- sgen_fill_thread_info_for_suspend (info);
-
stack_start = context ? (char*) ARCH_SIGCTX_SP (context) - REDZONE_SIZE : NULL;
/* If stack_start is not within the limits, then don't set it
in info and we will be restarted. */
Please sign in to comment.
Something went wrong with that request. Please try again.