Reputation: 22041
I have a huge heap dump (around 12GB) and it will take forever to open it with MAT
or jvisualvm
. I only want to get the thread dump out of it without indexing the objects. Is it possible with the above or any other tools?
Upvotes: 4
Views: 1307
Reputation: 441
The latest snapshot versions of Memory Analyzer (preview of 1.11) have the ability to discard objects on parse. Having a discard ratio of 100% with a pattern of (?!.Thread). would discard all objects except those of a type with 'Thread' in the classname. That might speed up parsing, though the parsed dump would be nearly useless, but it would have a thread dump (but without thread names or local variables) which might be enough for your purposes.
Upvotes: 0
Reputation: 683
Had the same problem recently.
I just pushed the project doing it on GitHub. I know, it is way too late, but probably will save some time to someone in future.
https://github.com/aafomin/obadiah
Upvotes: 1