db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Embretsen <John.Embret...@Sun.COM>
Subject Re: help/advice needed on reference chasing
Date Thu, 02 Mar 2006 14:01:14 GMT
Bryan Pendleton wrote:

>> Is there any tooling builtin to the JVM to show reference chains, so I
>> can see at shutdown who is holding onto the generated plan?
> Perhaps this can help? https://hat.dev.java.net/doc/README.html
> bryan

It depends on which jvm you are using. The tool referenced above, HAT (Heap 
Analysis Tool), is now obsolete, although you might be able to get the 
information you need from it. You can create a binary heap dump using hprof 
(included in JDK1.5, see 
http://java.sun.com/developer/technicalArticles/Programming/HPROF.html) and 
browse it using HAT or jhat (included with Mustang/JDK1.6).

Mustang also includes numerous other great improvements in this regard. You 
may want to check out the OQL (Object Query Language):


Snmipped example:

Show referents that are not referred by another object. i.e., the referent is 
reachable only by that soft reference:

     select f.referent from java.lang.ref.SoftReference f
     where f.referent != null && referrers(f.referent).length == 1

Hope it helps...


View raw message