[m-dev.] Re: FWD: [gclist] memory leaks & Boehm collector
Bill Foote
Bill.Foote at Eng.Sun.COM
Thu Jul 15 13:02:17 AEST 1999
> Delivered-To: majordom-gclist-out at iecc.com
> Date: Thu, 15 Jul 1999 10:48:28 +1000
> From: Fergus Henderson <fjh at cs.mu.OZ.AU>
> To: Garbage Collection mailing list <gclist at iecc.com>
> Cc: Mercury Developers <mercury-developers at cs.mu.OZ.AU>
> Subject: [gclist] memory leaks & Boehm collector
> Mime-Version: 1.0
>
> [....]
>
> I seem to recall Hans mentioning something about how it would be nice
> to have a tracing tool that would take an arbitrary address and, if the
> address was live, would give you back a trace showing the chain of
> pointers from one of elements of the root set to that address. Did
> anyone ever get around to writing such a tool?
>
> P.S. I'm using gc-4.14 on a dec-alpha-osf3.2 system, with egcs-1.1.2.
Hi. I'm not a member of either of these lists, but this e-mail got
forwarded to me, and I thought I'd comment.
I made exactly such a tool for the JDK. Instead of trying to run with
a live VM, I made the VM dump a file that contains essentially an image
of the Java object heap. It was originally a weekend hack, but the
functionality was picked up into JDK 1.2, and became the heap dump
record of JVMPI (the Java Virtual Machine Profiler Interface). This is
being used by tools like OptimizeIt to do all kinds of neat stuff, including
(I'm told) the query you describe.
I also hacked together a little tool that reads these dump files, and lets
you do various queries on it. The most interesting query is exactly
the one you describe, and I call it "reference chains from rootset." When
building up the chain of pointers, one thing I found is that it's really
important to do the upward search for roots breadth first -- it's obvious
why when you think about it, and quite amusing when you don't :-)
Anyway, if anyone wants to see how this turned out in a Java context, check
out http://java.sun.com/people/billf/heap/ .
Cheers,
Bill
--
Bill Foote bill.foote at eng.sun.com
EmbeddedJava Platform Group, Sun Micro http://java.sun.com/people/billf/
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list