How to find which objects are creating the most garbage
问题 I have an application with about 80 instances of 80 different classes. The amount of garbage generated by some subset of these classes is unacceptable and stop the world pauses are too long, since my application is real time. What I want to find is which classes are responsible for creating the largest number of objects on heap (not aggregate size, but raw number of objects), since this is what causes stop the world pauses to take so long. How do I find this out? If JVisualVM is required, I