This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH]: An almost working copying collector for gcc


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).  It also has much better
support for the generic updating-pointers problem in the form of the
gt_pch_p_* routines.

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?  Would it be worth rewriting it to be fully working?

-- 
- Geoffrey Keating <geoffk@geoffk.org>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]