Android Memory Analysis tool DDMS heap + MAT installation and use

Source: Internet
Author: User

A Java Memory analysis tool literacyIf you don't know anything like me, you can do it first. Memory Analysis tools Literacy mat: Eclipse memory Analyzer (MAT) is a feature-rich JAVA heap dump file analysis tool that can be used to identify memory vulnerabilities and reduce memory consumption.


two Eclipse mat plug-in installationCurrent machine Environment Description:
[Plain]View Plaincopy
    1. System: Ubuntu 12.04 LTS 64
    2. Eclipse for Mobile developers Version:juno Service Release 1
    3. adt:20.03
[Plain]View Plaincopy
    1. System: Ubuntu 12.04 LTS 64
    2. Eclipse for Mobile developers Version:juno Service Release 1
    3. adt:20.03



1. Help, Install New software

2. In the pop-up window, select the appropriate version from the drop-down button on the right side of work, and the eclipse I use is version juno, so select
Juno-http://download.eclipse.org/releases/juno

3. After pedding, open the general Purpose Tools directory and tick the following two items in this directory
Memory Analyzer
Memory Analyer (Charts) [optional]

4. Finish


III using the Ddms heap to generate hprof files

1. Open the Ddms view


2. Select the package name that you want to analyze, the current demo is Com.android.updater, and then click the Update Heap button


3. Click the Cause GC button in the heap view to determine when to listen


5. Save the memory HPROF file and click on the "Dump HPROF" button, which is a button with a downward red arrow



four using the mat plugin to open the Hprof file  1. If the mat is already installed properly, after clicking Dump HPROF file, this window will automatically pop up, I have chosen the first item, finish    2. MAT displays memory information in graphic form
     Five more information 1. Using Eclipse Memory Analyzer for heap dump file analysis
Well written, as an example, step-by step shows how to use the mat to analyze memory overflow issues


2. Android Official documentation
Memory Analysis for Android applications document Chinese translation


3. Information about the author of the previous official document:
Author Blog author-i/O conference video on Memory analysis


3. After installing the mat plugin there will be a local document, local document address

4. Debug from Dump (dump) file and remove the error

Android Memory Analysis tool DDMS heap + MAT installation and use

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.