To take a heap dump:
Run "jmap -dump <pid>" to dump the heap then use one of the other tools provided by Oracle (jvisualvm) to examine the results, which will tell you what objects were in use at the time the heap was taken. If you configure your
java command-line args right you can also attach jvisualvm and monitor memory/thread/cpu usage live, but I don't remember the args to do that off the top of my head.
I'm assuming both of these programs are available in Linux JDK.