]>
granicus.if.org Git - gc/commit
Standalone profiling callback for threads suspend/resume
* alloc.c (GC_on_collection_event, GC_set_on_collection_event,
GC_get_on_collection_event): Move from misc.c.
* alloc.c (GC_on_collection_event): Make STATIC.
* include/private/gc_priv.h (GC_on_collection_event): Remove
declaration.
* include/gc.h (GC_on_collection_event_proc): Remove 2nd argument of
the callback.
* alloc.c (GC_try_to_collect_inner, GC_stopped_mark): Likewise.
* darwin_stop_world.c (GC_suspend_thread_list, GC_stop_world,
GC_thread_resume): Use GC_on_thread_event instead of
GC_on_collection_event.
* pthread_stop_world.c (GC_suspend_all, GC_start_world): Likewise.
* win32_threads.c (GC_suspend, GC_start_world): Likewise.
* include/gc.h (GC_on_collection_event_proc): Update comment.
* include/gc.h (GC_set_on_collection_event,
GC_get_on_collection_event): Add comment.
* include/gc.h (GC_on_thread_event_proc): New callback type (only if
GC_THREADS).
* include/gc.h (GC_set_on_thread_event, GC_get_on_thread_event): New
API function declaration (only if GC_THREADS).
* include/private/gc_priv.h (GC_on_thread_event): New variable
declaration (only if THREADS).
* misc.c (GC_on_thread_event): New global variable (only if THREADS).
* misc.c (GC_set_on_thread_event, GC_get_on_thread_event): New API
function (only if THREADS).