Reputation: 5007
I start using visual vm , in order to find out why the app is using so much memory.
Just to be sure i understand things:
A complete memory map is aquired via the heapdump ?
With memory profiler (because only the 10 object is took into account ?) there is just an overview ?
Did I understood correctly ?
Thanks
Upvotes: 1
Views: 2913
Reputation: 200138
VisualVM has a memory profiling mode where it continually tracks what's going on with memory allocation in your application. In this mode it can't bear the load of tracking every single object, so the compromise is to track every 10th allocation. On the other hand, there is the Heap Dump feature available on the Monitor tab, where you get the full details on all objects. This dump is the equivalent to the command-line heapdump
utility.
Upvotes: 3
Reputation: 3446
1) heapdump lets you find out, which objects are actually held by your app and consume heap
2) memory profiler shows you at which rate your app allocates objects (+their class). This will mostly consist of temorary allocated objects
(1) is mostly to find memory leaks / understand heap consumtion
(2) is most usable to profile performance as object allocation cost performance directly and indirectly (fragmentation, more gc's). Also in case of memleaks this can give you an indication where objects causing a memleak come from.
Upvotes: 3