Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mat-dev] Analyzing a heap dump remotely

Thanks for the pointers, Andrew.

On Tue, Jun 27, 2023 at 3:00 PM Andrew Johnson <andrew_johnson@xxxxxxxxxx> wrote:

See batch mode: https://help.eclipse.org/latest/topic/org.eclipse.mat.ui.help/tasks/batch.html?cp=55_3_14

 

You will need a big heap to analyse your dump. See https://help.eclipse.org/latest/index.jsp?topic=/org.eclipse.mat.ui.help/welcome.html to edit the heap size for MAT.

 

If you still don’t have a big enough heap then try this.

 

If you just want a quick count of which objects are in the heap then this might help. Discarding objects means that they are not processed by MAT, but a count of them is kept in the unreachable objects histogram.

 

del ..\..\..\matdump_20221221_145125.index

 

ParseHeapDump ..\..\..\matdump_20221221_145125.hprof.gz -discard_ratio=100 "-discard_pattern=.+" -command=unreachable_objects org.eclipse.mat.api:query

 

Unpack and view ..\..\..\matdump_20221221_145125_Query.zip

 

You could then delete the index, and reparse discarding say 50% of some of the top few classes and run the leak suspects report.

 

del ..\..\..\matdump_20221221_145125.index

 

ParseHeapDump ..\..\..\matdump_20221221_145125.hprof.gz -discard_ratio=50 "-discard_pattern=java.lang.String| org.eclipse.swt.graphics.Point" -command=unreachable_objects org.eclipse.mat.api:suspects

 

With luck you won’t have discarded the important objects and the report will be meaningful.

 

Andrew Johnson

 

 

From: mat-dev <mat-dev-bounces@xxxxxxxxxxx> On Behalf Of Himanshu Vashishtha
Sent: Tuesday, June 27, 2023 8:05 AM
To: mat-dev@xxxxxxxxxxx
Subject: mat-dev] Analyzing a heap dump remotely

Hello MAT dev team,

 

I appreciate the great work you folks are doing, thanks for that!

 

I'd like to analyze a 120 GB heap dump, and I'd prefer not to download it locally to do a UI based traversal/exploration but rather skim through it programmatically. What are the options?

 

Thanks,

Himanshu

Unless otherwise stated above:

IBM United Kingdom Limited
Registered in England and Wales with number 741598
Registered office: PO Box 41, North Harbour, Portsmouth, Hants. PO6 3AU
_______________________________________________
mat-dev mailing list
mat-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/mat-dev

Back to the top