diff --git a/docs/html/images/tools/am-alloctracker.png b/docs/html/images/tools/am-alloctracker.png new file mode 100644 index 0000000000000..b94713d3cc284 Binary files /dev/null and b/docs/html/images/tools/am-alloctracker.png differ diff --git a/docs/html/images/tools/am-androidmon.png b/docs/html/images/tools/am-androidmon.png new file mode 100644 index 0000000000000..fc832b538a970 Binary files /dev/null and b/docs/html/images/tools/am-androidmon.png differ diff --git a/docs/html/images/tools/am-cpumon.png b/docs/html/images/tools/am-cpumon.png new file mode 100644 index 0000000000000..487c010f78516 Binary files /dev/null and b/docs/html/images/tools/am-cpumon.png differ diff --git a/docs/html/images/tools/am-domtree.png b/docs/html/images/tools/am-domtree.png new file mode 100644 index 0000000000000..8a995afa79e47 Binary files /dev/null and b/docs/html/images/tools/am-domtree.png differ diff --git a/docs/html/images/tools/am-dumpalloc.png b/docs/html/images/tools/am-dumpalloc.png new file mode 100644 index 0000000000000..d0d18e737956e Binary files /dev/null and b/docs/html/images/tools/am-dumpalloc.png differ diff --git a/docs/html/images/tools/am-gc.png b/docs/html/images/tools/am-gc.png new file mode 100644 index 0000000000000..2ae4858b770d7 Binary files /dev/null and b/docs/html/images/tools/am-gc.png differ diff --git a/docs/html/images/tools/am-gpumon.png b/docs/html/images/tools/am-gpumon.png new file mode 100644 index 0000000000000..ed1e3df861857 Binary files /dev/null and b/docs/html/images/tools/am-gpumon.png differ diff --git a/docs/html/images/tools/am-hprofanalyzer.png b/docs/html/images/tools/am-hprofanalyzer.png new file mode 100644 index 0000000000000..9c2cb436b2663 Binary files /dev/null and b/docs/html/images/tools/am-hprofanalyzer.png differ diff --git a/docs/html/images/tools/am-hprofviewer.png b/docs/html/images/tools/am-hprofviewer.png new file mode 100644 index 0000000000000..342590fd41b2c Binary files /dev/null and b/docs/html/images/tools/am-hprofviewer.png differ diff --git a/docs/html/images/tools/am-ialloctracking.png b/docs/html/images/tools/am-ialloctracking.png new file mode 100644 index 0000000000000..dc7ac372d90d1 Binary files /dev/null and b/docs/html/images/tools/am-ialloctracking.png differ diff --git a/docs/html/images/tools/am-iclear.png b/docs/html/images/tools/am-iclear.png new file mode 100644 index 0000000000000..aefb365845537 Binary files /dev/null and b/docs/html/images/tools/am-iclear.png differ diff --git a/docs/html/images/tools/am-icon.png b/docs/html/images/tools/am-icon.png new file mode 100644 index 0000000000000..cd67a6a6c6fe1 Binary files /dev/null and b/docs/html/images/tools/am-icon.png differ diff --git a/docs/html/images/tools/am-idom.png b/docs/html/images/tools/am-idom.png new file mode 100644 index 0000000000000..d15d674e6e691 Binary files /dev/null and b/docs/html/images/tools/am-idom.png differ diff --git a/docs/html/images/tools/am-idownstack.png b/docs/html/images/tools/am-idownstack.png new file mode 100644 index 0000000000000..14e1a3151bdaf Binary files /dev/null and b/docs/html/images/tools/am-idownstack.png differ diff --git a/docs/html/images/tools/am-idump.png b/docs/html/images/tools/am-idump.png new file mode 100644 index 0000000000000..d364c037f6561 Binary files /dev/null and b/docs/html/images/tools/am-idump.png differ diff --git a/docs/html/images/tools/am-idumpend.png b/docs/html/images/tools/am-idumpend.png new file mode 100644 index 0000000000000..e3261a513949f Binary files /dev/null and b/docs/html/images/tools/am-idumpend.png differ diff --git a/docs/html/images/tools/am-idumpstart.png b/docs/html/images/tools/am-idumpstart.png new file mode 100644 index 0000000000000..b6fa667fb40e5 Binary files /dev/null and b/docs/html/images/tools/am-idumpstart.png differ diff --git a/docs/html/images/tools/am-igc.png b/docs/html/images/tools/am-igc.png new file mode 100644 index 0000000000000..742d27d4e1c02 Binary files /dev/null and b/docs/html/images/tools/am-igc.png differ diff --git a/docs/html/images/tools/am-igcroot.png b/docs/html/images/tools/am-igcroot.png new file mode 100644 index 0000000000000..6af7355c84310 Binary files /dev/null and b/docs/html/images/tools/am-igcroot.png differ diff --git a/docs/html/images/tools/am-igear.png b/docs/html/images/tools/am-igear.png new file mode 100644 index 0000000000000..e7f8a2b0debf8 Binary files /dev/null and b/docs/html/images/tools/am-igear.png differ diff --git a/docs/html/images/tools/am-ihide.png b/docs/html/images/tools/am-ihide.png new file mode 100644 index 0000000000000..d8f5f016ba993 Binary files /dev/null and b/docs/html/images/tools/am-ihide.png differ diff --git a/docs/html/images/tools/am-ijumptosource.png b/docs/html/images/tools/am-ijumptosource.png new file mode 100644 index 0000000000000..5f37477e7db70 Binary files /dev/null and b/docs/html/images/tools/am-ijumptosource.png differ diff --git a/docs/html/images/tools/am-imethodtrace.png b/docs/html/images/tools/am-imethodtrace.png new file mode 100644 index 0000000000000..96fe34a00aa6d Binary files /dev/null and b/docs/html/images/tools/am-imethodtrace.png differ diff --git a/docs/html/images/tools/am-ipause.png b/docs/html/images/tools/am-ipause.png new file mode 100644 index 0000000000000..258eca8b8b9b7 Binary files /dev/null and b/docs/html/images/tools/am-ipause.png differ diff --git a/docs/html/images/tools/am-iperformanalysis.png b/docs/html/images/tools/am-iperformanalysis.png new file mode 100644 index 0000000000000..58ebcbbc868f4 Binary files /dev/null and b/docs/html/images/tools/am-iperformanalysis.png differ diff --git a/docs/html/images/tools/am-iprint.png b/docs/html/images/tools/am-iprint.png new file mode 100644 index 0000000000000..65525a88cbc10 Binary files /dev/null and b/docs/html/images/tools/am-iprint.png differ diff --git a/docs/html/images/tools/am-irestart.png b/docs/html/images/tools/am-irestart.png new file mode 100644 index 0000000000000..916402c3473ad Binary files /dev/null and b/docs/html/images/tools/am-irestart.png differ diff --git a/docs/html/images/tools/am-iscreencapture.png b/docs/html/images/tools/am-iscreencapture.png new file mode 100644 index 0000000000000..68135a711a743 Binary files /dev/null and b/docs/html/images/tools/am-iscreencapture.png differ diff --git a/docs/html/images/tools/am-iscrollend.png b/docs/html/images/tools/am-iscrollend.png new file mode 100644 index 0000000000000..4db6e23c15450 Binary files /dev/null and b/docs/html/images/tools/am-iscrollend.png differ diff --git a/docs/html/images/tools/am-isearch.png b/docs/html/images/tools/am-isearch.png new file mode 100644 index 0000000000000..b792fc3d91d7c Binary files /dev/null and b/docs/html/images/tools/am-isearch.png differ diff --git a/docs/html/images/tools/am-isoftwraps.png b/docs/html/images/tools/am-isoftwraps.png new file mode 100644 index 0000000000000..ce0b24f36c907 Binary files /dev/null and b/docs/html/images/tools/am-isoftwraps.png differ diff --git a/docs/html/images/tools/am-isysteminfo.png b/docs/html/images/tools/am-isysteminfo.png new file mode 100644 index 0000000000000..37d77db9c036c Binary files /dev/null and b/docs/html/images/tools/am-isysteminfo.png differ diff --git a/docs/html/images/tools/am-iterminate.png b/docs/html/images/tools/am-iterminate.png new file mode 100644 index 0000000000000..238ba869ffedd Binary files /dev/null and b/docs/html/images/tools/am-iterminate.png differ diff --git a/docs/html/images/tools/am-iupstack.png b/docs/html/images/tools/am-iupstack.png new file mode 100644 index 0000000000000..ca362e94c201f Binary files /dev/null and b/docs/html/images/tools/am-iupstack.png differ diff --git a/docs/html/images/tools/am-ivideo.png b/docs/html/images/tools/am-ivideo.png new file mode 100644 index 0000000000000..901eaf1400214 Binary files /dev/null and b/docs/html/images/tools/am-ivideo.png differ diff --git a/docs/html/images/tools/am-logcatmon.png b/docs/html/images/tools/am-logcatmon.png new file mode 100644 index 0000000000000..b0de41a823892 Binary files /dev/null and b/docs/html/images/tools/am-logcatmon.png differ diff --git a/docs/html/images/tools/am-methodtrace.png b/docs/html/images/tools/am-methodtrace.png new file mode 100644 index 0000000000000..8d5ca4e6089ef Binary files /dev/null and b/docs/html/images/tools/am-methodtrace.png differ diff --git a/docs/html/images/tools/am-networkmon.png b/docs/html/images/tools/am-networkmon.png new file mode 100644 index 0000000000000..95b3a5b57f120 Binary files /dev/null and b/docs/html/images/tools/am-networkmon.png differ diff --git a/docs/html/tools/help/am-cpu.jd b/docs/html/tools/help/am-cpu.jd new file mode 100644 index 0000000000000..62b35909a3151 --- /dev/null +++ b/docs/html/tools/help/am-cpu.jd @@ -0,0 +1,325 @@ +page.title=CPU Monitor +parent.title=Android Monitor +parent.link=android-monitor.html +page.tags=monitor +@jd:body + +
+
+

In this document

+
    +
  1. Displaying a Running App in the CPU Monitor
  2. +
  3. Performing a Method Trace in the CPU Monitor
  4. +
  5. Viewing a Saved Method Trace
  6. +
  7. Sorting Method Trace Data
  8. +
  9. Renaming a Method Trace File
  10. +
  11. Locating a Method Trace File on Disk
  12. +
  13. Deleting a Method Trace File
  14. +
+ +

See also

+
    +
  1. + Android Monitor +
  2. +
  3. logcat Monitor +
  4. + +
  5. Memory Monitor +
  6. + +
  7. GPU Monitor +
  8. + +
  9. + Network Monitor +
  10. +
+ + +

+ Dependencies and Prerequisites +

+ + + +
+
+ + +

+ The CPU Monitor lets you easily monitor the central processing unit (CPU) usage of your app. It + displays CPU usage in real time and displays the percentage of total CPU time (including all cores) + used by user and kernel mode. In user mode, the code must use system APIs to access hardware or + memory, and crashes are usually recoverable. In kernel mode, the code can directly access + hardware, including memory addresses; crashes halt the device. +

+ +

+ Displaying a Running App in the CPU Monitor +

+ +

+ Follow these steps: +

+ +
    +
  1. Optionally connect a hardware device. +
  2. + +
  3. + Display Android Monitor. +
  4. + +
  5. Click the CPU tab. +
  6. + +
  7. Open an app project and run it on a hardware device or + emulator. +
  8. + +
  9. Enable the CPU Monitor by clicking Pause Pause icon to deselect + it. +
  10. + +

    + The CPU Monitor starts to display any CPU usage. + In the graph, the y-axis displays the percentage of CPU used. The x-axis records the time elapsed + and starts with seconds, and then minutes and seconds, and so on. +

    + +
  11. To stop the CPU Monitor, click Pause Pause icon again to select + it. +
  12. +
+ + +

+ Performing a Method Trace in the CPU Monitor +

+ +

+ Follow these steps: +

+ +
    +
  1. + Display a running app in the CPU + Monitor. +
  2. + +
  3. Start a trace by clicking Start Method Tracing Start Method Tracing icon to + select it. +
  4. + +
  5. To stop the trace, click Stop Method Tracing Stop Method Tracing icon to + deselect it. +
  6. + +

    + The method trace appears in the Code Editor area: +

    +Method Trace +

    + Android Studio creates the method trace file + with the filename Trace_yyyy.mm.dd_hh.mm.ss.trace + using the year, month, day, hour, minute, and second of the capture, for example, + Trace_2015.11.17_14.58.48.trace. +

    +
  7. Specify display options: + + +

    + The display shows the following information: +

    + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    NameThe name of the method.
    Invocation CountHow many times the method was called.
    Inclusive Time (microseconds)Time spent in the method and all of its children, either wall clock or thread time, + depending on your selection in the x-axis menu.
    Exclusive Time (microseconds)Time spent just in the method (excluding time spent in its children), either wall clock + or thread time, depending on your selection in the x-axis menu.
    +

    Note: Running the method trace significantly affects CPU timings. + Use the method trace to understand the flow of the program, but not for performance timings.

    +

    + The graphic represents the wall clock or thread time for each method. Hover the cursor + over the display to receive information about the method. This information also appears + in the table. +

    +
+

+ Viewing a Saved Method Trace +

+ +

+ After you do a method trace, Android Studio automatically stores it so you can view it + again. To examine the trace, follow these steps: +

+ +
    +
  1. Click Captures in the main window. +
  2. + +

    + The Captures window appears. +

    + +
  3. Open the Methods Tracing folder. +
  4. + +
  5. Double-click the file to view it. +
  6. +
+ +

+ Sorting Method Trace Data +

+ +

+ You can sort the data by method name, count, inclusive time, and exclusive time. Follow this step: +

+ + + + +

+ Renaming a Method Trace File +

+ +

+ Rename a method trace file from within Android Studio so it + continues to appear in the Captures window. Follow these steps: +

+ +
    +
  1. In the Captures window, right-click the file and select Rename. +
  2. + +
  3. In the dialog, specify the name of the file and click OK. +
  4. +
+ +

+ Locating a Method Trace File on Disk +

+ +

+ You can quickly discover where Android Studio stored method trace files on disk. Follow this step: +

+ + + + +

+ Note: If you move a method trace file, Android Studio no longer displays the file + in the Captures window. To display it, use File > + Open. Also, rename a file from the Captures + window and not in the operating system file browser. +

+ +

+ Deleting a Method Trace File +

+ +

+ Follow this step in Android Studio: +

+ + + +

+ Android Studio deletes the file from the Captures dialog and from disk. +

\ No newline at end of file diff --git a/docs/html/tools/help/am-gpu.jd b/docs/html/tools/help/am-gpu.jd new file mode 100644 index 0000000000000..a244b224d49d9 --- /dev/null +++ b/docs/html/tools/help/am-gpu.jd @@ -0,0 +1,136 @@ +page.title=GPU Monitor +parent.title=Android Monitor +parent.link=android-monitor.html +page.tags=monitor +@jd:body + +
+
+

In this document

+
    +
  1. Displaying a Running App in the GPU Monitor
  2. +
+ +

See also

+
    +
  1. + Android Monitor +
  2. +
  3. logcat Monitor +
  4. + +
  5. Memory Monitor +
  6. + +
  7. CPU Monitor +
  8. + +
  9. + Network Monitor +
  10. +
+ +

+ Dependencies and Prerequisites +

+ + + +
+
+ +

+ The GPU Monitor gives you a quick visual representation of how much time it takes to render the + frames of a UI window. It profiles the amount of time it takes for the render thread to prepare, + process, and execute the draw commands. The GPU Monitor can help you to: +

+ + + +

+ For example, if displaying a static photo continues to take Graphics Processor Unit + (GPU) resources long after it has finished + drawing on the screen, that’s a likely candidate for optimization. +

+ + +

+ Displaying a Running App in the GPU Monitor +

+ +

+ Follow these steps: +

+ +
    +
  1. Optionally connect a hardware device. +
  2. + +
  3. + Display Android Monitor. +
  4. + +
  5. Click the GPU tab. +
  6. + +
  7. Open an app project and run it on a hardware device or + emulator. +
  8. + +
  9. Enable the GPU Monitor by clicking Pause Pause icon to deselect + it. +
  10. + +

    + Any GPU usage begins to appear in the GPU Monitor: +

    + + +

    + The y-axis is the amount of time it takes the GPU to execute, process, prepare, and draw frames, + in milliseconds. The x-axis records the time elapsed; it starts with seconds, and then minutes + and seconds, and so on. +

    + +
  11. To stop the GPU Monitor, click Pause Pause icon again to select + it. +
  12. +
diff --git a/docs/html/tools/help/am-logcat.jd b/docs/html/tools/help/am-logcat.jd new file mode 100644 index 0000000000000..57da848ae1d7a --- /dev/null +++ b/docs/html/tools/help/am-logcat.jd @@ -0,0 +1,521 @@ +page.title=logcat Monitor +parent.title=Android Monitor +parent.link=android-monitor.html +page.tags=monitor +@jd:body +
+
+

+ In this document +

+ +
    +
  1. + logcat Message Format +
  2. + +
  3. + Displaying a Running App in the logcat Monitor +
  4. + +
  5. + Setting the Log Level +
  6. + +
  7. + Searching logcat Messages +
  8. + +
  9. + Filtering logcat Messages +
  10. + +
  11. + Configuring the logcat Header Display +
  12. + +
  13. + Moving Up and Down the Stack Trace +
  14. + +
  15. + Moving to the End of the Log +
  16. + +
  17. + Printing the Log +
  18. + +
  19. + Clearing the Log +
  20. + +
  21. + Restarting the Log +
  22. +
+ +

+ See also +

+ +
    +
  1. + Reading and Writing Logs +
  2. +
  3. + Android Monitor +
  4. + +
  5. Memory Monitor +
  6. + +
  7. CPU Monitor +
  8. + +
  9. GPU Monitor +
  10. + +
  11. + Network Monitor +
  12. +
+ +

+ Dependencies and Prerequisites +

+ + +
+
+ +

+ The Android logging system provides a mechanism for collecting and viewing system debug output. + logcat Monitor displays messages that you added to your app by using the Log class, as well as system + messages, such as stack traces when the emulator throws an error or a garbage collection occurs. + The monitor displays messages in real time and also keeps a history so you can view older + messages. +

+ +

+ To display just the information of interest, you can create filters, modify how much information + is displayed in messages, set priority levels, display messages produced by app code + only, and search the log. By default, logcat Monitor shows the log output related to the running + application only. +

+ +

+ You can traverse the stack trace when your app throws an exception, as well as view the + associated code. This feature can help you fix exceptions and improve app operation. +

+ +

+ logcat Message Format +

+ +

+ Every Android log message has a tag and a priority associated with it. The tag of a system + log message + is a short string indicating the system component from which the message originates (for example, + ActivityManager). A user-defined tag can be any string that you find helpful, such + as the name of the current class (the recommended tag). You define it in a Log + method call, for example: +

+ +
+Log.d(tag, message);
+
+

+ The priority is one of the following values: +

+ + + +

+ The log message format is: +

+ +
+date time PID-TID/package priority/tag: message
+
+ +

+ For example, the following log message has a priority of V and a tag of + AuthZen: +

+ +
+12-10 13:02:50.071 1901-4229/com.google.android.gms V/AuthZen: Handling delegate intent.
+
+

+ PID stands for process identifier and TID is thread identifier; they can be the same if there’s + only one thread. +

+ +

+ Displaying a Running App in the logcat Monitor +

+ +

+ Follow these steps: +

+ +
    +
  1. Optionally connect a hardware device. +
  2. + +
  3. + Display Android Monitor. +
  4. + +
  5. Click the logcat tab. +
  6. + +
  7. Open an app project and run it on a hardware device or + emulator. +
  8. +

    + By default, the logcat Monitor displays messages for the app running on the device or emulator: +

    + +

    + To change this default, see Filtering logcat Messages. +

    +
+ +

+ Setting the Log Level +

+ +

+ You can control how many messages appear in logcat Monitor by setting the log level. You can + display all messages, or just the messages indicating the most severe conditions. +

+ +

+ Remember that logcat Monitor continues to collect all messages regardless of the log level setting. + The setting just determines what logcat Monitor displays. +

+ +

+ Follow this step: +

+ + + +

+ Searching logcat Messages +

+ +

+ You can search the messages currently displayed in logcat Monitor. Follow these steps: +

+ +
    +
  1. Optionally select Regex if you want to use a regular expression + search pattern. +
  2. + +
  3. Type a character sequence in the search field Search icon. +
  4. + +

    + The logcat Monitor display changes accordingly. +

    + + +
  5. Press Enter to store the sequence in the menu during this session. +
  6. + +
  7. To repeat a search, choose it from the search menu. Select or deselect + Regex as needed (the setting isn’t remembered). +
  8. +
+ +

+ Filtering logcat Messages +

+ +

+ One way to reduce the log output to a manageable level is to restrict it by using a filter. +

+ +

+ Note: The filter applies to your full logcat history, not just those messages + currently displayed in logcat Monitor. Make sure your other display options are set + appropriately so you can see the filter output you want to examine. +

+ +

+ To define and apply a filter, follow these steps: +

+ +
    +
  1. In the filter menu, select a filter option: + + +

    + After you define filters, you can also select them in the menu. To remove them from the + menu, delete them. +

    + +
  2. If you selected Edit Filter Configuration, create or modify a + filter. +
      +
    1. Specify the filter parameters in the Create New Logcat Filter dialog: +
    2. + + +
        +
      • + Filter Name - Type the name of a filter you want to define, or + select it in the left pane to modify an existing filter. The name can contain + lowercase characters, underscores, and digits only. +
      • + +
      • + Log Tag - Optionally specify a tag. For more information, see + logcat Message Format. +
      • + +
      • + Log Message - Optionally specify log message text. For more + information, see logcat Message Format. +
      • + +
      • + Package Name - Optionally specify a package name. For more + information, see logcat Message Format. +
      • + +
      • + PID - Optionally specify a process ID. For more information, see + logcat Message Format. +
      • + +
      • + Log Level - Optionally select a log level. For more information, + see Setting the Log Level. +
      • + +
      • + Regex - Select this option to use regular expression syntax for + that parameter. +
      • +
      + +
    3. + Click + to add it to the left pane. +
    4. + +

      + To remove a filter, select it in the left pane and click -. +

      + +
    5. + When you’re finished, click OK. If you click + Cancel, any filter additions or modifications are lost. +
    6. +
    +
+ +

+ Configuring the logcat Header Display +

+ +

+ You can customize the header display to show just the information you’re interested + in: +

+ + + +

+ For more information about message elements, see logcat Message Format. +

+ +

+ Moving Up and Down the Stack Trace +

+ +

+ When the app throws an exception, the message includes a stack trace of method calls. + logcat + Monitor lets you quickly locate stack traces in the log and view the associated code + in the Code Editor. If needed (and possible), the decompiler derives source code that + you can view. +

+ + + +

+ Moving to the End of the Log +

+ +

+ Clicking a particular message stops the display of messages. You can quickly move to + the end of the log to see the real-time message flow. +

+ + + +

+ Printing the Log +

+

+ Follow these steps: +

+
    +
  1. Click Print Print icon. +
  2. +
  3. + In the Print dialog, optionally change print parameters, and then click + Print. +
+ +

+ Clearing the Log +

+

+ To clear (flush) the entire log, follow this step: +

+ + + + +

+ Restarting the Log +

+ +

+ If there is a problem and the log is no longer progressing, you can restart the log. Follow this + step: +

+ + \ No newline at end of file diff --git a/docs/html/tools/help/am-memory.jd b/docs/html/tools/help/am-memory.jd new file mode 100644 index 0000000000000..24006cdbbb701 --- /dev/null +++ b/docs/html/tools/help/am-memory.jd @@ -0,0 +1,916 @@ +page.title=Memory Monitor +parent.title=Android Monitor +parent.link=android-monitor.html +page.tags=monitor +@jd:body + +
+
+

In this document

+
    +
  1. Memory Monitor Workflow +
      +
    1. Garbage collection roots and dominator trees
    2. +
    3. Memory leak and use analysis
    4. +
    5. Memory management for different virtual machines
    6. +
    +
  2. +
  3. Displaying a Running App in the Memory Monitor
  4. +
  5. Forcing a Garbage Collection Event
  6. +
  7. Dumping and Analyzing the Java Heap +
      +
    1. Taking and displaying a snapshot of the Java heap
    2. +
    3. Diving into heap dump data in the HPROF Viewer
    4. +
    5. Analyzing heap dump data in the HPROF Analyzer
    6. +
    7. Sorting heap dump data
    8. +
    9. Displaying Java source
    10. +
    11. Viewing a saved HPROF file
    12. +
    13. Renaming an HPROF file
    14. +
    15. Locating a heap dump file on disk
    16. +
    17. Deleting a heap dump file
    18. +
    19. Converting a heap dump file to standard HPROF format
    20. +
    +
  8. +
  9. Tracking and Analyzing Memory Allocation +
      +
    1. Taking and displaying a snapshot of allocation data
    2. +
    3. Sorting allocation data
    4. +
    5. Displaying Java source
    6. +
    7. Viewing a saved allocation tracking file
    8. +
    9. Renaming an allocation tracking file
    10. +
    11. Locating an allocation tracking file
    12. +
    13. Deleting an allocation tracking file
    14. +
    +
  10. +
+ +

See also

+
    +
  1. Managing Your App's Memory
  2. +
  3. Addressing Garbage Collection Issues
  4. +
  5. Investigating Your RAM Usage
  6. + +
  7. + Android Monitor +
  8. +
  9. logcat Monitor +
  10. + +
  11. CPU Monitor +
  12. + +
  13. GPU Monitor +
  14. + +
  15. + Network Monitor +
  16. +
+ + +

+ Dependencies and Prerequisites +

+ + + +
+
+ +

+ Android Studio provides a Memory Monitor so you can more easily monitor app performance and + memory usage to find deallocated objects, locate memory leaks, and track the amount of memory the + connected device is using. The Memory Monitor reports how your app allocates memory and helps you + to visualize the memory your app uses. It lets you: +

+ + + +

+ Memory Monitor Workflow +

+ +

+ To profile and optimize memory use, the typical workflow is to run your app and do the following: +

+ +
    +
  1. Profile the app using the Memory Monitor to find out whether undesirable garbage collection + event patterns might be causing performance problems. +
  2. + +
  3. If you see many garbage collection events in a short amount of time, dump the Java heap to + identify candidate object types that get or stay allocated unexpectedly or unnecessarily. +
  4. + +
  5. Start allocation tracking to determine where any problems are happening in your code. +
  6. +
+ +

+ The Java heap data shows in real-time what types of objects your application has allocated, how + many, and their sizes on the heap. Viewing the heap helps you to: +

+ + + +

+ Allocation tracking records app memory allocations and lists all allocations for the + profiling cycle, including the call stack, size, and allocating code. It helps you to: +

+ + + +

+ Garbage collection roots and dominator trees +

+ +

+ When you dump the Java heap, the Memory Monitor creates an Android-specific Heap/CPU Profiling + (HPROF) file that you can view in the HPROF Viewer. The HPROF Viewer indicates a garbage + collection root with the GC Root icon icon (and a depth of zero) + and a + dominator with the Dominator icon icon. +

+ +

+ There are several kinds of garbage collection roots in Java: +

+ + + +

+ The HPROF file provides the list of roots to the HPROF Viewer. +

+ +

+ A dominator tree traces paths to objects created by the app. An object dominates another object + if the only way to reach the other object is, directly or indirectly, through the dominator + object. When you examine objects and paths created by an app in an effort to optimize memory use, + try to remove objects that are no longer needed. You can release a dominator object to + release all subordinate objects. For example, in the following figure, if you were to + remove object B, that would also release the memory used by the objects it dominates, which are + objects C, D, E, and F. In fact, if objects C, D, E, and F were marked for removal, but object B + was still referring to them, that could be the reason that they weren’t released. +

+ + + +

+ Memory leak and use analysis +

+ +

+ An app performs better if it uses memory efficiently and releases the memory when it’s no longer + needed. + Memory leaks that are large or that grow over time are the most important to correct. +

+ +

+ One way to optimize memory usage is to analyze large arrays. For example, can you reduce the size + of individual elements in the array to save memory? Does a dominator object point to + an element in the array, preventing it from being garbage-collected? If the dominator object + directly points to an element in the array, the dominator is either the contiguous memory + representing the underlying data of the array, some part of the array, or the array itself. +

+ +

+ Another area that deserves attention is objects that the app no longer needs but continues to + reference. You can gather heap dumps over different periods of time and compare them to determine + if you have a growing memory leak, such as an object type that your code creates multiple times + but doesn’t destroy. These objects could be part of a growing array or an object tree, for + example. To track down this problem, compare the heap dumps and see if you have a particular + object type that continues to have more and more instances over time. +

+ +

+ Continually growing object trees that contain root or dominator objects can prevent subordinate + objects from being garbage-collected. This issue is a common cause of memory leaks, out-of-memory + errors, + and crashes. Your app could have a small number of objects that are preventing a large number of + subordinate objects from being destroyed, so it runs out of memory quickly. To find these issues, + get a heap dump and examine the amount of memory held by root and dominator objects. If the + memory is substantial, you’ve likely found a good place to start optimizing your memory use. +

+ +

+ As you start narrowing down memory issues, you should also use the Allocation Tracker to get a + better understanding of where your memory-hogging objects are allocated. The Allocation Tracker + can be valuable not only for looking at specific uses of memory, but also for analyzing critical + code paths, such as loading and scrolling. For example, tracking allocations when flinging a list + in your app + allows you to see all of the allocations that need to be done for that behavior, what thread they + are on, and where they came from. This information is extremely valuable for tightening up these + paths to reduce the work they need and improve the overall smoothness of the UI. +

+ +

+ It’s useful to examine your algorithms for allocations that are unnecessary or that create the + same object many times instead of reusing them. For example, do you create temporary objects and + variables within recursive loops? If so, try creating an object or variable before + the loop for use within the loop. Otherwise, your app might needlessly allocate many objects and + variables, depending on the number of recursions. +

+ +

+ It’s important to perform allocation tests on portions of your code that create the most and + largest objects, as those areas offer the most optimization opportunities. In addition to unit + tests, you should test your app with production-realistic data loads, especially those algorithms + that are data-driven. Also, make sure to account for the app caching and startup phase, which can + sometimes be slow; allocation analysis is best done after that phase to produce accurate results. +

+ +

+ After you optimize code, be sure to test that it worked. You need to test under different load + conditions and also without running the Memory Monitor tools. Compare results before and after + optimization to make sure that performance has actually improved. +

+ +

+ Memory management for different virtual machines +

+ +

+ Android Monitor uses the Virtual Machine (VM) that the device or emulator uses: +

+ + + +

+ The VM handles garbage collection. The Dalvik VM uses a mark-and-sweep scheme for garbage + collection. The ART VM uses a generational scheme, combined with mark-and-sweep when memory needs + a more thorough garbage collection, such as when memory becomes excessively fragmented. The + logcat Monitor displays some messages that indicate the type of garbage collection that occurred + and why. +

+ +

+ Memory Monitor results can vary between the different VMs. As a result, if you’re supporting both + VMs, you might want to test with both. In addition, the VMs available for different API levels + can have different behavior. For example, the Dalvik VM in Android 2.3 (API level 10) and lower + uses externally allocated memory while higher versions allocate in the Dalvik heap only. +

+ +

+ You can’t reconfigure the Dalvik and ART VMs to tune performance. Instead, you should examine + your app code to determine how to improve its operation, for example, reducing the size of very + large arrays. +

+ +

+ There are programmatic ways to manipulate when the VM performs garbage collection, although it’s + not a best practice. These techniques can be specific to the VM. For more information, see + Addressing + Garbage Collection (GC) Issues and Investigating Your RAM + Usage. +

+ +

+ The ART VM adds a number of performance, development, and debugging improvements over the Dalvik + VM. For more information, see ART and Dalvik. +

+ +

+ Displaying a Running App in the Memory Monitor +

+ +

+ Follow these steps: +

+ +
    +
  1. Optionally connect a hardware device. +
  2. + +
  3. + Display Android Monitor. +
  4. + +
  5. Click the Memory tab. +
  6. + +
  7. Open an app project and run it on a + hardware device or emulator. +
  8. + +
  9. Enable the Memory Monitor by clicking Pause Pause icon to deselect it. +
  10. + + +

    + In the graph, the y-axis displays the free and allocated RAM in megabytes. The x-axis shows the + time elapsed; it starts with seconds, and then minutes and seconds, and so on. The amount of free + memory, measured in megabytes, + is shown in a light color, and allocated memory is a darker color. When there’s a sharp drop in + allocated memory, that indicates a garbage collection event.

    + + + +

    + To force a garbage collection event, click Initiate GC Initiate GC icon. +

    + +

    In the following figure, the VM initiated the first garbage collection event, while the + developer forced the second. +

    + + +
  11. Interact with your app and watch how it affects memory usage in the Memory Monitor. You can + identify garbage collection patterns for your app and determine whether they are healthy and what + you expect. +
  12. + + +

    + The graph can show you potential issues: +

    + + + +

    + For example, you might see the following signs of problems: +

    + + +
  13. To stop the Memory Monitor, click Pause Pause icon again to select it. +
  14. + +
+ +

+ Forcing a Garbage Collection Event +

+ +

+ Normally, VMs perform garbage collection only when absolutely needed, since it’s expensive. + However, it can be useful to force garbage collection in certain circumstances. For example, when + locating memory leaks, if you want to determine whether a large object was successfully released + already, you can initiate garbage collection much more aggressively than usual. +

+ +

+ To force a garbage collection event: +

+ + + +

+ Dumping and Analyzing the Java Heap +

+ +

+ When you're monitoring memory usage in Android Studio you can, at the same time, dump the Java + heap to a heap snapshot in an Android-specific HPROF binary format file. The HPROF Viewer + displays classes, instances of each class, and a reference tree to help you track memory usage + and find memory leaks. HPROF is a heap dump format originally supported by J2SE. +

+

The Java heap display does the following:

+ + + +

+ However, you have to look for changes over time yourself by tracking what's happening in the + graph. +

+ +

+ The HPROF Analyzer finds the following potential issues: +

+ + + +

+ A dominator is at the top of a tree. If you remove it, you also remove the branches of the tree + it dominates, so it’s a potential way to free memory. +

+ +

+ Taking and displaying a snapshot of the Java heap +

+ +

+ To see a snapshot of the Java heap, follow these steps: +

+ +
    +
  1. While the Memory Monitor is running, click Dump Java Heap + Dump Java Heap icon. +
  2. + + +

    + When the icon on the Memory Monitor display changes from + Dump Java Heap Start icon to + Dump Java Heap End icon, the file is ready. Android Studio creates the heap snapshot + file with the + filename Snapshot_yyyy.mm.dd_hh.mm.ss.hprof using + the year, month, day, hour, minute, and second of the capture, for example, + Snapshot_2015.11.17_14.58.48.hprof. +

    + +
  3. Click Captures in the main window. +
  4. + +

    + The Captures window appears. +

    + +
  5. Double-click the file to view it in the HPROF Viewer. +
  6. + +

    + The HPROF Viewer appears: +

    + +

    + The tool displays the following information: +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ColumnDescription
    Class NameThe Java class responsible for the memory.
    Total CountTotal number of instances outstanding.
    Heap CountNumber of instances in the selected heap.
    SizeofSize of the instances (currently, 0 if the size is variable).
    Shallow SizeTotal size of all instances in this heap.
    Retained SizeSize of memory that all instances of this class is dominating.
    InstanceA specific instance of the class.
    Reference TreeReferences that point to the selected instance, as well as references pointing to the + references.
    DepthThe shortest number of hops from any GC root to the selected instance.
    Shallow SizeSize of this instance.
    Dominating SizeSize of memory that this instance is dominating.
    + +
  7. Select the Heap menu option you want to display: + + +
  8. Select the View menu option you want to display: + +
+ + +

+ Diving into heap dump data in the HPROF Viewer +

+

The following steps outline the typical workflow:

+
    +
  1. In the HPROF viewer, select a class name.
  2. +
  3. Select an instance of that class.
  4. +
  5. Examine the reference tree.
  6. +
  7. Right-click an item to Jump to source or Go to instance, + as needed.
  8. +
+ + + +

Analyzing heap dump data in the HPROF Analyzer

+

You can detect leaked activities and find duplicate strings with the HPROF Analyzer. + Follow these steps:

+
    +
  1. In the Captures window, double-click an .hprof file to display it in the + HPROF Viewer.
  2. +
  3. Click Capture Analysis on the right side of the main Android Studio window.
  4. + + +

    The HPROF Analyzer appears to the right of the HPROF Analyzer, by default:

    + + + +
  5. In the Analyzer Tasks list, select the items you want to find.
  6. +
  7. Click Perform Analysis Perform Analysis icon.
  8. +
  9. Examine the items in Analysis Results. Click an item to display it in the + HPROF Viewer.
  10. +
+ + + +

Sorting heap dump data

+

Follow this step:

+ + + +

Displaying Java source

+

For some items displayed in the HPROF Viewer, you can go straight to its source code. + Follow this step:

+ + +

Viewing a saved HPROF file

+

After you do a heap dump, Android Studio automatically stores it so you can view it again. + Follow these steps:

+ +
    +
  1. Click Captures in the main window.
  2. + +

    The Captures window appears.

    +
  3. Open the Heap Snapshot folder.
  4. +
  5. Double-click the file to view it.
  6. +
+ + +

Renaming an HPROF file

+ +

If you rename a file from within Android Studio, it continues to appear in Captures + window. Follow these steps:

+
    +
  1. In the Captures window, right-click the file and select Rename.
  2. +
  3. In the dialog, specify the name of the file and click OK.
  4. +
+ + +

Locating a heap dump file on disk

+

You can quickly discover where Android Studio stored HPROF files on disk.

+ + +

Follow this step in Android Studio:

+ +

Note: If you move an HPROF file, Android Studio no longer + displays it in the Captures window. To display it, use + File > Open. Also, if you want to rename the file, do it + from the Captures window and not in the operating system file browser.

+ +

Deleting a heap dump file

+ +

To delete a heap dump file, follow this step:

+ + +

Converting a heap dump file to standard HPROF format

+

You can convert an HPROF file to standard format so you can use it outside of Android Studio with + other analysis tools. Follow these steps:

+
    +
  1. In the Captures window, right-click a heap snapshot file and select Export to + standard .hprof.
  2. +
  3. In the Convert Android Java Heap Dump dialog, specify a filename and click + OK.
  4. + + +

    Android Studio creates a binary HPROF file in the location you specified.

    +
+ +

+ Tracking and Analyzing Memory Allocation +

+ +

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 app performance and memory use.

+ +

The Allocation Tracker does the following:

+ + + +

However, it takes time and experience to learn to interpret the output from this tool.

+ +

Taking and displaying a snapshot of allocation data

+ +

Follow these steps:

+
    +
  1. While the Memory Monitor is running, click Start Allocation Tracking + Start Allocation Tracking icon.
  2. +
  3. Click Start Allocation Tracking + Start Allocation Tracking icon again to + deselect it and end the snapshot.
  4. + +

    The Memory Monitor displays the period when it took the snapshot. In the following + figure, you can see the snapshot period, as shown on the left. By comparison, when you dump the + Java heap, the Memory Monitor displays just the point where the heap snapshot was taken, as + shown on the right.

    + + +

    Android Studio creates the heap snapshot file with the + filename Allocations_yyyy.mm.dd_hh.mm.ss.alloc using the year, month, day, + hour, minute, and second of the capture, for example, + Allocations_2015.11.17_14.58.48.alloc.

    +
  5. Click Captures in the main window.
  6. + + +

    The Captures window appears.

    +
  7. Double-click the file to view it in the Allocation Tracker.
  8. +
  9. Optionally click the graphic icon to display a visual representation of the data. +
  10. +

    + The Allocation Tracker appears: +

    + +

    + + +

    The tool displays the following information:

    + + + + + + + + + + + + + + + + + + + + +
    ColumnDescription
    MethodThe Java method responsible for the allocation.
    CountTotal number of instances allocated.
    SizeThe total amount of allocated memory in bytes.
    + + +
  11. Select the Group By menu option you want to display:
  12. + + +
+ + + +

Sorting allocation data

+ +

Follow this step:

+ + + +

Displaying Java source

+

For some items displayed in the Allocation Tracker, you can view the Java source. Follow one of + these steps:

+ + +

The source code appears in the Code Editor.

+ +

Viewing a saved allocation tracking file

+

After you monitor allocation tracking, Android Studio automatically stores it so you can view it + again. Follow these steps:

+ + +
    +
  1. Click Captures in the main window.
  2. + + +

    The Captures window appears.

    +
  3. Open the Allocation Tracking folder.
  4. +
  5. Double-click the file to view it.
  6. +
+ + +

Renaming an allocation tracking file

+ +

If you rename a file from within Android Studio, it continues to appear in the Captures + window. Follow these steps:

+
    +
  1. In the Captures window, right-click the file and select Rename.
  2. +
  3. In the Rename dialog, specify the name of the file and click OK.
  4. +
+ + +

Locating an allocation tracking file

+

You can quickly discover where Android Studio stored allocation tracking files on disk.

+ + +

Follow this step in Android Studio:

+ + +

Note: If you move an allocation tracking file, Android Studio + no longer displays it in the Captures window. To display the file, use + File + > Open. Also, rename the file from the Captures + window and not in the operating system file browser.

+ +

Deleting an allocation tracking file

+ + +

Follow this step:

+ diff --git a/docs/html/tools/help/am-network.jd b/docs/html/tools/help/am-network.jd new file mode 100644 index 0000000000000..ae116ac4e58e9 --- /dev/null +++ b/docs/html/tools/help/am-network.jd @@ -0,0 +1,130 @@ +page.title=Network Monitor +parent.title=Android Monitor +parent.link=android-monitor.html +page.tags=monitor +@jd:body + +
+
+

In this document

+
    +
  1. Displaying a Running App in the Network Monitor
  2. +
+ +

See also

+
    +
  1. + Android Monitor +
  2. +
  3. logcat Monitor +
  4. + +
  5. Memory Monitor +
  6. + +
  7. CPU Monitor +
  8. + +
  9. GPU Monitor +
  10. +
+ +

Video

+
    +
  1. Battery Drain and Networking
  2. +
+ +

+ Dependencies and Prerequisites +

+ + + +
+
+ +

+ The Network Monitor makes it possible to track when your application is making network requests. + Using this tool, you can monitor how and when your app transfers data, and optimize the underlying + code appropriately. +

+ +

+ By monitoring the frequency of data transfers, and the amount of data transferred during each + connection, you can identify areas of your app that can be made more efficient and use less + battery power. + Generally, you should look for short spikes that can be delayed, or that could cause a later + transfer to be preempted. +

+ + +

+ Displaying a Running App in the Network Monitor +

+ +

+ Follow these steps: +

+ +
    +
  1. Connect a hardware device. +
  2. + +
  3. + Display Android Monitor. +
  4. + +
  5. Click the Network tab. +
  6. + +
  7. Open an app project and run it on the hardware device. +
  8. + +
  9. To start the Network Monitor, click Pause Pause icon to + deselect it. +
  10. +

    + Any network traffic begins to appear in the Network Monitor: +

    + +

    + The Network Monitor adds up the amount of time it takes for the device to transmit and receive + kilobytes of data. + The y-axis is in kilobytes per second. The x-axis starts with seconds, and then minutes and + seconds, and so on. +

    +
  11. To stop the Network Monitor, click Pause Pause icon again to + select it. +
  12. +
\ No newline at end of file diff --git a/docs/html/tools/help/android-monitor.jd b/docs/html/tools/help/android-monitor.jd new file mode 100644 index 0000000000000..4c9f80f829958 --- /dev/null +++ b/docs/html/tools/help/android-monitor.jd @@ -0,0 +1,462 @@ +page.title=Android Monitor +parent.title=Tools +parent.link=index.html +page.tags=monitor +@jd:body + +
+
+

In this document

+
    +
  1. Displaying Android Monitor
  2. +
  3. Profiling a Running App in Android Monitor
  4. +
  5. Switching between Devices and Apps
  6. +
  7. Taking a Screen Capture of the Device
  8. +
  9. Recording a Video from the Screen
  10. +
  11. Examining System Information
  12. +
  13. Terminating the App
  14. +
  15. Rearranging Android Monitor Windows
  16. +
  17. Removing an App from a Device
  18. +
+ +

See also

+
    +
  1. logcat Monitor +
  2. + +
  3. Memory Monitor +
  4. + +
  5. CPU Monitor +
  6. + +
  7. GPU Monitor +
  8. + +
  9. + Network Monitor +
  10. +
+ + +

+ Dependencies and Prerequisites +

+ + + +
+
+ +

+ Android Monitor helps you to profile the performance of your apps so you can optimize, debug, and + improve them. It lets you monitor the following aspects of your apps from a hardware device or + the Android Studio emulator: +

+ + + +

+ Android Monitor contains the logcat, Memory, CPU, GPU, and Network Monitors that you can use + separately to examine these aspects of your apps. +

+ + +

+ Displaying Android Monitor +

+ +

+ Android Monitor is integrated into the Android Studio main window: +

+ + + + +

+ Profiling a Running App in Android Monitor +

+ +

+ Follow these steps: +

+ +
    +
  1. Optionally connect a hardware device. +
  2. + +
  3. + Display Android Monitor. +
  4. + +
  5. Open an app project and run the app on a device or + emulator. +
  6. + +
  7. Click the tab for the monitor you want to view and start the monitor, if needed: + +
+

+ Switching between Devices and Apps +

+ +

+ By default, Android Monitor displays data for your most recently run app. You can switch to + another device and app as needed. In addition to currently running apps, you can view + information about apps that are no longer running so you can continue to view any information + about them that you gathered previously. +

+ +

+ At the top of the Android Monitor main window are two menus listing devices and processes. To + switch to another device, process, or both, follow these steps: +

+ +
    +
  1. Select the device or emulator. +
  2. + +

    + The Device menu lists the devices and emulators that are running or have run during your + current session. There are various status messages that can appear in the Device menu: +

    + + + +
  3. Select the process. +
  4. +
+ +

+ The Process menu lists the processes that are running or have run during your current session. If + a process is no longer running, the menu displays a status of DEAD. +

+ +

+ Taking a Screen Capture of the Device +

+ +

+ You can take a PNG screenshot of the display on a connected device or the emulator. You can use + the images for your marketing materials as well as for debugging, for example. +

+

+ Follow these steps: +

+
    +
  1. + Run your + app from within Android Studio. +
  2. + +
  3. + Select the device and the process in the Android Monitor + menus, if needed. +
  4. + +
  5. Interact with the display on the device or emulator to stage the image you want. +
  6. + +
  7. Click Screen Capture Screen Capture icon in the + Android Monitor toolbar. +
  8. +

    The screenshot appears in a Screenshot Editor window.

    + +
  9. Optionally change the image: + +
  10. +
  11. Click Save to save the image. +
  12. +
+ +

+ Recording a Video from the Screen +

+ +

+ Android Studio lets you record an MP4 video from your hardware device for a maximum of three + minutes. You can use the video for your marketing materials as well as for debugging, for + example. +

+

+ Follow these steps: +

+
    +
  1. + Run your + app from within Android Studio. +
  2. + +
  3. + Select the device and the process in the Android Monitor + menus, if needed. +
  4. + +
  5. Interact with the display on the device or emulator to stage the start of the video. +
  6. + +
  7. Click Screen Record Screen Record icon in the Android Monitor toolbar. +
  8. +

    The screenshot appears in a Screenshot Editor window.

    + +
  9. In the Screen Recorder Options dialog, optionally change the recording options: +
  10. + +
  11. Click Start Recording to start the recording. +
  12. + +
  13. Click Stop Recording to stop the recording. +
  14. + +
  15. In the Save As dialog, save the MP4 file. +
  16. + +
  17. In the Screen Recorder dialog, click one of the buttons to show the file location, + open the recording in a player, or to dismiss the dialog. +
  18. +
+ +

+ Examining System Information +

+

+ You can view dumpsys output from within Android Monitor. Follow these steps: +

+ +
    +
  1. + Run your + app from within Android Studio. +
  2. + +
  3. + Select the device and the process in the Android Monitor + menus, if needed. +
  4. + +
  5. Click System Information System Information icon and then a + menu item in the Android Monitor + toolbar. +
  6. + +

    + The menu items display different types of dumpsys output: +

    + + + +

    + The information appears in an editable text file in the Code Editor. +

    +
+ +

+ Terminating the App +

+ +

+ If you want to stop an app you’ve run from Android Studio, follow these steps: +

+ +
    +
  1. + Select the device and the process in the Android Monitor + menus, if needed. +
  2. + +
  3. Click Terminate Application Terminate App icon. +
  4. + + +

    + The process status changes to DEAD in the Processes menu. The emulator or device + continues to run, but the app closes. Any running monitors in Android Monitor stop. +

    +
+ +

+ Rearranging Android Monitor Windows +

+ +

+ You can rearrange the Android Monitor windows for optimal viewing during your tests: +

+ + + +

+ Removing an App from a Device +

+ +

+ To remove an app from a device you use for development, use the normal uninstall procedure on the + device. +

+ +

+ If you run a new version of an app from Android Studio that’s been already installed on a + hardware device, the device displays an Application Installation Failed dialog. Click + OK to install the new version of the app. +

+ + + + diff --git a/docs/html/tools/help/index.jd b/docs/html/tools/help/index.jd index 86c10354c4089..a97a5516c3e57 100755 --- a/docs/html/tools/help/index.jd +++ b/docs/html/tools/help/index.jd @@ -68,6 +68,10 @@ avd) the emulator (emulator), and the Dalvik Debug Monitor S

Debugging Tools

+
Android Monitor
+
Android Monitor is integrated into Android Studio and provides logcat, memory, CPU, GPU, and + network monitors for app debugging and analysis.
+
adb
Android Debug Bridge (adb) is a versatile command line tool that lets you communicate with an emulator instance or connected Android-powered device. It also provides access to the diff --git a/docs/html/tools/help/logcat.jd b/docs/html/tools/help/logcat.jd index b30971ef11090..1d758486c972d 100644 --- a/docs/html/tools/help/logcat.jd +++ b/docs/html/tools/help/logcat.jd @@ -3,15 +3,25 @@ parent.title=Tools parent.link=index.html @jd:body +
+
+

See also

+ +
    +
  1. Android Monitor
  2. +
+
+
+

The Android logging system provides a mechanism for collecting and viewing system debug output. Logs from various applications and portions of the system are collected in a series of - circular buffers, which then can be viewed and filtered by the logcat command. You can use + circular buffers, which then can be viewed and filtered by the logcat command. You can use logcat from an ADB shell to view the log messages.

For complete information about logcat options and filtering specifications, see Reading and Writing Logs.

-

For more information on accessing logcat from DDMS, instead of the command line, see +

For more information on accessing logcat from DDMS, instead of the command line, see Using DDMS.

Syntax

@@ -34,7 +44,7 @@ $ adb shell

Options

The following table describes the command line options of logcat.

- + @@ -46,7 +56,7 @@ $ adb shell diff --git a/docs/html/tools/help/monitor.jd b/docs/html/tools/help/monitor.jd index aafeb919593a2..3541cc30d9285 100755 --- a/docs/html/tools/help/monitor.jd +++ b/docs/html/tools/help/monitor.jd @@ -8,6 +8,7 @@ page.title=Device Monitor
  1. Investigating Your RAM Usage
  2. +
  3. Android Monitor
diff --git a/docs/html/tools/tools_toc.cs b/docs/html/tools/tools_toc.cs index a0dc5f76e4f1e..f41184e024c66 100644 --- a/docs/html/tools/tools_toc.cs +++ b/docs/html/tools/tools_toc.cs @@ -168,6 +168,27 @@ class="en">Tools Help
Option-b <buffer> Loads an alternate log buffer for viewing, such as events or - radio. The main buffer is used by default. See radio. The main buffer is used by default. See Viewing Alternative Log Buffers.