[m-rev.] diff: upgrade to boehm gc 7.2

Peter Ross pro at missioncriticalit.com
Tue Jul 17 02:19:16 AEST 2012


Hi,

Please find attached the interesting bits (ie those bits where I had to resolve
a non-obvious conflict) of the diff to upgrade to version 7.2 of the boehm gc
collector.

The full diff can be found at uranus:~petdr/DIFF.GC72

This change successfully bootchecked in the asm_fast.gc and hlc.gc grades.
I also installed the resulting compiler in the asm_fast.gc and hlc.gc grades
and then built some test programs in those grades, on my local machine.

So far this has only been tested extensively on linux.

Julien, can you test on Mac OS X and Windows?

I will do the test on Solaris 10.

===================================================================


Estimated hours taken: 4
Branches: main

Upgrade to version 7.2 of the boehm gc.

This upgrade was done as 7.2 alpha 4 doesn't compile cleanly under Solaris 10.

Index: boehm_gc/pthread_stop_world.c
===================================================================
RCS file: /home/mercury1/repository/mercury/boehm_gc/pthread_stop_world.c,v
retrieving revision 1.6
diff -u -r1.6 pthread_stop_world.c
--- boehm_gc/pthread_stop_world.c	24 Feb 2010 07:04:34 -0000	1.6
+++ boehm_gc/pthread_stop_world.c	16 Jul 2012 14:01:06 -0000
@@ -145,150 +173,150 @@
   STATIC void GC_suspend_handler(int sig)
 #endif
 {
-  int old_errno = errno;
-  if (GC_mercury_callback_pause_thread) {
-    GC_mercury_callback_pause_thread();
-  }
-  GC_with_callee_saves_pushed(GC_suspend_handler_inner, (ptr_t)(word)sig);
-  if (GC_mercury_callback_resume_thread) {
-    GC_mercury_callback_resume_thread();
-  }
-  errno = old_errno;
-}
-#else
-/* We believe that in all other cases the full context is already       */
-/* in the signal handler frame.                                         */
-#ifdef SA_SIGINFO
-  STATIC void GC_suspend_handler(int sig, siginfo_t *info, void *context)
-#else
-  STATIC void GC_suspend_handler(int sig)
-#endif
-{
-  int old_errno = errno;
-  if (GC_mercury_callback_pause_thread) {
-    GC_mercury_callback_pause_thread();
-  }
-# ifndef SA_SIGINFO
-    void *context = 0;
+# if defined(IA64) || defined(HP_PA) || defined(M68K)
+    int old_errno = errno;
+    if (GC_mercury_callback_pause_thread) {
+      GC_mercury_callback_pause_thread();
+    }
+    GC_with_callee_saves_pushed(GC_suspend_handler_inner, (ptr_t)(word)sig);
+    if (GC_mercury_callback_resume_thread) {
+      GC_mercury_callback_resume_thread();
+    }
+    errno = old_errno;
+# else
+    /* We believe that in all other cases the full context is already   */
+    /* in the signal handler frame.                                     */
+    int old_errno = errno;
+    if (GC_mercury_callback_pause_thread) {
+      GC_mercury_callback_pause_thread();
+    }
+#   ifndef SA_SIGINFO
+      void *context = 0;
+#   endif
+    GC_suspend_handler_inner((ptr_t)(word)sig, context);
+    if (GC_mercury_callback_resume_thread) {
+      GC_mercury_callback_resume_thread();
+    }
+    errno = old_errno;
 # endif
-  GC_suspend_handler_inner((ptr_t)(word)sig, context);
-  if (GC_mercury_callback_resume_thread) {
-    GC_mercury_callback_resume_thread();
-  }
-  errno = old_errno;
 }
-#endif
 
Index: boehm_gc/include/gc_pthread_redirects.h
===================================================================
RCS file: /home/mercury1/repository/mercury/boehm_gc/include/gc_pthread_redirects.h,v
retrieving revision 1.6
diff -u -r1.6 gc_pthread_redirects.h
--- boehm_gc/include/gc_pthread_redirects.h	3 Dec 2010 16:19:11 -0000	1.6
+++ boehm_gc/include/gc_pthread_redirects.h	16 Jul 2012 14:01:08 -0000
@@ -31,41 +32,63 @@
 
 #include <pthread.h>
 
-#if !defined(GC_DARWIN_THREADS) && !defined(GC_WIN32_PTHREADS)
-# include <signal.h>
+#ifndef GC_NO_DLOPEN
 # include <dlfcn.h>
-
-# ifndef GC_OPENBSD_THREADS
-    GC_API int GC_pthread_sigmask(int /* how */, const sigset_t *,
-                                  sigset_t * /* oset */);
-# endif
   GC_API void *GC_dlopen(const char * /* path */, int /* mode */);
+#endif /* !GC_NO_DLOPEN */
+
Index: boehm_gc/libatomic_ops/tests/Makefile.am
===================================================================
RCS file: /home/mercury1/repository/mercury/boehm_gc/libatomic_ops/tests/Makefile.am,v
retrieving revision 1.2
diff -u -r1.2 Makefile.am
--- boehm_gc/libatomic_ops/tests/Makefile.am	27 Jan 2011 11:46:41 -0000	1.2
+++ boehm_gc/libatomic_ops/tests/Makefile.am	16 Jul 2012 14:01:11 -0000
@@ -1,35 +1,38 @@
 EXTRA_DIST=test_atomic.template list_atomic.template run_parallel.inc \
-	   test_atomic_include.h
-# We distribute test_atomic_include.h, since it's hard to regenerate
-# on Windows without sed.
+	   test_atomic_include.h list_atomic.c
+# We distribute test_atomic_include.h and list_atomic.c, since it is hard
+# to regenerate them on Windows without sed.
 
 # Mercury local change: we avoid regenerating or deleting test_atomic_include.h
 # because it just causes noise in cvs diffs.
 #
 #BUILT_SOURCES = test_atomic_include.h list_atomic.i
-#CLEANFILES = test_atomic_include.h list_atomic.c list_atomic.i
 BUILT_SOURCES = list_atomic.i
-CLEANFILES = list_atomic.c list_atomic.i
+CLEANFILES = list_atomic.i
 
Index: boehm_gc/libatomic_ops/tests/Makefile.in
===================================================================
RCS file: /home/mercury1/repository/mercury/boehm_gc/libatomic_ops/tests/Makefile.in,v
retrieving revision 1.2
diff -u -r1.2 Makefile.in
--- boehm_gc/libatomic_ops/tests/Makefile.in	27 Jan 2011 11:46:46 -0000	1.2
+++ boehm_gc/libatomic_ops/tests/Makefile.in	16 Jul 2012 14:01:11 -0000
@@ -178,28 +199,31 @@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 EXTRA_DIST = test_atomic.template list_atomic.template run_parallel.inc \
-	   test_atomic_include.h
+	   test_atomic_include.h list_atomic.c
 
-# We distribute test_atomic_include.h, since it's hard to regenerate
-# on Windows without sed.
+# We distribute test_atomic_include.h and list_atomic.c, since it is hard
+# to regenerate them on Windows without sed.
 
 # Mercury local change: we avoid regenerating or deleting test_atomic_include.h
 # because it just causes noise in cvs diffs.
 #
 #BUILT_SOURCES = test_atomic_include.h list_atomic.i
-#CLEANFILES = test_atomic_include.h list_atomic.c list_atomic.i
 BUILT_SOURCES = list_atomic.i
-CLEANFILES = list_atomic.c list_atomic.i
-AM_CPPFLAGS = -I$(srcdir)/../src
+CLEANFILES = list_atomic.i
+AM_CPPFLAGS = -I$(top_builddir)/src -I$(top_srcdir)/src
+ at HAVE_PTHREAD_H_TRUE@test_atomic_pthreads_SOURCES = $(test_atomic_SOURCES)
+ at HAVE_PTHREAD_H_TRUE@test_atomic_pthreads_CPPFLAGS = -DAO_USE_PTHREAD_DEFS $(AM_CPPFLAGS)
+ at HAVE_PTHREAD_H_TRUE@test_atomic_pthreads_LDADD = $(test_atomic_LDADD)
 test_atomic_SOURCES = test_atomic.c
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list