[Gc] Re: Desperately needing GC 7.1
Hans.Boehm at hp.com
Thu Jan 24 21:19:10 PST 2008
Could you check that the attached patch works? If so, I'll check
On Thu, 24 Jan 2008, Manuel.Serrano at sophia.inria.fr wrote:
>> Is the core ARM/QEMU problem here that /proc/self/stat is not emulated?
> You are correct. /proc is not emulated. It uses the one of the host
> platform (i.e. an x32 Linux).
>> Is there any reason to believe that this is really ARM specific?
>> I'm fine with adding an option that works around this problem. But
>> I'd really like the macro to be a bit more generic, like
>> NO_PROC_SELF_STAT, if that sounds right to you.
> Yes, it does. Just to be sure that I understand you correctly: you are
> only suggesting to replace the name QEMU with NO_PROC_SELF_STAT. Is
> that correct?
-------------- next part --------------
RCS file: /cvsroot/bdwgc/bdwgc/Makefile.direct,v
retrieving revision 1.17
diff -u -r1.17 Makefile.direct
--- Makefile.direct 23 Dec 2007 22:00:43 -0000 1.17
+++ Makefile.direct 25 Jan 2008 05:13:15 -0000
@@ -318,6 +318,8 @@
# required for applications that store pointers in mmapped segments without
# informaing the collector. But it typically performs poorly, especially
# since it will scan inactive but cached NPTL thread stacks completely.
+# -DNO_PROC_STAT Causes the collector to avoid relying on Linux'
RCS file: /cvsroot/bdwgc/bdwgc/include/private/gcconfig.h,v
retrieving revision 1.29
diff -u -r1.29 gcconfig.h
--- include/private/gcconfig.h 14 Aug 2007 20:57:26 -0000 1.29
+++ include/private/gcconfig.h 25 Jan 2008 05:13:15 -0000
@@ -558,7 +558,9 @@
* If STACKBOTTOM is defined, then it's value will be used directly as the
* stack base. If LINUX_STACKBOTTOM is defined, then it will be determined
* with a method appropriate for most Linux systems. Currently we look
- * first for __libc_stack_end, and if that fails read it from /proc.
+ * first for __libc_stack_end (currently only id USE_LIBC_PRIVATES is
+ * defined), and if that fails read it from /proc. (If USE_LIBC_PRIVATES
+ * is not defined and NO_PROC_STAT is defined, we revert to HEURISTIC2.)
* If either of the last two macros are defined, then STACKBOTTOM is computed
* during collector startup using one of the following two heuristics:
* HEURISTIC1: Take an address inside GC_init's frame, and round it up to
@@ -1982,6 +1984,16 @@
+#if defined(LINUX_STACKBOTTOM) && defined(NO_PROC_STAT) \
+ && !defined(USE_LIBC_PRIVATES)
+ /* This combination will fail, since we have no way to get */
+ /* the stack base. Use HEURISTIC2 instead. */
+# undef LINUX_STACKBOTTOM
+# define HEURISTIC2
+ /* This may still fail on some architectures like IA64. */
+ /* We tried ... */
#if defined(LINUX) && defined(USE_MMAP)
/* The kernel may do a somewhat better job merging mappings etc. */
/* with anonymous mappings. */
More information about the Gc