Various jmap questions
1) Does the (default?) -all mode include unreachable (but not yet collected) objects?
2) Do both the all and live mode include weakly referenced objects?
3) HotSpotVirtualMachine#dumpHeap() returns an InputStread (that is dumped to stdout in drain()). I assume the reason for this is to display progress/debug messages, correct?
4) When dumping a remote VM process (through jsadebugd), I assume that the dump file is created on the remote system, correct?
5) Is there any news on the development of a library to read HPROF snapshots?
By default jmap -histo and -dump will dump all objects - this includes unreachable and weakly reachable objects. If you use the "live" sub-option then it triggers a full GC first and this means the histogram or heap dump will have only strongly or softly reachable objects. I hope that helps with #1 and #2.
The dumpHeap method that you have found is an internal method. The input stream that it returned is used to read any output messages from the dump operation.
The jsadebugd daemon is used for connecting to core files or hung processes on remote machines. If you use the heap dump tool then it will be generated on the remote system.
For the HPROF question I would suggest going here:
https://heap-snapshot.dev.java.net/
I hope this helps.