Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Memory Analyzer (MAT) plugin not opening heap prof in MAT Eclipse 4.1.2 automatically

Eclipse SDK

Version: 4.1.2
Build id: M20120223-0900
Memory Analyzer 1.1.1.201108240735  Eclipse Memory Analyzer

Hi, I have updated my eclipse to latest version, also installed Eclipse MAT plugin but when I click "dump HPROF file" it doesn't opens in in MAT rather gives me option to save the HPROF file.

Previously it automatically opens it in eclipse MAT. Please tell me how to fix this ?

I have also switched to "Memory Analysis" perspective and tried to open HPROF file but it throws me following error

Error opening heap dump 'com.game.hprof'. Check the error log for further details.
Error opening heap dump 'com.game.hprof.hprof'. Check the error log for further details.
Unknown HPROF Version (JAVA PROFILE 1.0.3) (java.io.IOException)
Unknown HPROF Version (JAVA PROFILE 1.0.3)
like image 203
AZ_ Avatar asked Mar 13 '12 07:03

AZ_


People also ask

How do I open memory analyzer tool in Eclipse?

With the Memory Analyzer feature installed, try Window -> Open Perspective -> Other... , then select Memory Analyzer and OK. Once the MA perspecive is open, one should be able to see the Memory Analyzer specific Eclipse menus.

How do I open a heap dump in Eclipse?

Open Eclipse MAT To open the heapdump, go to File > Open Heap Dump (Not Acquire Heap Dump) and browse to your heapdump location.

How do I open PHD in Eclipse Memory Analyzer?

Restart Eclipse when prompted. Choose File -> Open Heap Dump and choose your . phd file. It should open in MAT and allow you to figure out who is using all that memory.


3 Answers

try this:

in eclipse -> windows -> preference -> android --> ddms -> HPROF Action menu

choose: open in eclipse

like image 170
idiottiger Avatar answered Oct 16 '22 17:10

idiottiger


You can use HPROF Converter tool provided in android sdk.

The hprof-conv tool converts the HPROF file that is generated by the Android SDK tools to a standard format so you can view the file in a profiling tool of your choice.

hprof-conv <infile> <outfile>

More at HPROF Converter

After converting file opens without any Issue.

like image 25
Aduait Pokhriyal Avatar answered Oct 16 '22 15:10

Aduait Pokhriyal


In newer version of eclipse we need to set the default function for HPROF file and the default is "Save to disk". Follow the following steps to fix this :)

Window -> Preferences -> Android -> (press arrow to expand Android View) DDMS -> HPROF Action -> select "Open in Eclipse" see the image for reference

enter image description here

like image 8
AZ_ Avatar answered Oct 16 '22 16:10

AZ_