Search code examples
eclipse-memory-analyzer

How to save MemoryAnalyzerTool (MAT) Object Query Language (OQL) result to file?


The result of my query is too large for the table (100k elements). I want to save it to a file so I can apply text processing like sort, uniq and awk to do interesting aggregates like group.

I tried saving it to a txt file, but the result looks like:

myClass
---------------------------------------------
String1
String2
.
.
.
String20
Total: 20 of 750,129 entries; 750,109 more
--------------------------------------------

How can I save the entire result to a file?


Solution

  • After executing OQL query, select sigma row.

    i.e.:

    Total: 16 of 2,584 entries; 2568
    

    enter image description here

    Then press icon of "Export" on the top, and choose "Export to CSV..."

    enter image description here