Android Memory Analysis tool DDMS heap + MAT installation and use
Source: Internet
Author: User
<span id="Label3"></p><strong><strong>A Java Memory analysis tool literacy</strong></strong>If 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.<br><br><br><strong><strong>two Eclipse Mat plug-in installation</strong></strong>Current machine Environment description:<br><strong><strong>[plain]</strong></strong><span class="Apple-converted-space"><span class="Apple-converted-space"><span class="Apple-converted-space">View Plaincopy</span></span></span><object id="ZeroClipboardMovie_1" width="18" height="18" align="middle" bgcolor="#ffffff" data="http://static.blog.csdn.net/scripts/ZeroClipboard/ZeroClipboard.swf" type="application/x-shockwave-flash"><object id="ZeroClipboardMovie_1" width="18" height="18" align="middle" bgcolor="#ffffff" data="http://static.blog.csdn.net/scripts/ZeroClipboard/ZeroClipboard.swf" type="application/x-shockwave-flash"><param name="src" value="http://static.blog.csdn.net/scripts/ZeroClipboard/ZeroClipboard.swf"><param name="pluginspage" value="http://www.macromedia.com/go/getflashplayer"><param name="loop" value="loop"><param name="menu" value="false"><param name="quality" value="best"><param name="allowscriptaccess" value="always"><param name="allowfullscreen" value="false"><param name="flashvars" value="id=1&width=18&height=18"><param name="wmode" value="transparent"></object></object> <ol> <ol> <li class="alt">System: Ubuntu 12.04 LTS 64</li> <li>Eclipse for Mobile developers Version:juno Service Release 1</li> <li class="alt">adt:20.03</li> </ol> </ol><strong><strong>[plain]</strong></strong><span class="Apple-converted-space"><span class="Apple-converted-space"><span class="Apple-converted-space">View Plaincopy</span></span></span><object id="ZeroClipboardMovie_2" width="18" height="18" align="middle" bgcolor="#ffffff" data="http://static.blog.csdn.net/scripts/ZeroClipboard/ZeroClipboard.swf" type="application/x-shockwave-flash"><object id="ZeroClipboardMovie_2" width="18" height="18" align="middle" bgcolor="#ffffff" data="http://static.blog.csdn.net/scripts/ZeroClipboard/ZeroClipboard.swf" type="application/x-shockwave-flash"><param name="src" value="http://static.blog.csdn.net/scripts/ZeroClipboard/ZeroClipboard.swf"><param name="pluginspage" value="http://www.macromedia.com/go/getflashplayer"><param name="loop" value="loop"><param name="menu" value="false"><param name="quality" value="best"><param name="allowscriptaccess" value="always"><param name="allowfullscreen" value="false"><param name="flashvars" value="id=2&width=18&height=18"><param name="wmode" value="transparent"></object></object> <ol> <ol> <li class="alt">System: Ubuntu 12.04 LTS 64</li> <li>Eclipse for Mobile developers Version:juno Service Release 1</li> <li class="alt">adt:20.03</li> </ol> </ol><br><br><br>1. help, Install New Software<span class="Apple-converted-space"><span class="Apple-converted-space"><br><br>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<br>Juno-http://download.eclipse.org/releases/juno<br><br>3. After pedding, open the general Purpose Tools directory and tick the following two items in this directory<br>Memory Analyzer<br>Memory Analyer (Charts) [optional]<br><br>4. Finish<br><br><br><strong>III using the Ddms heap to generate hprof files</strong><br><br></span></span>1. Open the DDMS view<br><br><br>2. Select the package name that you want to analyze, the current demo is com.android.updater, and then click the Update Heap button<br><br><br>3. Click the Cause GC button in the heap view to determine when to listen<br><br><br>5. Save the memory HPROF file and click on the "dump HPROF" button, which is a button with a downward red arrow<br><br><br><br><strong><strong>four using the mat plugin to open the Hprof file</strong></strong><strong><strong> </strong></strong>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<strong><strong> </strong></strong><strong><strong> </strong></strong>2. Mat displays memory information in graphic form<strong><strong><br></strong></strong><strong><strong> </strong></strong><strong><strong> </strong></strong><strong><strong> </strong></strong>Five More information 1.<span class="Apple-converted-space"><span class="Apple-converted-space">Using Eclipse Memory Analyzer for heap dump file analysis<br>Well written, as an example, step-by step shows how to use the mat to analyze memory overflow issues<br><br><br>2. Android Official documentation<br>Memory Analysis for Android applications document Chinese translation<br><br><br>3. Information about the author of the previous official document:<br>Author blog author-i/o Conference video on Memory analysis<br><br><br>3. After installing the mat plugin there will be a local document, local document address<br><br></span></span>4.<span class="Apple-converted-space"><span class="Apple-converted-space">Debug from Dump (dump) file and remove error</span></span><p><p>Android Memory Analysis tool DDMS heap + MAT installation and use</p></p></span>
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