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
- System: Ubuntu 12.04 LTS 64
- Eclipse for Mobile developers Version:juno Service Release 1
- adt:20.03
[Plain]View Plaincopy
- System: Ubuntu 12.04 LTS 64
- Eclipse for Mobile developers Version:juno Service Release 1
- 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