If you are open to using the IBM jdk for your testing, you can always use their
built-in (albeit proprietary) memory dump utility. Rather than look at it in
real time, you set a couple of environment variables and issue a command to
build a memory dump either at the command line or from within the application
using Dump.HeapDump(). At that stage you have a file that you can use their
Heap Analyzer tool, which will let you examine the entire contents of the heap
in various formats. You can search for particular objects by classname, drill
down through parent-child relationships, or use a leak locator to find likely
suspects.
You do need enough memory on the viewing machine to contain whatever heap was
allocated at the time of the snapshot. And it won't show you field values,
although if you are looking for a leak I don't consider it that big a deal.
On the plus side, it doesn't cost you any more performance-wise than a full
collection, and there really aren't any licensing/connection issues. Big heaps
really don't cause any issues. And of course, it will run on LInux.
gn
Link to heapdump article
http://www-128.ibm.com/developerworks/websphere/library/techarticles/0411_persichetti/0411_persichetti.html
Link to the HeapAnalyzer page on Alphaworks:
http://www.alphaworks.ibm.com/tech/heapanalyzer
>
> From: Chris Nelson <cnelson4eii@xxxxxxxxx>
> Date: 2005/04/20 Wed PM 02:24:38 EDT
> To: users@xxxxxxxxxx
> Subject: [cinjug-users] What's your favorite memory debugger (other than
> JProbe)
>
> Guys,
>
> We're trying to get a handle on memory usage in our
> application. We've been using JProbe a bit, but we've
> found it's memory snapshot tool to be unreliable -- it
> seems to fail when try capture a large snapshot
> (400-500) MB. Does anyone have a tool they like? We
> need something which will let us inspect the objects
> on the heap including field values. Oh, and we need
> it to be able to profile apps running on linux.
>
> --Chris
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------
> You may unsubscribe from this mailing list
> by sending a blank email addressed to:
> users-unsubscribe@xxxxxxxxxx
>
> --
> Find additional help by sending a blank email
> addressed to:
> users-help@xxxxxxxxxx
>
>
|