[Gc] Figured out my problem with finalization cycles.
Gtalbot at locuspharma.com
Fri Jun 5 09:28:02 PDT 2009
Thanks for continuing to look at the patch.
OK. I fixed the indentation level. Also included in the patch is a fix to GC_print_backtrace() that will detect cycles and stop. I added a recursive function in place of the loop in GC_print_backtrace() which maintains a list of visited objects on the stack and searches at each recursion. Not that great (O(n^2)) but probably adequate for debugging.
Let me know if this works for you. If so, would someone be able to commit this?
It's current with CVS as of ~12:20 EST 6/5/2009.
George T. Talbot
gtalbot at locuspharma.com
P.S. I had one other question: Can the atomic ops library be exposed when building the collector so that I could use it in my program?
> -----Original Message-----
> From: Ivan Maidanski [mailto:ivmai at mail.ru]
> Sent: Friday, June 05, 2009 10:27 AM
> To: gc at linux.hpl.hp.com
> Cc: Talbot, George
> Subject: Re: [Gc] Figured out my problem with finalization cycles.
> "Talbot, George" <Gtalbot at locuspharma.com> wrote:
> > Hi,
> > Ivan, thanks for looking at the patch.
> > Ok. This version of the patch fixes the issue identified by Ivan where
> AO_fetch_and_add1() isn't available by reverting to the previous behavior
> on such a platform.
> Small tip for the patch: it's good to inc indentation level inside #if-
> > What would I need to do to GC_print_backtrace() to have it detect
> pointer cycles while it's printing; note that at the point when
> GC_finalize() is calling it, GC_finalize() appears to be marking to find
> cycles involving finalizeable items.
> IMHO, GC_print_backtrace() should be fixed to prevent infinite printing. I
> think, a nested loop would do (since time doesn't matter here).
> > This patch is current w.r.t. CVS as of ~9:15AM EST 6/5/2009.
> > Thanks.
> > --
> > George T. Talbot
> > <gtalbot at locuspharma.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 8899 bytes
Url : http://napali.hpl.hp.com/pipermail/gc/attachments/20090605/d7bfe135/atomicize_print_callers_reentry-0001.obj
More information about the Gc