How to profile heap usage?
Try using -Xaprof to get a profile of the allocations (objects and sizes) of your application.
Also try -agentlib:hprof=heap=all (or other option, try -agentlib:hprof=help for a list)
Also try -agentlib:hprof=heap=all (or other option, try -agentlib:hprof=help for a list)