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
  • From: Andrew Johnson <andrew_johnson@xxxxxxxxxx>
  • Date: Tue, 27 Jun 2023 09:29:59 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=uk.ibm.com; dmarc=pass action=none header.from=uk.ibm.com; dkim=pass header.d=uk.ibm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Bl2oplLz6A20V01p6eyp75GdsSnHjruR/SlQXNR9vKM=; b=nXwWXmuAbz2AcMQwIFoi5tYoq6zMQWN5cLpLIItmkkSRg51DPtz8snKVbtOpgFVsnqoNl76A93Scs1ORcp0CyupougIx4KnZHjZMOsRZjD+RgMS5e1VaOOBCdqV/UEi4ycJAW+YdK/R3jeMFq9leTbmfjIJ7EWYe1XbMeyiign0bssF0XEQ47AmieZqLa65UyztT773GbfZG5yXK2WXGzysNYg3Lv3AAsJwo/Slm5F36BfHuP9rF730qwsyffv9jc1SJ8fXj8Gs2/DHpzWlcdfVm1v3jnZTxkimHPeU+qHyWkD66iNRaq3VwYIJBbEi9OpAFKMADq4a/B3UNsNVziQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CVERR9bJFk6MeYQEltUoEbXjldU26qO0dSItKmiie8vKSr9vKYuKiv/Yi4vh/VXigT9kdjpuo5rZnzy52JHNT81O7MeoD9EANVVRmTxj6gVljpi3Vj+09Mf5hrHlXGjUcfFjwPwe/xE3LvXXjMLKGRfDABJAE8KN2kyX9R8d5N/s1XU9okAnUDQWSaIm0CCfTxjSG4S7ZBimLdUUqMFGRFcvYw8Heq79YBqeCVFa0wQYrjGVz8LTh6EFT7aeJ3ke8sz5vJTaDuL9Nz8u80Wa8bIyaitO/O5T/Ugsb+N6EYHkA+gjfhIjRmBHlCDsJapQ9qydih9Q70c0zUWZoiW+tw==
  • Delivered-to: mat-dev@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/mat-dev/>
  • List-help: <mailto:mat-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/mat-dev>, <mailto:mat-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/mat-dev>, <mailto:mat-dev-request@eclipse.org?subject=unsubscribe>
  • Thread-index: AQHZqNnx8LiP3j/2ekeMMmFOYxeK1Q==
  • Thread-topic: [mat-dev] Analyzing a heap dump remotely

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

Back to the top