Ivan Maidanski | 6 Feb 09:06
Picon

Re: [bdwgc] Tests fail on Mac OS X Lion (#11)

Hi,

1. Could you please make check using latest bdwgc+libatomic_ops source (master or release branch), first?
2. Is this a regression? (i.e. is there any GC v7 release or snapshot which works ok?)

Regards.

06 02 2012, 04:47 François-Xavier Thomas <reply+i-3102864-c255b8ee79ec3c6f466471f7020ef26926aebfb5-460469@...>:
> Hi,
> 
> I'm currently trying to install bdw-gc as a dependency for TeXmacs under OS X Lion,  using LLVM-GCC (from
XCode 4.2).
> 
> The standard MacPorts version (using standard GCC built from source) works, but I would really love to use
only tools provided by XCode since it really is a pain to have to install/compile/update other GCCs...
> 
> You can check this thread on the Homebrew repo for more reports from other users : https://github.com/mxcl/homebrew/issues/8609
> 
> My *make check* output is below, although I don't know whether it'll be useful or not...
> 
> ```
> make  check-TESTS
> Switched to incremental mode
> Emulating dirty bits with mprotect/signals
> typed alloc failed at 289
> Test failed
> /bin/sh: line 1: 90371 Abort trap: 6           ${dir}$tst
> FAIL: gctest
> Leaked composite object at 0x105621ee0 (tests/leak_test.c:12, sz=13, NORMAL)
> 
(Continue reading)

Ivan Maidanski | 6 Feb 13:56
Picon

Job dedicated to BDWGC improvement

Hi everybody,

I wonder is there anybody on the list from Russia (or exUSSR) willing to bug-fix, optimize and integrate BDW
GC on a full-time long-term (at least 1 year) basis?

Regards.
Ivan Maidanski | 6 Feb 15:03
Picon

Re[2]: [bdwgc] Tests fail on Mac OS X Lion (#11)

Hi,

1. Ok. Let us know the problem root then.

2. I tried libatomic_ops make check CC=clang on Ubuntu 11 x86 and it failed in test_stack (with -O2 or
higher). So, some problem exists in libatomic_ops.

clang version 1.1 (branches/release_27)
Target: i386-pc-linux-gnu
Thread model: posix

Regards.

06 02 2012, 17:04 François-Xavier Thomas <reply+i-3102864-c255b8ee79ec3c6f466471f7020ef26926aebfb5-460469@...>:
> Wow... I just tried building it manually from source, and tests passed OK, so Homebrew must be messing with
the checks. Sorry to have bothered you guys, I'm going to look into it. I hope I'll be able to fix it soon!
> 
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/ivmai/bdwgc/issues/11#issuecomment-3828047
> 
Ivan Maidanski | 7 Feb 08:26
Picon

Re[2]: [bdwgc] Tests fail on Mac OS X Lion (#11)

Hi,

Could you please preprocess the code both with -D_XOPEN_SOURCE and without and compare the difference?

06 02 2012, 23:50 François-Xavier Thomas <reply+i-3102864-c255b8ee79ec3c6f466471f7020ef26926aebfb5-460469@...>:
> 1. The previous package manager had added `-D_XOPEN_SOURCE` to the CPP/CXXFLAGS, so I assumed it was
necessary to build the package under OS X. I still don't know what it does, but everything went fine when I
removed it.
> 2. OK, that's good to know. Did it fail as well without the optimizations?
> 
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/ivmai/bdwgc/issues/11#issuecomment-3835425
> 
Picon

Tests fail on OS X

Hi,

I'm currently trying to install bdw-gc as a dependency for TeXmacs
under OS X Lion, using XCode-provided tools, resulting in a failure to
run make check.

The MacPorts version (using standard GCC built from source) works, but
I would really love to use only tools provided by XCode since it
really is a pain to have to install/compile/update other GCCs...

You can check this thread on the Homebrew repo for more reports from
other users (afaik, most of them are trying to install w3m, but the
issue is the same) : https://github.com/mxcl/homebrew/issues/8609

Versions :
* BDW-GC 7.1 and 7.2alpha6
* Compilers: LLVM-GCC 4.2 and Clang-GCC 3.0 from XCode 4.2
* OS: OS X Lion 10.7.2

My make check output is below, although I don't know whether it'll be
useful or not...

make  check-TESTS
Switched to incremental mode
Emulating dirty bits with mprotect/signals
typed alloc failed at 289
Test failed
/bin/sh: line 1: 90371 Abort trap: 6           ${dir}$tst
FAIL: gctest
Leaked composite object at 0x105621ee0 (tests/leak_test.c:12, sz=13, NORMAL)
(Continue reading)

Boehm, Hans | 8 Feb 16:56
Picon
Favicon

RE: about bitmap marking

[Copying response to gc mailing list.]

 

6.8 is old at this point, but this hasn’t changed much in 7.2alpha6.

 

The collector always stores mark bits in a map off to the side.  When I last looked at this ages ago, that seemed to be a clear win.  We need to look up a page descriptor for the object being marked in any case.  Thus the overhead is smaller than it would probably be for a non-conservative collector.  Having the mark bit in the object, or even on the same page, would mean accessing pages containing pointer-free objects during a GC.  In my experience, in well-tuned applications, a large fraction of the heap is pointer-free.  The GC could often touch twice as many pages during a GC with the mark bits in the objects.

 

An ancient version of the GC stored mark bits at the beginning of each page.  That potentially  causes other cache-related problems.  All mark bits contend for a small fraction of the cache.

 

The GC allocates memory from a free-list, but free-lists are built only a page at a time, when needed.  Building the free-list will force memory into the cache, but the hope is that it will still be there when the object is allocated by the client.

 

Hans

 

From: lijun [mailto:lijun-E8mQNyieTr9F8jW2Upzce+ga9YzINl48@public.gmane.org]
Sent: Tuesday, February 07, 2012 7:26 PM
To: Boehm, Hans; boehm-HInyCGIudOg@public.gmane.org
Subject: about bitmap marking

 

Dear Boehm:

 

I'm sorry about my poor English.

 

I would like to hear about boehm gc.

 

Boehm gc(gc6.8) uses Bitmap marking as default?

 

In Boehm gc, bitmap marking rules out storing mark-bits in object headers?(move mark-bits to other area)

 

Does Boehm gc get memory area from a freelist when allocate memory?

 

I'm waiting for your reply eagerly.

 

Best regards.

 

 

Li Jun

Univ. of Tsukuba

_______________________________________________
Gc mailing list
Gc@...
http://www.hpl.hp.com/hosted/linux/mail-archives/gc/
lijun | 9 Feb 15:06
Picon

RE: about bitmap marking

I am sorry that i did not ask more clearly.

I just want to know about gc6.8.

 

I don’t know whether gc6.8 uses bitmap marking or not if I build the collector without any options or if I don’t set any parameters in my C program?

(For example, if I build gc6.8 with -DGC_LINUX_THREADS -DPARALLEL_MARK -DTHREAD_LOCAL_ALLOC, the collector will run the mark phase in parallel.

If I call GC_enable_incremental and set GC_time_limit in my program, the collector will perform an incremental gc. etc)

 

If yes, I want to know whether mark bits are out of the objects or not in gc6.8.

 

About freelist, I want to know whether the following is right or wrong in gc6.8?

C program <- (memory block) <- freelist(list of free memory blocks)

 

I'm waiting for your reply eagerly.

Best Regards.

 

Li Jun

 

 

From: Boehm, Hans [mailto:hans.boehm-VXdhtT5mjnY@public.gmane.org]
Sent: Thursday, February 09, 2012 12:57 AM
To: lijun; boehm-HInyCGIudOg@public.gmane.org
Cc: gc-V9/bV5choksm30D7ZfaTJw@public.gmane.org
Subject: RE: about bitmap marking

 

[Copying response to gc mailing list.]

 

6.8 is old at this point, but this hasn’t changed much in 7.2alpha6.

 

The collector always stores mark bits in a map off to the side.  When I last looked at this ages ago, that seemed to be a clear win.  We need to look up a page descriptor for the object being marked in any case.  Thus the overhead is smaller than it would probably be for a non-conservative collector.  Having the mark bit in the object, or even on the same page, would mean accessing pages containing pointer-free objects during a GC.  In my experience, in well-tuned applications, a large fraction of the heap is pointer-free.  The GC could often touch twice as many pages during a GC with the mark bits in the objects.

 

An ancient version of the GC stored mark bits at the beginning of each page.  That potentially  causes other cache-related problems.  All mark bits contend for a small fraction of the cache.

 

The GC allocates memory from a free-list, but free-lists are built only a page at a time, when needed.  Building the free-list will force memory into the cache, but the hope is that it will still be there when the object is allocated by the client.

 

Hans

 

From: lijun [mailto:lijun-E8mQNyieTr9F8jW2Upzce+ga9YzINl48@public.gmane.org]
Sent: Tuesday, February 07, 2012 7:26 PM
To: Boehm, Hans; boehm-HInyCGIudOg@public.gmane.org
Subject: about bitmap marking

 

Dear Boehm:

 

I'm sorry about my poor English.

 

I would like to hear about boehm gc.

 

Boehm gc(gc6.8) uses Bitmap marking as default?

 

In Boehm gc, bitmap marking rules out storing mark-bits in object headers?(move mark-bits to other area)

 

Does Boehm gc get memory area from a freelist when allocate memory?

 

I'm waiting for your reply eagerly.

 

Best regards.

 

 

Li Jun

Univ. of Tsukuba

_______________________________________________
Gc mailing list
Gc@...
http://www.hpl.hp.com/hosted/linux/mail-archives/gc/
Boehm, Hans | 10 Feb 08:09
Picon
Favicon

RE: about bitmap marking

gc6.8 and all relevant versions always keep mark bits in a separate region of memory.  There is no way to configure the collector differently.

 

I do not understand your second question.  The collector, including 6.8, always uses free-lists for small objects.  There is no way to configure that differently.

 

Hans

 

From: lijun [mailto:lijun-E8mQNyieTr9F8jW2Upzce+ga9YzINl48@public.gmane.org]
Sent: Thursday, February 09, 2012 6:06 AM
To: Boehm, Hans; boehm-HInyCGIudOg@public.gmane.org
Cc: gc-V9/bV5choksm30D7ZfaTJw@public.gmane.org
Subject: RE: about bitmap marking

 

I am sorry that i did not ask more clearly.

I just want to know about gc6.8.

 

I don’t know whether gc6.8 uses bitmap marking or not if I build the collector without any options or if I don’t set any parameters in my C program?

(For example, if I build gc6.8 with -DGC_LINUX_THREADS -DPARALLEL_MARK -DTHREAD_LOCAL_ALLOC, the collector will run the mark phase in parallel.

If I call GC_enable_incremental and set GC_time_limit in my program, the collector will perform an incremental gc. etc)

 

If yes, I want to know whether mark bits are out of the objects or not in gc6.8.

 

About freelist, I want to know whether the following is right or wrong in gc6.8?

C program <- (memory block) <- freelist(list of free memory blocks)

 

I'm waiting for your reply eagerly.

Best Regards.

 

Li Jun

 

 

From: Boehm, Hans [mailto:hans.boehm-VXdhtT5mjnY@public.gmane.org]
Sent: Thursday, February 09, 2012 12:57 AM
To: lijun; boehm-HInyCGIudOg@public.gmane.org
Cc: gc-V9/bV5choksm30D7ZfaTJw@public.gmane.org
Subject: RE: about bitmap marking

 

[Copying response to gc mailing list.]

 

6.8 is old at this point, but this hasn’t changed much in 7.2alpha6.

 

The collector always stores mark bits in a map off to the side.  When I last looked at this ages ago, that seemed to be a clear win.  We need to look up a page descriptor for the object being marked in any case.  Thus the overhead is smaller than it would probably be for a non-conservative collector.  Having the mark bit in the object, or even on the same page, would mean accessing pages containing pointer-free objects during a GC.  In my experience, in well-tuned applications, a large fraction of the heap is pointer-free.  The GC could often touch twice as many pages during a GC with the mark bits in the objects.

 

An ancient version of the GC stored mark bits at the beginning of each page.  That potentially  causes other cache-related problems.  All mark bits contend for a small fraction of the cache.

 

The GC allocates memory from a free-list, but free-lists are built only a page at a time, when needed.  Building the free-list will force memory into the cache, but the hope is that it will still be there when the object is allocated by the client.

 

Hans

 

From: lijun [mailto:lijun-E8mQNyieTr9F8jW2Upzce+ga9YzINl48@public.gmane.org]
Sent: Tuesday, February 07, 2012 7:26 PM
To: Boehm, Hans; boehm-HInyCGIudOg@public.gmane.org
Subject: about bitmap marking

 

Dear Boehm:

 

I'm sorry about my poor English.

 

I would like to hear about boehm gc.

 

Boehm gc(gc6.8) uses Bitmap marking as default?

 

In Boehm gc, bitmap marking rules out storing mark-bits in object headers?(move mark-bits to other area)

 

Does Boehm gc get memory area from a freelist when allocate memory?

 

I'm waiting for your reply eagerly.

 

Best regards.

 

 

Li Jun

Univ. of Tsukuba

_______________________________________________
Gc mailing list
Gc@...
http://www.hpl.hp.com/hosted/linux/mail-archives/gc/
lijun | 10 Feb 12:31
Picon

RE: about bitmap marking

Thank you for your information.

 

The mark bits in a separate region of memory are stored continuously in a table?

(In sweep phase, the collector scans mark bits in the table)

There is a bitmap table in each page?

 

Best regards.

 

Li Jun

 

From: Boehm, Hans [mailto:hans.boehm-VXdhtT5mjnY@public.gmane.org]
Sent: Friday, February 10, 2012 4:09 PM
To: lijun; boehm-HInyCGIudOg@public.gmane.org
Cc: gc-V9/bV5choksm30D7ZfaTJw@public.gmane.org
Subject: RE: about bitmap marking

 

gc6.8 and all relevant versions always keep mark bits in a separate region of memory.  There is no way to configure the collector differently.

 

I do not understand your second question.  The collector, including 6.8, always uses free-lists for small objects.  There is no way to configure that differently.

 

Hans

 

From: lijun [mailto:lijun-E8mQNyieTr9F8jW2Upzce+ga9YzINl48@public.gmane.org]
Sent: Thursday, February 09, 2012 6:06 AM
To: Boehm, Hans; boehm-HInyCGIudOg@public.gmane.org
Cc: gc-V9/bV5choksm30D7ZfaTJw@public.gmane.org
Subject: RE: about bitmap marking

 

I am sorry that i did not ask more clearly.

I just want to know about gc6.8.

 

I don’t know whether gc6.8 uses bitmap marking or not if I build the collector without any options or if I don’t set any parameters in my C program?

(For example, if I build gc6.8 with -DGC_LINUX_THREADS -DPARALLEL_MARK -DTHREAD_LOCAL_ALLOC, the collector will run the mark phase in parallel.

If I call GC_enable_incremental and set GC_time_limit in my program, the collector will perform an incremental gc. etc)

 

If yes, I want to know whether mark bits are out of the objects or not in gc6.8.

 

About freelist, I want to know whether the following is right or wrong in gc6.8?

C program <- (memory block) <- freelist(list of free memory blocks)

 

I'm waiting for your reply eagerly.

Best Regards.

 

Li Jun

 

 

From: Boehm, Hans [mailto:hans.boehm-VXdhtT5mjnY@public.gmane.org]
Sent: Thursday, February 09, 2012 12:57 AM
To: lijun; boehm-HInyCGIudOg@public.gmane.org
Cc: gc-V9/bV5choksm30D7ZfaTJw@public.gmane.org
Subject: RE: about bitmap marking

 

[Copying response to gc mailing list.]

 

6.8 is old at this point, but this hasn’t changed much in 7.2alpha6.

 

The collector always stores mark bits in a map off to the side.  When I last looked at this ages ago, that seemed to be a clear win.  We need to look up a page descriptor for the object being marked in any case.  Thus the overhead is smaller than it would probably be for a non-conservative collector.  Having the mark bit in the object, or even on the same page, would mean accessing pages containing pointer-free objects during a GC.  In my experience, in well-tuned applications, a large fraction of the heap is pointer-free.  The GC could often touch twice as many pages during a GC with the mark bits in the objects.

 

An ancient version of the GC stored mark bits at the beginning of each page.  That potentially  causes other cache-related problems.  All mark bits contend for a small fraction of the cache.

 

The GC allocates memory from a free-list, but free-lists are built only a page at a time, when needed.  Building the free-list will force memory into the cache, but the hope is that it will still be there when the object is allocated by the client.

 

Hans

 

From: lijun [mailto:lijun-E8mQNyieTr9F8jW2Upzce+ga9YzINl48@public.gmane.org]
Sent: Tuesday, February 07, 2012 7:26 PM
To: Boehm, Hans; boehm-HInyCGIudOg@public.gmane.org
Subject: about bitmap marking

 

Dear Boehm:

 

I'm sorry about my poor English.

 

I would like to hear about boehm gc.

 

Boehm gc(gc6.8) uses Bitmap marking as default?

 

In Boehm gc, bitmap marking rules out storing mark-bits in object headers?(move mark-bits to other area)

 

Does Boehm gc get memory area from a freelist when allocate memory?

 

I'm waiting for your reply eagerly.

 

Best regards.

 

 

Li Jun

Univ. of Tsukuba

_______________________________________________
Gc mailing list
Gc@...
http://www.hpl.hp.com/hosted/linux/mail-archives/gc/
Boehm, Hans | 10 Feb 18:30
Picon
Favicon

RE: about bitmap marking

Each page has a separate mark bit table, since the heap is not presumed to be contiguous.  The mark bit table is allocated separately from the page itself, but also contains other information about the page.  Much of this is outlined in http://www.hpl.hp.com/personal/Hans_Boehm/gc/gcdescr.html .

 

Hans

 

From: lijun [mailto:lijun-E8mQNyieTr9F8jW2Upzce+ga9YzINl48@public.gmane.org]
Sent: Friday, February 10, 2012 3:32 AM
To: Boehm, Hans; boehm-HInyCGIudOg@public.gmane.org
Cc: gc-V9/bV5choksm30D7ZfaTJw@public.gmane.org
Subject: RE: about bitmap marking

 

Thank you for your information.

 

The mark bits in a separate region of memory are stored continuously in a table?

(In sweep phase, the collector scans mark bits in the table)

There is a bitmap table in each page?

 

Best regards.

 

Li Jun

 

From: Boehm, Hans [mailto:hans.boehm <at> hp.com]
Sent: Friday, February 10, 2012 4:09 PM
To: lijun; boehm-HInyCGIudOg@public.gmane.org
Cc: gc-V9/bV5choksm30D7ZfaTJw@public.gmane.org
Subject: RE: about bitmap marking

 

gc6.8 and all relevant versions always keep mark bits in a separate region of memory.  There is no way to configure the collector differently.

 

I do not understand your second question.  The collector, including 6.8, always uses free-lists for small objects.  There is no way to configure that differently.

 

Hans

 

From: lijun [mailto:lijun <at> ialab.cs.tsukuba.ac.jp]
Sent: Thursday, February 09, 2012 6:06 AM
To: Boehm, Hans; boehm-HInyCGIudOg@public.gmane.org
Cc: gc-V9/bV5choksm30D7ZfaTJw@public.gmane.org
Subject: RE: about bitmap marking

 

I am sorry that i did not ask more clearly.

I just want to know about gc6.8.

 

I don’t know whether gc6.8 uses bitmap marking or not if I build the collector without any options or if I don’t set any parameters in my C program?

(For example, if I build gc6.8 with -DGC_LINUX_THREADS -DPARALLEL_MARK -DTHREAD_LOCAL_ALLOC, the collector will run the mark phase in parallel.

If I call GC_enable_incremental and set GC_time_limit in my program, the collector will perform an incremental gc. etc)

 

If yes, I want to know whether mark bits are out of the objects or not in gc6.8.

 

About freelist, I want to know whether the following is right or wrong in gc6.8?

C program <- (memory block) <- freelist(list of free memory blocks)

 

I'm waiting for your reply eagerly.

Best Regards.

 

Li Jun

 

 

From: Boehm, Hans [mailto:hans.boehm <at> hp.com]
Sent: Thursday, February 09, 2012 12:57 AM
To: lijun; boehm-HInyCGIudOg@public.gmane.org
Cc: gc-V9/bV5choksm30D7ZfaTJw@public.gmane.org
Subject: RE: about bitmap marking

 

[Copying response to gc mailing list.]

 

6.8 is old at this point, but this hasn’t changed much in 7.2alpha6.

 

The collector always stores mark bits in a map off to the side.  When I last looked at this ages ago, that seemed to be a clear win.  We need to look up a page descriptor for the object being marked in any case.  Thus the overhead is smaller than it would probably be for a non-conservative collector.  Having the mark bit in the object, or even on the same page, would mean accessing pages containing pointer-free objects during a GC.  In my experience, in well-tuned applications, a large fraction of the heap is pointer-free.  The GC could often touch twice as many pages during a GC with the mark bits in the objects.

 

An ancient version of the GC stored mark bits at the beginning of each page.  That potentially  causes other cache-related problems.  All mark bits contend for a small fraction of the cache.

 

The GC allocates memory from a free-list, but free-lists are built only a page at a time, when needed.  Building the free-list will force memory into the cache, but the hope is that it will still be there when the object is allocated by the client.

 

Hans

 

From: lijun [mailto:lijun <at> ialab.cs.tsukuba.ac.jp]
Sent: Tuesday, February 07, 2012 7:26 PM
To: Boehm, Hans; boehm-HInyCGIudOg@public.gmane.org
Subject: about bitmap marking

 

Dear Boehm:

 

I'm sorry about my poor English.

 

I would like to hear about boehm gc.

 

Boehm gc(gc6.8) uses Bitmap marking as default?

 

In Boehm gc, bitmap marking rules out storing mark-bits in object headers?(move mark-bits to other area)

 

Does Boehm gc get memory area from a freelist when allocate memory?

 

I'm waiting for your reply eagerly.

 

Best regards.

 

 

Li Jun

Univ. of Tsukuba

_______________________________________________
Gc mailing list
Gc@...
http://www.hpl.hp.com/hosted/linux/mail-archives/gc/

Gmane