This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH]: An almost working copying collector for gcc
- From: Daniel Berlin <dberlin at dberlin dot org>
- To: Geoff Keating <geoffk at geoffk dot org>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 12 Dec 2002 20:26:56 -0500
- Subject: Re: [PATCH]: An almost working copying collector for gcc
On Thursday, December 12, 2002, at 05:08 PM, Geoff Keating wrote:
Daniel Berlin <dberlin@dberlin.org> writes:
It copies (see below), but crashes because we have things we expect to
still point to the same place, but don't. The things that point to
them don't actually appear to be accessible from the root set, thus,
we
never forward them.
It's possible they are only touched from the set of roots added by
ggc_add_root, which need to be changed by hand to DTRT for a copying
collector.
You really wanted to try this on the pch-branch, which doesn't have
ggc_add_root, and does have all the places that refer to GCed memory
properly marked (or at least all I can find).
Oh, in that case, i'll give it a whirl.
It also has much better
support for the generic updating-pointers problem in the form of the
gt_pch_p_* routines.
Cool!
The main tricky part was actually handling the non-recursive chain_* in
a sensible way.
I'm sure you'll also discover the problem I recently hit with the C++
frontend, which depends on the ordering of certain pointers. I think
there might be a few other problems with hashtables that hash
pointers, too.
Thanks for trying this, though. Did you get any performance numbers
out of it?
Not yet.
But i'll rewrite it to work on the pch-branch, and see if it's any
easier.
--
- Geoffrey Keating <geoffk@geoffk.org>