This is the mail archive of the java@gcc.gnu.org mailing list for the Java 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: Re: Garbage collector stopping my world for half a second


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.


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