summaryrefslogtreecommitdiff
path: root/mark.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2016-12-19 10:56:19 +0300
committerIvan Maidanski <ivmai@mail.ru>2016-12-19 10:56:19 +0300
commit4c24e89123648e6080622bde687c004f60532f73 (patch)
tree2afcc03e04a0451533866155cd75760cfe03d5a9 /mark.c
parent1586a21db3ed00b854f037950ef856f9a082c48d (diff)
downloadbdwgc-4c24e89123648e6080622bde687c004f60532f73.tar.gz
Skip grungy_pages update when mark state invalid to speedup read_dirty
* include/private/gc_priv.h [!GC_DISABLE_INCREMENTAL] (GC_read_dirty): Add output_unneeded argument; update comment. * os_dep.c [MANUAL_VDB || PROC_VDB] (GC_read_dirty): Likewise. * mark.c [!GC_DISABLE_INCREMENTAL] (GC_initiate_gc): Pass output_unneeded argument. * misc.c [!GC_DISABLE_INCREMENTAL && !KEEP_BACK_PTRS] (GC_enable_incremental): Likewise. * os_dep.c [MPROTECT_VDB] (GC_read_dirty): Likewise. * os_dep.c [GWW_VDB] (GC_gww_read_dirty): Add output_unneeded argument. * os_dep.c [DEFAULT_VDB || PCR_VDB] (GC_read_dirty): Likewise. * os_dep.c [GWW_VDB] (GC_gww_read_dirty): Do not call BZERO(GC_grungy_pages) and set_pht_entry_from_index() if output_unneeded. * os_dep.c [GWW_VDB && CHECKSUMS] (GC_gww_read_dirty): Add assertion that output_unneeded is false. * os_dep.c [MANUAL_VDB || MPROTECT_VDB] (GC_read_dirty): Do not call BCOPY(GC_dirty_pages, GC_grungy_pages) if output_unneeded. * os_dep.c [PROC_VDB] (GC_read_dirty): Do not call memset(GC_grungy_pages) if output_unneeded.
Diffstat (limited to 'mark.c')
-rw-r--r--mark.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/mark.c b/mark.c
index 36b39e5b..e93b433e 100644
--- a/mark.c
+++ b/mark.c
@@ -242,7 +242,13 @@ GC_INNER void GC_clear_marks(void)
GC_INNER void GC_initiate_gc(void)
{
# ifndef GC_DISABLE_INCREMENTAL
- if (GC_dirty_maintained) GC_read_dirty();
+ if (GC_dirty_maintained) {
+# ifdef CHECKSUMS
+ GC_read_dirty(FALSE);
+# else
+ GC_read_dirty(GC_mark_state == MS_INVALID);
+# endif
+ }
# endif
# ifdef STUBBORN_ALLOC
GC_read_changed();