java 以编程方式从命令行分析 HPROF 内存转储文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15977723/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
analyse a HPROF memory dump file from command line programmatically
提问by Abhishek
I was investigation with analyzing a HPROF file using Eclipse's Memory Analyser (MAT). The dominator tree, reports and the OQL interface look really useful. But all this has to be done manually from the MAT software.
我正在调查使用 Eclipse 的内存分析器 (MAT) 分析 HPROF 文件。支配树、报告和 OQL 界面看起来非常有用。但所有这些都必须通过 MAT 软件手动完成。
Is there a commandline interface so I can programmatically parse the HPROF and automatically generate custom reports.
是否有命令行界面,以便我可以以编程方式解析 HPROF 并自动生成自定义报告。
This would be useful to integrate this a test infrastructure to do a automatic memory analysis.
这将有助于集成此测试基础架构以进行自动内存分析。
Btw, the heapsize is will be between 10-60MB.
顺便说一句,堆大小将在 10-60MB 之间。
采纳答案by Deepak Bala
ParseHeapDump.shdoes what you're looking for. As for the follow up question I'm not sure what format the index files are stored in.
ParseHeapDump.sh 可以满足您的需求。至于后续问题,我不确定索引文件的存储格式。
回答by Joe Bowbeer
See bitbucket.org/joebowbeer/andromat, which is adapted from bitbucket.org/ekabanov/mat, which is a stripped-down command line version of Eclipse Memory Analyzer.
请参阅bitbucket.org/joebowbeer/andromat,它改编自bitbucket.org/ekabanov/mat,它是Eclipse Memory Analyzer的精简命令行版本。