The heap snapshot tool for Android performance specific testing

Source: Internet
Author: User

Speed Up your app

What can Heap snapshot do?

Get Java heap memory details to analyze memory leak issues

Heap Dump Startup

In the memory bread, click on the red button in the graph to display our heap snapshot bread

Heap Snapshot Panel

Heap Snapshot Details Panel


There are three types of information available in this panel: app Heap/image heap/zygote heap.
Represents the app heap memory information, image heap memory information, zygote process heap memory information, respectively.

Area A

Lists all the classes in the heap memory, which are listed in the list name:

name meaning
Total Count The number of objects in this class in memory
Heap Count The number of objects in this class in heap memory
Sizeof Physical size
Shallow size The object itself occupies memory size
Retained Size The amount of memory saved after releasing the object
Area B

When we click on a class, the B area on the right shows the instantiated object for that class, which shows how many entities, along with details.

name meaning
Depth Depth
Shallow Size Object itself memory size
Dominating Size The size of the memory that governs

When you click on an object, it expands which objects are contained within the object, and the C region also shows which objects refer to the object:

C Zone

An object refers to a tree object, where it can be seen that there is no reference to it, such as in the memory leak, you can see that it is referenced by whom, for example, the first row of the reference tree, you can see that the object is object[12] object reference, the index value of 1, then we expand, you can see, the object[12] is a ArrayList.

Updates for Android studio1.4

1.4 of the panels have some changes:

A selection of data display methods is added, with the choice of class name arrangement or package name arrangement:

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

The heap snapshot tool for Android performance specific testing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.