objects on heap in running jvm

V

visionset

In the past I'm sure I used a tool (possibly jdb) to examine objects
created in a running jvm. I think I added some arguments to the
command line for the app I was investigating and then ran the tool to
attach it. The output I think was quite simple tabulated plain text.
It gave me memory usage of the objects I created in my app. Does
anyone know of this tool or one that will do this job? I really can't
find the one I used or can't get jdb to do it. Might have to use this
for 1.4 app but it will be useful whatever version.

TIA
Mike W
 
L

Lew

In the past I'm sure I used a tool (possibly jdb) to examine objects
created in a running jvm. I think I added some arguments to the
command line for the app I was investigating and then ran the tool to
attach it. The output I think was quite simple tabulated plain text.
It gave me memory usage of the objects I created in my app. Does
anyone know of this tool or one that will do this job? I really can't
find the one I used or can't get jdb to do it. Might have to use this
for 1.4 app but it will be useful whatever version.

Bear in mind that any such profile is transitory. The Hotspot compiler can
change how much memory an object needs at run time through its various
optimizations.

GC complicates matters.

Profiler and GC output are useful for your purpose.
 
D

Daniel Pitts

Lew said:
Bear in mind that any such profile is transitory. The Hotspot compiler
can change how much memory an object needs at run time through its
various optimizations.

GC complicates matters.

Profiler and GC output are useful for your purpose.
There are tools though that help you take a "snapshot" of the memory
used in a JVM. This *can* be useful to track down memory leaks. I
think the tool is hprof, but I'm not sure.

Google for Java Heap Profile, and you'll probably stumble across a
useful tool.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top