Vic
Vic

Reputation: 22041

Extract thread dump from a heap dump

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

Answers (2)

user13762112
user13762112

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

Average Joe
Average Joe

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

Related Questions