> > A possibly more convenient way to find out how many objects > of a given type you have is to use the "jmap -histo" command. > That will tell you how many instances of each type you have > in the heap, and how much space those instances are taking > up. You give it an argument which is is the pid of the java > process you want to examine. E.g.,
One thing to consider here is how do you run jmap in a PROD systems. The fastest way would be to take a core out of the JVM and run jmap against it. Running jmap against a large JVM, usually found in app servers, would result in service down, which nobody is looking for that. When you run jmap -histo your target is stopped, thing which is important to notice ( depending very much if you can afford the pause on that machine - most people have 4,6 JVMs running part of a large cluster and it is afordable to take down one of it for debug ) DTrace would be the most elegant way to trace object allocations. > $ jmap -histo:live 698 thanks for pointers. This seems to be a new feature of jdk 1.6. At least I couldn't find this on jdk 1.5 Rgds, Stefan _______________________________________________ dtrace-discuss mailing list [email protected]
