The dump file produced by +HeapDumpOnOutOfMemoryError when OutOfMemoryError is thrown includes stack roots (both locals and JNI locals). These locals are emitted to the dump with an empty stack trace. It would be desirable to emit the stack trace all threads so that the stack roots could be better understood.
This work is also related to the new heap snapshot format that we hope to include in JDK 7, see
for more information.