Tips and Tricks in a world of Mix

 

Right click on the project –> debug as-> android project

image

 

run through emulator

image

 

–> DDMS left upper corner

image

update heap

image

 

 

cause GC

image

 

you can see graph per line in stats

image

 

 

Dump HPROF file

image

 

Download Mat – memory analyzer tool available here

 

Convert the hprof from android to regular java dump :

The hprof file you get from Android has android specific format. You should convert hprof file take from Android OS into standard hprof format. For this you can use hprof-conv tool that is located at AndrodiSDK/tools/hprof-conv.

For example:

               hprof-conv android.hprof mat.hprof

And then open mat.hprof in Memory Analyzer.

 

overview includes all kind of sets..

image

 

Find Leaks

image

 

image

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Tag Cloud

%d bloggers like this: