I have been using Eclipse Memory Analysis tool to examine a heap dump. I have not seen any cases where an object was kept alive by a local variable in a thread stack.
Are java thread stacks preserved in heap dumps? If not, do these objects get counted as unreachable objects in the dump? If so, is there any way to preserve the thread stacks so that uncollected garbage can be distinguished from local variable values?
Yes
Heap dumps from more recent JVM's (as of 2010) included Thread Stacks. Eclipse Memory Analyzer 0.8 (released in January 2010) included support for extracting this information: http://www.eclipse.org/mat/0.8/noteworthy.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With