Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Memory Analyzer » How to serialize ISnapshot object(Unable to serialize ISnapshot)
How to serialize ISnapshot object [message #1854630] Wed, 31 August 2022 07:36 Go to next message
Mahesh D is currently offline Mahesh DFriend
Messages: 4
Registered: May 2022
Junior Member
Hello,

I am working on a web application where I have 2 separate servers for UI (Frontend code) and API(backend code): Client (UI) server and API server.

I have an option to upload a heap dump file in the UI. When it is uploaded in UI, I am sending the heap dump from the client-server to the API server. On the API server, I am using Eclipse MAT APIs to open heap dump and get ISnapshot object.

Now I want to transfer the ISnapshot object from the API server to the Client server. But I am unable to serialize the object. Is it possible to serialize it?

Re: How to serialize ISnapshot object [message #1855238 is a reply to message #1854630] Mon, 03 October 2022 16:00 Go to previous messageGo to next message
Andrew Johnson is currently offline Andrew JohnsonFriend
Messages: 205
Registered: July 2009
Senior Member
The ISnapshot object would be too big to serialize - as it would have to include all the information in the original dump file and the index files, so could be GB in size.
I suppose it might be possible to create your own implementation of an ISnapshot object on the client which communicates with the server to obtain the information from the server ISnapshot - but that is going to be complicated.

Does project JIFA, code at GitHub eclipse JIFA look of interest?
There was an attempt many years ago to get a client/server version of MAT using Remote Application Platform - but that might be hard to get working again.
Re: How to serialize ISnapshot object [message #1858753 is a reply to message #1855238] Wed, 19 April 2023 12:17 Go to previous messageGo to next message
Mahesh D is currently offline Mahesh DFriend
Messages: 4
Registered: May 2022
Junior Member
Hi Andrew, Thanks for the reply.

I have managed to regenerate the snapshot object using index files on the UI server. As @Krum Tsvetkov mentioned here (https://www.eclipse.org/forums/index.php/t/243401) I have developed an Eclipse plugin and added an extension point to it. When I parse the heap dump captured from OpenJ9 then it is throwing the below error:

org.eclipse.mat.SnapshotException: Error opening heap dump 'heap_dump.out'. Check the error log for further details.
	at org.eclipse.mat.parser.internal.SnapshotFactoryImpl.parse(SnapshotFactoryImpl.java:280)
	at org.eclipse.mat.parser.internal.SnapshotFactoryImpl.openSnapshot(SnapshotFactoryImpl.java:126)
	at org.eclipse.mat.snapshot.SnapshotFactory.openSnapshot(SnapshotFactory.java:147)


I uploaded the same dump in the Eclipse MAT tool but I got the same error. I downloaded Eclipse MAT from the IBM website and uploaded the heap dump. It worked there.

Do we have any extension point for OpenJ9 heap dumps?

https://www.eclipse.org/forums/index.php/t/243401/
Re: How to serialize ISnapshot object [message #1858792 is a reply to message #1858753] Sat, 22 April 2023 16:05 Go to previous message
Andrew Johnson is currently offline Andrew JohnsonFriend
Messages: 205
Registered: July 2009
Senior Member
You need the IBM DTFJ Feature: https://help.eclipse.org/latest/topic/org.eclipse.mat.ui.help/tasks/installDTFJ.html That version is for dumps produced by IBM Java 8 and below.

To read dumps produced by IBM Semeru Java you can use the version of MAT on the IBM website, but I don't know how you can extract the DTFJ feature / plugins to install them into your Memory Analyzer installation.

Previous Topic:MAT Histogram Objects count is not equal Android Studio Profiler
Next Topic:Programmatically detect memory leaks using MAT API
Goto Forum:
  


Current Time: Mon Jan 13 21:47:28 GMT 2025

Powered by FUDForum. Page generated in 0.03299 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top