Can Eclipse MAT's ParseHeapDump utility run OQL?

409 views Asked by At

Typically I use Eclipse MAT GUI to run OQL on a heap dump to extract data. I was just wondering if there is any way to run any OQL with ParseHeapDump utility? Basically, I wanted to go beyond those four standard reports and run my own OQLs to find out cause.

1

There are 1 answers

0
user13762112 On

You would have to write your own report which could then execute the OQL. The report is a small XML file. See MAT forum post: Command Line processing of 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.

Eclipse Memory Analyzer 1.11 will have the org.eclipse.mat.api:query to run a single query in a report. Unfortunately the command line escaping of backslash and double-quote makes the syntax look complicated, but there is help.