From e5fe2468e4673c086aab463bb281a8fa09b353ed Mon Sep 17 00:00:00 2001
From: Rich Slogar
To use Allocation Tracker:
+To use the Allocation Tracker, open the Memory Monitor in Android Studio and click the + +Allocation Tracker icon. You can also track allocations in the Android Device Monitor:
+ + +To use the Allocation Tracker in +Android Studio:
+ +Android Studio creates the allocation file with the filename
+ Allocations-yyyy.mm.dd-hh.mm.ss.alloc
in the Captures tab.
From your <sdk>/tools/
directory, launch the monitor
tool.
Note: If you're using the version of DDMS that's integrated into -Eclipse, you do not need to perform the HPROF conversion—DDMS performs the conversion by +Eclipse, you do not need to perform the HPROF conversation—it performs the conversion by default.
You can now load the converted file in MAT or another heap analysis tool that understands diff --git a/docs/html/tools/performance/allocation-tracker/index.jd b/docs/html/tools/performance/allocation-tracker/index.jd index e71b584..d68f601 100644 --- a/docs/html/tools/performance/allocation-tracker/index.jd +++ b/docs/html/tools/performance/allocation-tracker/index.jd @@ -90,19 +90,24 @@ page.article=true alt="" width="400px" />
- Figure 1. Steps for starting Allocation Tracker. + Figure 1. Steps for starting Allocation Tracker in Android DDMS.
- Figure 2. Example of Allocation Tracker output. + Figure 2. Example of Allocation Tracker output in Android DDMS.
diff --git a/docs/html/tools/performance/comparison.jd b/docs/html/tools/performance/comparison.jd index 0640717..f79e762 100644 --- a/docs/html/tools/performance/comparison.jd +++ b/docs/html/tools/performance/comparison.jd @@ -111,7 +111,7 @@ page.article=true
diff --git a/docs/html/tools/studio/index.jd b/docs/html/tools/studio/index.jd
index bbb4edc..43cb2fe 100644
--- a/docs/html/tools/studio/index.jd
+++ b/docs/html/tools/studio/index.jd
@@ -226,6 +226,30 @@ snapshot in the Captures view and select Export to standard .hp
+ Android Studio allows you to track memory allocation as it monitors memory use. Tracking memory
+allocation allows you to monitor where objects are being allocated when you perform certain actions.
+Knowing these allocations enables you to adjust the method
+calls related to those actions to optimize your app's performance and memory use. Figure 6. Allocation tracker. Perform the following steps to track and analyze allocations: The allocation viewer allows you to view and analyze the allocations your app made while
+ running. The Android SDK tools, such as Systrace,
logcat, and
--
cgit v1.1
Allocation tracker
+
+
+
+
+
) in the
+ Memory Monitor. Android Studio starts tracking memory allocations.
Allocation-yyyy.mm.dd-hh.mm.ss.alloc
. The
+ resulting file appears in the Captures tab. Data file access