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: How to debug the GC


> From: Jeff Sturm [mailto:jsturm@one-point.com]
> 
> On Tue, 17 Jun 2003, Jeff Sturm wrote:
> > If you need any help interpreting the output, post samples 
> here or the GC
> > list: http://linux.hpl.hp.com/cgi-bin/mailman/listinfo/gc
> 
> Oops, this site doesn't seem to be accessible.  See the "Contacts"
> information at the bottom of 
> http://www.hpl.hp.com/personal/Hans_Boehm/gc/
> for subscribe info.
> 
Sorry about that.  Unfortunately the web site is behind the HP firewall.
Self-administration via email works.

The GC has some additional infrastructure to debug things like this, but
it's not currently functional from gcj.  If you could get gcj to do all
allocation through the GC_debug... routines (or if you fixed the GC to
no longer require this) and if you built the collector with
-DKEEP_BACK_PTRS, then you could use the gc_backptr.h interface to
randomly sample objects in the heap, and ask why they are reachable.
Once you've let your program run long enough that most of the heap
contents is "leaked" memory, that should give you a fairly quick answer.

Making this work from gcj is on my list, but I don't think I'll get to it within
the next month or so.  I think much of the code is already set up for it, so I'm
not sure how much real work is involved.  Unfortunately, it would be hard
to implement it as anything other than a configure-time option, since the 
time-critical part of the garbage collector has to do some added work.
And currently object allocation has to work differently.

Hans


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