This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
RE: Re: Garbage collector stopping my world for half a second
- From: Andrew Haley <aph at redhat dot com>
- To: "Boehm, Hans" <hans dot boehm at hp dot com>
- Cc: "Martin Egholm Nielsen" <martin at egholm-nielsen dot dk>, <java at gcc dot gnu dot org>
- Date: Fri, 2 Dec 2005 12:09:50 +0000
- Subject: RE: Re: Garbage collector stopping my world for half a second
- References: <65953E8166311641A685BDF71D8658266C1AA3@cacexc12.americas.cpqcorp.net>
Boehm, Hans writes:
> The size of the root set will be affected by the total size of libraries
> (or pieces of static libraries) you load. If the root sizes are the
> problem, it may not occur with a small test program, especially if it's
> statically linked. I would try running with GC_DUMP_REGULARLY.
>
> The simple test example may also have had less live data, or less
> pointer-dense data.
>
> I believe the collector is still scanning all sorts of junk (e.g.
> exception tables on some platforms) that it shouldn't be scanning. (The
> fact that it is scanning library data by default means that it sees Java
> pointers stored by CNI code into globals, which is probably good. The
> fact that it is sometimes scanning exception tables is clearly bad.)
>
> Given that you're on a slow machine, I think your best bets are:
>
> 1) Reduce root sizes if those are a large part of the problem.
Hans, one of the problems that I found it the the gc doesn't allow
fine-grained control over which libraries get registered as roots and
which don't. I fully intend to remove the need for auto-registration
of gc roots in libgcj (and I intend to do so soon) but if it's
possible in the meantime to scan some subset of shared libraries that
would help.
> 2) If that's insufficient, you might try getting the incremental GC to
> work.
I might point out for the uninitiated that the latter will be very
difficult indeed.
Andrew.