summaryrefslogtreecommitdiff
path: root/mark_rts.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2018-08-15 00:50:59 +0300
committerIvan Maidanski <ivmai@mail.ru>2018-08-15 00:50:59 +0300
commit06009b0a0858b7367fd6cc2ed879c48593f4d5ea (patch)
tree7778f59bc10d0198e058a1d3ed437ce2bb0070cc /mark_rts.c
parenta83bd4aa808609c544ec9a78d1cd0ed0b85cbfb2 (diff)
downloadbdwgc-06009b0a0858b7367fd6cc2ed879c48593f4d5ea.tar.gz
New API to turn on manual VDB at runtime
Manual VDB is now enabled by GC_set_manual_vdb_allowed(1) if called before entering the GC incremental mode. * alloc.c (GC_allocobj): Expand TRUE_INCREMENTAL macro. * darwin_stop_world.c [MPROTECT_VDB] (GC_stop_world, GC_start_world): Use GC_auto_incremental instead of GC_incremental. * mark.c (alloc_mark_stack): Likewise. * mark.c [PROC_VDB] (GC_push_all): Likewise. * mark.c [!NEED_FIXUP_POINTER && THREADS && MPROTECT_VDB] (GC_push_all_stack): Likewise. * pthread_support.c [CAN_HANDLE_FORK && GC_DARWIN_THREADS && MPROTECT_VDB] (GC_atfork_prepare): Likewise. * win32_threads.c [MPROTECT_VDB && !CYGWIN32] (GC_register_my_thread_inner): Likewise. * win32_threads.c [MPROTECT_VDB] (UNPROTECT_THREAD): Likewise. * doc/gcdescr.md (Generational Collection and Dirty Bits): Update documentation for the manual VDB. * include/gc.h (GC_end_stubborn_change): Update comment. * mark_rts.c (GC_push_all_stack_partially_eager): Likewise. * include/gc.h (GC_set_manual_vdb_allowed, GC_get_manual_vdb_allowed): New public function. * include/private/gc_priv.h (GC_grungy_pages, GC_dirty_pages): Define for all VDB modes. * include/private/gc_priv.h (GC_auto_incremental, GC_manual_vdb): Define. * include/private/gc_priv.h [!GC_DISABLE_INCREMENTAL] (GC_dirty): Use GC_manual_vdb instead of GC_incremental. * include/private/gcconfig.h (GWW_VDB, MPROTECT_VDB, PCR_VDB): Do not undefine if MANUAL_VDB. * mallocx.c (GC_generic_malloc_many): Always allocate a single object (and call GC_dirty_inner/REACHABLE_AFTER_DIRTY) if GC_manual_vdb. * misc.c [!CAN_HANDLE_FORK && DARWIN && MPROTECT_VDB && !THREADS && !SMALL_CONFIG] (GC_set_handle_fork): Do not ABORT if GC_manual_vdb. * misc.c [!SMALL_CONFIG] (manual_vdb_allowed): New static variable. * misc.c [!SMALL_CONFIG] (GC_set_manual_vdb_allowed, GC_get_manual_vdb_allowed): Implement. * misc.c [!CHECKSUMS && !SMALL_CONFIG] (GC_init, GC_enable_incremental): Set GC_manual_vdb and GC_incremental to true if manual_vdb_allowed; do not call GC_dirty_init if manual_vdb_allowed. * os_dep.c: Update comment about MANUAL_VDB. * os_dep.c [MANUAL_VDB] (GC_dirty_init, async_set_pht_entry_from_index): Remove. * os_dep.c [!GC_DISABLE_INCREMENTAL] (GC_manual_vdb): Define global variable. * os_dep.c [!GC_DISABLE_INCREMENTAL] (GC_dirty_inner): Define regardless of the VDB mode; add FIXME. * os_dep.c [!GC_DISABLE_INCREMENTAL] (GC_read_dirty, GC_page_was_dirty, GC_remove_protection): Implement for the case of GC_manual_vdb is true; do not depend on MANUAL_VDB. * tests/disclaim_test.c [TEST_MANUAL_VDB] (main): Call GC_set_manual_vdb_allowed(1) before GC_INIT. * tests/staticrootslib.c [TEST_MANUAL_VDB] (libsrl_init): Likewise. * tests/test_cpp.cc [TEST_MANUAL_VDB] (main): Likewise. * tests/test.c (INIT_MANUAL_VDB_ALLOWED): New macro. * tests/test.c (GC_COND_INIT): Invoke INIT_MANUAL_VDB_ALLOWED (before GC_OPT_INIT). * tests/test.c [!SMALL_CONFIG] (main): Call GC_get_manual_vdb_allowed.
Diffstat (limited to 'mark_rts.c')
-rw-r--r--mark_rts.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mark_rts.c b/mark_rts.c
index 541a0050..03b287f5 100644
--- a/mark_rts.c
+++ b/mark_rts.c
@@ -704,7 +704,7 @@ GC_INNER void GC_push_all_stack_sections(ptr_t lo, ptr_t hi,
* register values are not lost.
* Cold_gc_frame delimits the stack section that must be scanned
* eagerly. A zero value indicates that no eager scanning is needed.
- * We don't need to worry about the MANUAL_VDB case here, since this
+ * We don't need to worry about the manual VDB case here, since this
* is only called in the single-threaded case. We assume that we
* cannot collect between an assignment and the corresponding
* GC_dirty() call.