blob: d11f0803aef5bf3ce7313675d3b2e7d1c636fc6b [file] [log] [blame]
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "../dtd/task.dtd">
<task id="t_app-memory-analyzing" xml:lang="en-us">
<title>Analyzing Memory with MAT</title>
<shortdesc>MOTODEV Studio for Android provides an interface to MAT, the Eclipse memory analyzer. MAT analyzes the Java
heap and can be extremely helpful when trying to track down memory leaks. It is also a valuable tool when trying to
reduce your app's memory consumption.</shortdesc>
<p>MOTODEV Studio for Android will generate an HPROF binary formatted heap dump for a selected process on a
running emulator (or handset, provided that the handset has an SD card installed; on a handset the HPROF file is
written to the SD card), and will then launch MAT to analyze the heap dump.</p>
<cmd>From the Device Management view, right-click the running emulator or connected device on which the app or
service to be analyzed is running and select <uicontrol>Analyze Memory with MAT</uicontrol>.</cmd>
<stepresult>MOTODEV Studio for Android displays a dialog showing all of the running applications and services on
the selected device.</stepresult>
<cmd>Select the application or service you wish to analyze and click <uicontrol>Finish</uicontrol>.</cmd>
<stepresult>MOTODEV Studio for Android generates an HPROF file from the selected application or service and
presents a basic analysis in the form of a pie chart in an editor view. It then launches the Getting Started
Wizard, from which you can select a report.</stepresult>
<cmd>Using the Getting Started Wizard select the desired report to run, or click <uicontrol>Cancel</uicontrol>
if you aren't interested in any of the listed reports at this time (you can run these reports at any time from
the editor view showing the pie chart; see the list of reports at the bottom of the view.</cmd>
<postreq>Click the various links and pie chart segments to get information about how the selected application or
service is using memory. See the Memory Analyzer documentation for instructions on using the tool.</postreq>