summaryrefslogtreecommitdiff
path: root/mark_rts.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2021-08-26 09:34:34 +0300
committerIvan Maidanski <ivmai@mail.ru>2021-08-26 20:36:21 +0300
commit48751145d91e9b1be19e394da83e9b6582b90958 (patch)
tree5d19a5abb6f74d2dfea413f22faf66ce725a173c /mark_rts.c
parent5b75faefeec9c1fb67fd1067d78c2bdff3aa7a45 (diff)
downloadbdwgc-48751145d91e9b1be19e394da83e9b6582b90958.tar.gz
Do not scan static roots pages unless dirty if SOFT_VDB (Linux)
Issue #265 (bdwgc). * include/private/gc_priv.h (GC_push_conditional_static): Declare (as a macro or function). * include/private/gcconfig.h [!PROC_VDB && !NO_VDB_FOR_STATIC_ROOTS] (NO_VDB_FOR_STATIC_ROOTS): Do not define if SOFT_VDB. * mark.c [!GC_DISABLE_INCREMENTAL && !NO_VDB_FOR_STATIC_ROOTS && !PROC_VDB] (GC_static_page_was_dirty): New STATIC function. * mark.c [!GC_DISABLE_INCREMENTAL && !NO_VDB_FOR_STATIC_ROOTS] (GC_push_conditional_static): New function (uses GC_static_page_was_dirty unless PROC_VDB). * mark_rts.c (GC_PUSH_CONDITIONAL_STATIC): Remove. * mark_rts.c (GC_PUSH_CONDITIONAL): Use GC_push_conditional_static instead of GC_PUSH_CONDITIONAL_STATIC. * os_dep.c (SOFT_VDB): Update comment about implementation. * os_dep.c [SOFT_VDB && CHECKSUMS] (GC_soft_read_dirty): Call GC_or_pages() only unless output_unneeded, remove assertion about it. * os_dep.c [SOFT_VDB && !NO_VDB_FOR_STATIC_ROOTS] (GC_soft_read_dirty): Call soft_set_grungy_pages() for every element of GC_static_roots.
Diffstat (limited to 'mark_rts.c')
-rw-r--r--mark_rts.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/mark_rts.c b/mark_rts.c
index 3a115508..e46435aa 100644
--- a/mark_rts.c
+++ b/mark_rts.c
@@ -615,22 +615,13 @@ GC_API void GC_CALL GC_exclude_static_roots(void *b, void *e)
UNLOCK();
}
-#ifdef NO_VDB_FOR_STATIC_ROOTS
-# define GC_PUSH_CONDITIONAL_STATIC(b, t, all) \
- ((void)(all), GC_push_all(b, t))
-#else
-# define GC_PUSH_CONDITIONAL_STATIC(b, t, all) GC_push_conditional(b, t, all)
- /* Do either of GC_push_all or GC_push_selected */
- /* depending on the third arg. */
-#endif
-
#if defined(WRAP_MARK_SOME) && defined(PARALLEL_MARK)
# define GC_PUSH_CONDITIONAL(b, t, all) \
(GC_parallel \
? GC_push_conditional_eager(b, t, all) \
- : GC_PUSH_CONDITIONAL_STATIC(b, t, all))
+ : GC_push_conditional_static(b, t, all))
#else
-# define GC_PUSH_CONDITIONAL(b, t, all) GC_PUSH_CONDITIONAL_STATIC(b, t, all)
+# define GC_PUSH_CONDITIONAL(b, t, all) GC_push_conditional_static(b, t, all)
#endif
/* Invoke push_conditional on ranges that are not excluded. */