Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Memory/Performance analysis tools for Android [closed]

I am new to Android. Can the standard Java Memory and performance analysis tools be used with Android?

For e.g. Can we create a heapdump file and analyse the Android app? Or Use Eclipse TPTP to analyse the memory/performance?

If its not possible to use standard Java tools for this purpose then is there any Android specific tools for Memory and performance analysis?

like image 379
18bytes Avatar asked Jul 16 '12 13:07

18bytes


2 Answers

If you use Eclipse, DDMS should help you do most of what you need.

DDMS - Tracking memory allocation of objects

DDMS provides a feature to track objects that are being allocated to memory and to see which classes and threads are allocating the objects. This allows you to track, in real time, where objects are being allocated when you perform certain actions in your application. This information is valuable for assessing memory usage that can affect application performance.

To track memory allocation of objects:

In the Devices tab, select the process that you want to enable allocation tracking for. In the Allocation Tracker tab, click the Start Tracking button to begin allocation tracking. At this point, anything you do in your application will be tracked. Click Get Allocations to see a list of objects that have been allocated since you clicked on the Start Tracking button. You can click on Get Allocations again to append to the list new objects that that have been allocated. To stop tracking or to clear the data and start over, click the Stop Tracking button. Click on a specific row in the list to see more detailed information such as the method and line number of the code that allocated the object.

like image 76
ian.shaun.thomas Avatar answered Oct 12 '22 22:10

ian.shaun.thomas


JProfiler can read Android heap dumps directly, without the need to convert them to the JSE format.

Disclaimer: My company develops JProfiler.

like image 35
Ingo Kegel Avatar answered Oct 12 '22 22:10

Ingo Kegel