compile time regressions (was: merging for 3.4)

Daniel Berlin dberlin@dberlin.org
Tue Dec 10 06:58:00 GMT 2002


On Tuesday, December 10, 2002, at 01:37  AM, Neil Booth wrote:

> Dan Nicolaescu wrote:-
>
>> It looks like there was a significant increase in the garbage
>> collection time. It's strange that GC is so expensive for C++
>> compilation.
>
> I think GC is turning out to be a mistake, even though it saves
> us from nasty memory issues.  It means we have no idea what code
> is gradually getting worse; it just shows up as "GC".  And it
> gives poor locality.
The partial solution to this is generational copying collection.
(The full solution is to use garbage collected pools/arena so that we 
are allocating things we access together, together).
Our poor locality is also generally from the fragmentation of memory 
that is occurring.
So is our large footprint.
We could at least start with a non-generational copying collector (to 
avoid needing a barrier) and see if it helps.

It's not too hard to turn gengtype into something that emits copying 
routines, reusing the mark bit as our bit to determine forwarded 
pointers.
I can actually say it's not too hard because I did it one day when i 
was bored.
Took a few hours, and i never completely finished converting (mainly 
didn't feel like transforming the ggc_test_and_set_mark calls and 
blocks at the time), but it's doable.
If you zero out the old space, you'll quickly discover where we have 
pointers to gc'd info from non-gc'd things.
:)
>
> Neil.



More information about the Gcc mailing list