[Mono-list] mono-0.24 build and gdb

Paolo Molaro lupus@ximian.com
Wed, 7 May 2003 20:00:19 +0200

On 05/07/03 Jim Blandy wrote:
> Out of curiousity --- do you folks still have plans to provide precise
> GC, or have you gotten comfortable enough with the Boehm collector
> that you don't feel it's worth the trouble any more?  There's been
> enough hard work put into the Boehm GC that it would probably take a
> while for a freshly written precise collector to catch up, in both
> performance and stability.

The Boehm GC is quite good and a conservative GC has many benefits
and it's way easier to debug:-)
I think that in most micro benchmarks a precise and generational GC is
probably going to win, but, as one of Boehm's paper explains, in the
real world his GC performs fairly well.
What I think will happen is that we'll use more of libgc's features,
like Zoltan did with typed allocations and we'll do as many tweaks as
possible: for example, linking libgc statically or setting a larger heap
size than the default may have a huge impact on performance in many
cases (in a microbenchmark statically linking was worth 40%, setting
the initial heap size to 1/8th of the total allocated size was worth
another 15%). If we statically link libgc we may be able to tweak it
to suit how the CLR works better, so I expect people to look at how
libgc can be tuned for us.
So, basically, for mono 1.0 a precise GC is out of the question.
This doesn't mean, though, that people with an hitch can't start working
on it: the new JIT keeps information about where references and managed
pointers go up until code generation, so it should not be too hard to
build the maps needed by a precise or moving GC. The runtime library
may need more changes, or the new GC needs to support some special
features to better allow for a mix of managed an unmanaged code.

>     * Will require API changes if we ever use a precise GC

Those are changes to the embedding API and it mostly boils down to use
functions that return gc handles instead of the raw object pointers.
I guess that if someone is interested enough, he can write the wrappers
around the existing functions and start using those when embedding mono
(that API would work with both a precise and moving GC as well as with
Boehm GC).


lupus@debian.org                                     debian/rules
lupus@ximian.com                             Monkeys do it better