diff options
Diffstat (limited to 'open_issues/boehm_gc.mdwn')
-rw-r--r-- | open_issues/boehm_gc.mdwn | 151 |
1 files changed, 119 insertions, 32 deletions
diff --git a/open_issues/boehm_gc.mdwn b/open_issues/boehm_gc.mdwn index 2913eea8..535bed61 100644 --- a/open_issues/boehm_gc.mdwn +++ b/open_issues/boehm_gc.mdwn @@ -1,5 +1,5 @@ -[[!meta copyright="Copyright © 2010, 2012, 2013, 2014 Free Software Foundation, -Inc."]] +[[!meta copyright="Copyright © 2010, 2012, 2013, 2014, 2015 Free Software +Foundation, Inc."]] [[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable id="license" text="Permission is granted to copy, distribute and/or modify this @@ -27,15 +27,15 @@ committed upstream should very like also be made there. <!-- git checkout reviewed -git log --reverse --pretty=fuller --stat=$COLUMNS,$COLUMNS -w -p -C --cc ..upstream/master +git diff --patience --stat=$COLUMNS,$COLUMNS --patch --src-prefix=./ --dst-prefix=./ --word-diff --color --find-renames --ignore-space-change ..upstream/master | awk '/^(\x1b\[[0-9]+m)?diff/ { c = " " $0; } /^(\x1b\[[0-9]+m)?@@/ { print c; } { print; }' | less -i -/^commit |^---$|hurd|linux|glibc +/hurd|linux|glibc --> -Last reviewed up to the 5f492b98dd131bdd6c67eb56c31024420c1e7dab (2012-06-08) -sources, and for `libatomic_ops` to the -6a0afde033f105c6320f1409162e3765a1395bfd (2012-05-15) sources. +Last reviewed up to Git commit bf62552626acc7ad8babdc350a6365cb97ec8776 +(2015-01-07), and for `libatomic_ops` to Git commit +09887cae2790e29ff535cc56f7bd0c4459ef4e2b (2015-01-09). * `configure.ac` @@ -280,18 +280,116 @@ sources, and for `libatomic_ops` to the * Check `include/private/thread_local_alloc.h` re `USE_COMPILER_TLS`/`USE_PTHREAD_SPECIFIC`. + * TODO: + + * `diff --git ./include/private/gcconfig.h ./include/private/gcconfig.h` + + {+#if defined(LINUX) || defined(FREEBSD) || defined(SOLARIS) || defined(IRIX5) \+} + {+ || ((defined(USE_MMAP) || defined(USE_MUNMAP)) && !defined(USE_WINALLOC))+} + {+# define MMAP_SUPPORTED+} + {+#endif+} + + * `diff --git ./include/private/gcconfig.h ./include/private/gcconfig.h` + + #if !defined(CAN_HANDLE_FORK) && !defined(NO_HANDLE_FORK) \ + && [-((defined(GC_PTHREADS)-]{+!defined(HAVE_NO_FORK) \+} + && [-!defined(HURD)-]{+((defined(GC_PTHREADS)+} && !defined(NACL) \ + &&[-!defined(PLATFORM_ANDROID) &&-] !defined(GC_WIN32_PTHREADS)[-\-] && !defined(USE_WINALLOC)) \ + || (defined(DARWIN) && defined(MPROTECT_VDB)) || defined(HANDLE_FORK)) + /* Attempts (where supported and requested) to make GC_malloc work in */ + /* a child process fork'ed from a multi-threaded parent. */ + # define CAN_HANDLE_FORK + #endif + + {+#if defined(CAN_HANDLE_FORK) && !defined(CAN_CALL_ATFORK) \+} + {+ && !defined(HURD) && !defined(PLATFORM_ANDROID)+} + {+ /* Have working pthread_atfork(). */+} + {+# define CAN_CALL_ATFORK+} + {+#endif+} + + * `diff --git ./include/private/gcconfig.h ./include/private/gcconfig.h` + + {+#if (defined(FREEBSD) || (defined(DARWIN) && !defined(_POSIX_C_SOURCE)) \+} + {+ || (defined(SOLARIS) && (!defined(_XOPEN_SOURCE) \+} + {+ || defined(__EXTENSIONS__))) \+} + {+ || defined(LINUX)) && !defined(HAVE_DLADDR)+} + {+# define HAVE_DLADDR+} + {+#endif+} + + * `diff --git ./os_dep.c ./os_dep.c` + + @@ -3038,9 +3005,11 @@ GC_API GC_push_other_roots_proc GC_CALL GC_get_push_other_roots(void) + /* Also old MSWIN32 ACCESS_VIOLATION filter */ + # if !defined(MSWIN32) && !defined(MSWINCE) + STATIC SIG_HNDLR_PTR GC_old_bus_handler = 0; + {+# if defined(FREEBSD) || defined(HURD) || defined(HPUX)+} + STATIC GC_bool GC_old_bus_handler_used_si = FALSE; + {+# endif+} + STATIC GC_bool GC_old_segv_handler_used_si = FALSE; + + * `diff --git ./os_dep.c ./os_dep.c` + + @@ -3192,20 +3169,22 @@ GC_API GC_push_other_roots_proc GC_CALL GC_get_push_other_roots(void) + # else + GC_bool used_si; + + {+# if defined(FREEBSD) || defined(HURD) || defined(HPUX)+} + if (sig == [-SIGSEGV) {-] + [- old_handler = GC_old_segv_handler;-] + [- used_si = GC_old_segv_handler_used_si;-] + [- } else-]{+SIGBUS)+} { + old_handler = GC_old_bus_handler; + used_si = GC_old_bus_handler_used_si; + {+} else+} + {+# endif+} + {+ /* else */ {+} + {+ old_handler = GC_old_segv_handler;+} + {+ used_si = GC_old_segv_handler_used_si;+} + } + # endif + + * `diff --git ./os_dep.c ./os_dep.c` + + # if defined(HPUX) || defined(LINUX) || defined(HURD) \ + || (defined(FREEBSD) && defined(SUNOS5SIGS)) + sigaction(SIGBUS, &act, &oldact); + if [-(oldact.sa_flags-]{+((oldact.sa_flags+} & SA_SIGINFO) {+!= 0)+} { + GC_old_bus_handler = oldact.sa_sigaction; + {+# if !defined(LINUX)+} + GC_old_bus_handler_used_si = TRUE; + {+# endif+} + } else { + GC_old_bus_handler = (SIG_HNDLR_PTR)oldact.sa_handler; + {+# if !defined(LINUX)+} + GC_old_bus_handler_used_si = FALSE; + {+# endif+} + } + if (GC_old_bus_handler == (SIG_HNDLR_PTR)SIG_IGN) { + [-if (GC_print_stats)-] + [- GC_err_printf("Previously-]{+WARN("Previously+} ignored bus [-error!?\n");-]{+error!?\n", 0);+} + {+# if !defined(LINUX)+} + GC_old_bus_handler = (SIG_HNDLR_PTR)SIG_DFL; + {+# else+} + {+ /* GC_old_bus_handler is not used by GC_write_fault_handler. */+} + {+# endif+} + } {+else+} if (GC_old_bus_handler != (SIG_HNDLR_PTR)SIG_DFL) { + [-if (GC_print_stats == VERBOSE)-] + [- GC_log_printf("Replaced-]{+GC_VERBOSE_LOG_PRINTF("Replaced+} other SIGBUS handler\n"); + } + # endif /* HPUX || LINUX || HURD || (FREEBSD && SUNOS5SIGS) */ + # Build -Here's a log of a binutils build run; this is from the -5f492b98dd131bdd6c67eb56c31024420c1e7dab (2012-06-08) sources, and for -`libatomic_ops` for the 6a0afde033f105c6320f1409162e3765a1395bfd (2012-05-15) -sources, run on kepler.SCHWINGE and coulomb.SCHWINGE. +Here's a log of a boehm-gc build run; this is from Git commit +bf62552626acc7ad8babdc350a6365cb97ec8776 (2015-01-07), and for `libatomic_ops` +Git commit 09887cae2790e29ff535cc56f7bd0c4459ef4e2b (2015-01-09), run on +kepler.SCHWINGE and laplace.SCHWINGE. $ export LC_ALL=C $ (cd ../master/ && ln -sfn ../libatomic_ops/master libatomic_ops) $ (cd ../master/ && autoreconf -vfi) - $ ../master/configure --prefix="$PWD".install SHELL=/bin/bash CC=gcc-4.6 CXX=g++-4.6 --enable-cplusplus --enable-gc-debug --enable-gc-assertions --enable-assertions 2>&1 | tee log_build + $ ../master/configure --prefix="$PWD".install SHELL=/bin/bash CC=gcc-4.9 CXX=g++-4.9 --enable-cplusplus --enable-gc-debug --enable-gc-assertions --enable-assertions 2>&1 | tee log_build [...] $ make 2>&1 | tee log_build_ [...] @@ -299,20 +397,16 @@ sources, run on kepler.SCHWINGE and coulomb.SCHWINGE. Different hosts may default to different shells and compiler versions; thus harmonized. Using bash instead of dash as otherwise libtool explodes. -This takes up around X MiB, and needs roughly X min on kepler.SCHWINGE and -X min on coulomb.SCHWINGE. - <!-- - $ (make && touch .go-install) 2>&1 | tee log_build_ && test -f .go-install && (make install && touch .go-check) 2>&1 | tee log_install && test -f .go-check && { make -k check 2>&1 | tee log_check; (cd libatomic_ops/ && make -k check) 2>&1 | tee log_check_; } + $ (make && touch .go-install) 2>&1 | tee log_build_ && test -f .go-install && (make install && touch .go-test) 2>&1 | tee log_install && test -f .go-test && { make -k check 2>&1 | tee log_test; (cd libatomic_ops/ && make -k check) 2>&1 | tee log_test_; } --> + ## Analysis - $ ssh kepler.SCHWINGE 'cd tmp/source/boehm-gc/ && cat master.build/log_build* | sed -e "s%\(/media/data\)\?${PWD}%[...]%g"' > toolchain/logs/boehm-gc/linux/log_build - $ ssh coulomb.SCHWINGE 'cd tmp/boehm-gc/ && cat master.build/log_build* | sed -e "s%\(/media/erich\)\?${PWD}%[...]%g"' > toolchain/logs/boehm-gc/hurd/log_build - $ diff -wu <(sed -f toolchain/logs/boehm-gc/linux/log_build.sed < toolchain/logs/boehm-gc/linux/log_build) <(sed -f toolchain/logs/boehm-gc/hurd/log_build.sed < toolchain/logs/boehm-gc/hurd/log_build) > toolchain/logs/boehm-gc/log_build.diff + $ toolchain/logs/process boehm-gc build * only GNU/Linux: `configure: WARNING: "Explicit GC_INIT() calls may be required."` @@ -326,32 +420,23 @@ X min on coulomb.SCHWINGE. $ make install 2>&1 | tee log_install [...] -This takes up around X MiB, and needs roughly X min on kepler.SCHWINGE and X -min on coulomb.SCHWINGE. - ## Analysis - $ ssh kepler.SCHWINGE 'cd tmp/source/boehm-gc/ && cat master.build/log_install | sed -e "s%\(/media/data\)\?${PWD}%[...]%g"' > toolchain/logs/boehm-gc/linux/log_install - $ ssh coulomb.SCHWINGE 'cd tmp/boehm-gc/ && cat master.build/log_install | sed -e "s%\(/media/erich\)\?${PWD}%[...]%g"' > toolchain/logs/boehm-gc/hurd/log_install - $ diff -wu toolchain/logs/boehm-gc/linux/log_install toolchain/logs/boehm-gc/hurd/log_install > toolchain/logs/boehm-gc/log_install.diff + $ toolchain/logs/process boehm-gc install # Testsuite - $ make -k check + $ make -k check 2>&1 | tee log_test [...] - $ (cd libatomic_ops/ && make -k check) + $ (cd libatomic_ops/ && make -k check) 2>&1 | tee log_test_ [...] -This needs roughly X min on kepler.SCHWINGE and X min on coulomb.SCHWINGE. - ## Analysis - $ ssh kepler.SCHWINGE 'cd tmp/source/boehm-gc/ && cat master.build/log_check* | sed -e "s%\(/media/data\)\?${PWD}%[...]%g"' > toolchain/logs/boehm-gc/linux/log_check - $ ssh coulomb.SCHWINGE 'cd tmp/boehm-gc/ && cat master.build/log_check* | sed -e "s%\(/media/erich\)\?${PWD}%[...]%g"' > toolchain/logs/boehm-gc/hurd/log_check - $ diff -wu <(sed -f toolchain/logs/boehm-gc/linux/log_check.sed < toolchain/logs/boehm-gc/linux/log_check) <(sed -f toolchain/logs/boehm-gc/hurd/log_check.sed < toolchain/logs/boehm-gc/hurd/log_check) > toolchain/logs/boehm-gc/log_check.diff + $ toolchain/logs/process boehm-gc test There are different configurations possible, but in general, the testsuite restults of GNU/Linux and GNU/Hurd look very similar. @@ -374,6 +459,8 @@ restults of GNU/Linux and GNU/Hurd look very similar. * <http://www.hpl.hp.com/personal/Hans_Boehm/gc/#users> + * [[!wikipedia Boehm_garbage_collector]] + ## IRC, OFTC, #debian-hurd, 2012-02-05 |