简体   繁体   English

Eclipse MAT 的 ParseHeapDump 实用程序可以运行 OQL 吗?

[英]Can Eclipse MAT's ParseHeapDump utility run OQL?

Typically I use Eclipse MAT GUI to run OQL on a heap dump to extract data.通常,我使用 Eclipse MAT GUI 在堆转储上运行OQL以提取数据。 I was just wondering if there is any way to run any OQL with ParseHeapDump utility?我只是想知道是否有任何方法可以使用 ParseHeapDump 实用程序运行任何 OQL? Basically, I wanted to go beyond those four standard reports and run my own OQLs to find out cause.基本上,我想超越这四个标准报告并运行我自己的 OQL 来找出原因。

You would have to write your own report which could then execute the OQL.您必须编写自己的报告,然后才能执行 OQL。 The report is a small XML file.该报告是一个小的 XML 文件。 See MAT forum post: Command Line processing of hprof请参阅MAT 论坛帖子:hprof 的命令行处理

I think you could also pass in the actual OQL command from your command line using ${} substitution in the report XML, but you would need to be careful about substitution and escaping of quotes etc.我认为您也可以在报告 XML 中使用 ${} 替换从命令行传入实际的 OQL 命令,但是您需要小心替换和转义引号等。

Eclipse Memory Analyzer 1.11 will have the org.eclipse.mat.api:query to run a single query in a report. Eclipse Memory Analyzer 1.11 将使用org.eclipse.mat.api:query query 在报告中运行单个查询。 Unfortunately the command line escaping of backslash and double-quote makes the syntax look complicated, but there is help.不幸的是,命令行转义反斜杠和双引号使语法看起来很复杂,但有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM