|Re: Memory leak analysis [message #105664 is a reply to message #103965]
||Thu, 19 July 2007 06:27
| Asaf Yaffe
Registered: July 2009
Andrew Zahra wrote:|
> I am just trying out TPTP memory analysis with a small test program to
> see how it works. When I run a basic memory analysis with the following
> example, I don't see any correlation of the results that would actually
> help me find the "problem" in this manufactured example.
> The Memory Statistics show char, byte, short and int being the
> largest numbers of instances. But there is no connection back to my test
> code and I am surprised to no have java.lang.Integer even listed.
> The Object References view also provides no more info, being similarly
> flat and without any connection back in to my test code.
> Contrast this with running the same code under Netbeans profiler and I
> get a large number of java.lang.Integer objects and a stack trace to the
> Am I missing something? How do I actually get useful info out of the
> basic memory analysis?
> Thanks in advance... sample code follows.
Thank you for your interest in TPTP.
Have you tried the new Heap Profiler in TPTP 4.4? Although not as mature
as the Netbeans profiler, it provides accurate allocation details and
can trace allocations to their source (but without a full stack trace).
To use the new profiler:
1. Install Eclipse 3.3
2. Install TPTP 4.4 (latest patch, 188.8.131.52 is recommended)
3. Launch Eclipse with a Java 5 (or 6) JVM.
4. Configure a Heap Profiling session, double click the Memory Analysis
collector in the Monitor tab, and select the "Track Object Allocation
Note that your example will not work properly with the default filter
set, as java.lang.* objects (e.g., Integer) are excluded by default), so
make sure you change this filter before starting to profile.
Eclipse TPTP Committer, JVMTI Profiler
Powered by FUDForum
. Page generated in 0.16853 seconds