30
Tutorial: Finding Hotspots on an Android* Platform Intel ® VTune™ Amplifier for Systems (Windows* OS version) C++ Sample Application Code Document Number: 330180-001 Legal Information

Tutorial: Finding Hotspots on an Android* Platform...hotspot functions in your serial or parallel Android* application by performing a series of steps in a workflow. This tutorial

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

  • Tutorial: Finding Hotspots on anAndroid* PlatformIntel® VTune™ Amplifier for Systems (Windows* OS version)

    C++ Sample Application Code

    Document Number: 330180-001

    Legal Information

  • ContentsLegal Information................................................................................ 5Overview..............................................................................................7

    Chapter 1: Navigation Quick Start

    Chapter 2: Finding HotspotsSet Up the Android* System for Analysis.....................................................12Build Application and Create New Project.................................................... 13Run Basic Hotspots Analysis...................................................................... 15Interpret Result Data................................................................................16Compare Results......................................................................................21

    Chapter 3: Summary

    Chapter 4: Key Terms

    Contents

    3

  • Tutorial: Finding Hotspots on an Android* Platform

    4

  • Legal InformationNo license (express or implied, by estoppel or otherwise) to any intellectual property rights is granted by thisdocument.

    Intel disclaims all express and implied warranties, including without limitation, the implied warranties ofmerchantability, fitness for a particular purpose, and non-infringement, as well as any warranty arising fromcourse of performance, course of dealing, or usage in trade.

    This document contains information on products, services and/or processes in development. All informationprovided here is subject to change without notice. Contact your Intel representative to obtain the latestforecast, schedule, specifications and roadmaps.

    The products and services described may contain defects or errors which may cause deviations frompublished specifications.

    No license (express or implied, by estoppel or otherwise) to any intellectual property rights is granted by thisdocument.

    Intel disclaims all express and implied warranties, including without limitation, the implied warranties ofmerchantability, fitness for a particular purpose, and non-infringement, as well as any warranty arising fromcourse of performance, course of dealing, or usage in trade.

    This document contains information on products, services and/or processes in development. All informationprovided here is subject to change without notice. Contact your Intel representative to obtain the latestforecast, schedule, specifications and roadmaps.

    The products and services described may contain defects or errors which may cause deviations frompublished specifications.

    Intel processor numbers are not a measure of performance. Processor numbers differentiate features withineach processor family, not across different processor families. Go to: Learn About Intel® Processor Numbers

    Software and workloads used in performance tests may have been optimized for performance only on Intelmicroprocessors. Performance tests, such as SYSmark and MobileMark, are measured using specificcomputer systems, components, software, operations and functions. Any change to any of those factors maycause the results to vary. You should consult other information and performance tests to assist you in fullyevaluating your contemplated purchases, including the performance of that product when combined withother products.

    Cilk, Intel, the Intel logo, Intel Atom, Intel Core, Intel Inside, Intel NetBurst, Intel SpeedStep, Intel vPro,Intel Xeon Phi, Intel XScale, Itanium, MMX, Pentium, Thunderbolt, Ultrabook, VTune and Xeon aretrademarks of Intel Corporation in the U.S. and/or other countries.

    *Other names and brands may be claimed as the property of others.

    Microsoft, Windows, and the Windows logo are trademarks, or registered trademarks of Microsoft Corporationin the United States and/or other countries.© 2015 Intel Corporation.

    5

  • Tutorial: Finding Hotspots on an Android* Platform

    6

  • Overview

    Discover how to use Basic Hotspots Analysis with the Intel® VTune™ Amplifier for Systems tounderstand where your Android* application is spending time. By identifying hotspots - the most time-consuming program units - you can understand how effectively your code is using available cores and othersystem resources. By identifying the causes of ineffective performance and utilization you can correct themand improve your application performance.

    This document applies to the analysis of Android* applications using the VTune Amplifier in the Intel® SystemStudio. If you are using a different Intel Studio, please refer to that Studio-specific supplementaldocumentation in //documentation/. For an example of remote performanceanalysis on an embedded platform, see Tutorial: Finding Hotspots on a Remote Linux System.

    About This Tutorial This tutorial uses the sample tachyon and guides you through the basic stepsrequired to use the GUI to analyze the code for hotspots by means of remotedata collection.

    Estimated Duration • 10 minutes: Preparing your target device for use• 10 minutes: Preparing your sample application and analyzing it

    Learning Objectives After you complete this tutorial, you will be able to:

    • Set up the Android* system for analysis• Build the tachyon package and create a new project• Run Basic Hotspots Analysis• Interpret result data• Compare results

    More Resources • The Intel® Developer Zone is a site devoted to software development tools,resources, forums, blogs, and knowledge bases, see http://software.intel.com

    • The Intel Software Documentation Library is part of the Intel Developer Zoneand is an online collection of Release Notes, User and Reference Guides,White Papers, Help, and Tutorials for Intel software products http://software.intel.com/en-us/intel-software-technical-documentation

    Start Here

    7

  • Tutorial: Finding Hotspots on an Android* Platform

    8

  • Navigation Quick Start 1 Intel® VTune™ Amplifier for Systems provides information on code performance for users developing

    serial and multithreaded applications for Windows*, Android*, and Linux* operating systems. VTuneAmplifier helps you analyze algorithm choices and identify where and how your application can benefit fromavailable hardware resources.

    VTune Amplifier AccessTo access the VTune Amplifier GUI:

    • From the Windows* Start menu, choose Intel VTune Amplifier for Systems

    Configure and manage projects and results, and launch new analyses from the primarytoolbar. Click the Project Properties button on this toolbar to manage result file locations.Newly completed and opened analysis results along with result comparisons appear in theresults tab for easy navigation.

    Use the VTune Amplifier menu to control result collection, define and view project properties,and set various options.

    9

  • The Project Navigator provides an iconic representation of your projects and analysisresults. Click the Project Navigator button on the toolbar to enable/disable the ProjectNavigator.

    Click the (change) link to select a viewpoint, a preset configuration of windows/panes for ananalysis result. For each analysis type, you can switch among several viewpoints to focus onparticular performance metrics. Click the question mark icon to read the viewpoint description.

    Switch between window tabs to explore the analysis type configuration options and collecteddata provided by the selected viewpoint.

    Use the Grouping drop-down menu to choose a granularity level for grouping data in the grid.

    Use the filter toolbar to filter out the result data according to the selected categories.

    Next StepFinding Hotspots

    1 Tutorial: Finding Hotspots on an Android* Platform

    10

  • Finding Hotspots 2 You can use the Intel® VTune(TM) Amplifier installed on your Windows* host to identify and analyze

    hotspot functions in your serial or parallel Android* application by performing a series of steps in a workflow.This tutorial guides you through these workflow steps while using a sample ray-tracer application namedtachyon.VTune Amplifier for Systems supports this remote usage mode, using the VTune Amplifier target packageand ADB communication:

    1 Setup the AndroidSystem

    • Configure your Android device for analysis.• Gain adb access through either a USB connection or by TCP/IP.

    2 Build the Applicationand Create a NewProject

    1. Prepare your Android application for analysis.2. Specify your analysis target and remote system.3. Optionally, specify binary and source search directories.

    3 Run Basic HotspotsAnalysis

    1. Choose the Basic Hotspots Analysis type.2. Run the analysis from the host.

    11

  • 4 Interpret Result Data 1. View the collected data on the host.2. Consider project views and reports to identify bottlenecks or unexpected

    application behavior.3. Analyze your code.

    5 Compare Results 1. View performance results for optimized code.2. Examine balanced threading results.

    Next StepSet up Android System for Analysis

    Set Up the Android* System for Analysis

    Configure your Android* device for analysis. For this tutorial you do not need to install a VTuneAmplifier device driver, but must have adb installed and configured on your host system. Further, thistutorial currently supports the Dalvik runtime running on Intel(R) processor-based devices running Java*.

    NOTEFor information on obtaining a supported device on which to test your own Android application or,enabling Java Performance Analysis on Android devices:

    • Enabling Java Performance Analysis on Android Devices Using Intel® VTune™ Amplifier for Systemsat https://software.intel.com/en-us/articles/enabling-java-analysis-on-android-using-vtune-amplifier-2014-for-systems.

    • Intel(R) Mobile Development Kit for Android at https://software.intel.com/en-us/intel-mobile-development-kit-for-android.

    Allow a debug connection to enable adb access:1. Select Settings > About 2. Tap Build number seven times to enable the Developer Options tab3. Select the Settings > Developer Options and enable the USB debugging option

    NOTEThe path to Developer Options may vary depending on the manufacturer of your device and systemversion.

    Occasionally it is difficult or impossible get adb access to a device over USB. You may also get adb overEthernet or WiFi.

    For example, to connect via WiFi access point, do the following:

    1. Find the IP Address of the target. The IP address is available in Android for Ethernet via Settings >Wireless&Networks > Ethernet > IP Address or for WiFi via Setting > Wireless&Networks >Wi-Fi > IP Address

    2. Make sure adb is enabled on the target device. If not enabled, go to a Terminal app (of your choice) onthe device and type:

    $ su$ setprop service.adb.tcp.port 5555$ stop adbd$ start adbd

    3. Connect adb on the host to the remote device. In the Command Prompt or the Terminal on the host,type:

    $ adb connect :5555

    2 Tutorial: Finding Hotspots on an Android* Platform

    12

  • While you do not require root mode adb access to the Android device to run this tutorial, you do require it to:• Enable the Android device to support Java analysis• Install and load the drivers needed for hardware event-based sampling• Run hardware event-based sampling analysis

    NOTEFor instructions on how to gain a root mode adb access to your device, see online help or Preparing aTarget Android System for Remote Analysis. On some versions of Android systems including most ofthe Intel-supplied reference builds for SDVs, the required drivers are pre-installed in /lib/modulesor /system/lib/modules. If the drivers are not pre-installed in any of these directories, you need tobuild them manually from the command line. For information on how to build needed drivers seeBuilding Drivers for Performance Analysis of an Android Target in the online help. You do not need toinstall the Android target package manually since it is automatically installed when you start collection.

    Next StepBuild Application and Create New Project

    Build Application and Create New Project

    Follow these steps before analyzing your sample tachyon application target for hotspots.

    Build the Application

    1. If you do not have them already, get and install these software tools:

    • Android* SDK and NDK• VTune Amplifier for Systems• The sample Tachyon.apk package

    NOTEThis Android package is available online at the Intel Software Development Library at https://software.intel.com/en-us/download-tachyon.zip

    The sample Tachyon.apk package that this tutorial uses is ready for analysis. The following steps havealready been completed in that code, and are presented here as a summary:

    a. The debuggable attribute was set to true in AndroidManifest.xml.b. The APP_OPTIM environment variable was set to release in the jni/Application.mk file.c. It was compiled with release level settings:

    >ndk-build>ant-release

    2. Install the Tachyon.apk file on the Android device. One way to do this is to use the adb command:adb install Tachyon.apk

    You can confirm that the package has installed by either running tachyon on the device, or by listingout the installed packages:

    adb shell pm list packages | grep tachyon

    Finding Hotspots 2

    13

  • NOTETo prepare your own sample Android application for analysis you must compile your code with a fullyoptimized build with symbols enabled in addition to other setup details. Review these requirements atPreparing an Android* Application for Analysis in the Intel VTune Amplifier online help.

    Create a Project

    1. From the Start menu, launch the VTune Amplifier GUI.

    2.Create a new project via New > Project... or using the new project action from the toolbar. TheCreate a Project dialog box opens.

    3. Specify a project name such as tachyon that will be used as the project directory name. Click onCreate Project.

    VTune Amplifier creates the tachyon project directory under the C:\Users\\Documents\Amplifier for Systems\projects\ directory and opens the New Amplifier Result page with theAnalysis Target tab active.

    4. In the Analysis Target tab, specify your target as follows:

    Target system: Android device (ADB)

    Target type: Launch Android Package

    Via ADB on device: Select device from drop-down list. In the sample below, the Androiddevice is identified as DellVenue8000218734

    Package name: Either click Browse and selectthe package namedcom.intel.tbb.example.tachyon from thepull down list, or enter it directly as thePackage Name.

    You can select Automatically stop collectionafter (sec) to a value in seconds. The samplebelow shows 25. You can also choose to clickStop after a single iteration of the tachyonapplication. You will see a 3-D fractal imageappear, blank out, and start to reappear again.One iteration will show you the required data.

    2 Tutorial: Finding Hotspots on an Android* Platform

    14

  • 5. Click the Binary/Symbol Search button, add the directory for the binary with symbols to the searchpaths, and click OK. When Android apps are built the symbols get created but are stripped off when thepackage is created before you place the package on the device. The original binary with symbols is inthis directory [AndroidAppBuildDir]\out\target\product\[your target]\obj.You may have a search directory for binaries similar to this one: [ApplicationProjectDir]\obj\local\x86

    6. Click the Source Search button, add the directory for the binary with symbols to the search baths, andclick OK.

    You may have a search directory for source files similar to this one: [ApplicationProjectDir]\src7. Click Choose Analysis to apply the settings and switch to the Analysis Type tab.

    Next StepRun Basic Hotspots Analysis

    Run Basic Hotspots Analysis

    Before running an analysis, choose a configuration level to regulate Intel® VTune™ Amplifier analysisscope and running time, including the size of the data collection files. In this tutorial, you run the BasicHotspots Analysis to identify the hotspots that took the most time to execute.

    Basic Hotspots analysis requires no sampling drivers, but they are required for hardware event-basedanalysis. Refer to the help topic Preparing a Target Android* System for Remote Analysis for moreinformation.

    Run an Analysis

    1. If it is not already displayed, select the Analysis Type tab.2. On the left pane of the Analysis Type window, locate the analysis tree and select Algorithm Analysis

    > Basic Hotspots. The right pane is updated with the predefined settings for the Basic Hotspotsanalysis.

    3. Click the Start button on the right command bar.

    Finding Hotspots 2

    15

  • NOTEAfter you click the start button, VTune Amplifier first installs the remote collector on the Android*device before running tachyon and collecting data.

    Data CollectionVTune Amplifier launches the tachyon application which displays a 3-D fractal image and its own executiontime, and will continue running until you press Stop or until the duration of the sampling session that you setup in seconds has been reached.

    Then the VTune Amplifier finalizes the collected results and opens the analysis results in the Hotspots byCPU Usage viewpoint.

    To make sure the performance of the application is repeatable, go through the entire tuning process on thesame system with a minimal amount of other software executing.

    • By using advanced features of the VTune Amplifier you can include Android framework events onyour results timeline. This allows you to draw correlations between the code that is running on yourCPU and events that are spawned by the Android framework, such as jank - dropped frames whichmake apps smoother.

    • For details on how to set up these events in your Basic Hotspots Analysis refer to Using AndroidFramework Events.

    Next StepInterpret Result Data

    Interpret Result Data

    The Android* application tachyon runs on the Android device, rendering the 3-D fractal image incycles. As soon as the image is rendered completely the first time, click the Stop button to stop thecollection and start finalization, if you did not set the Automatically stop collection after (sec) value inthe project.

    NOTEIf you did not set up the Binary/Symbol search path and the Source search path earlier when youcreated the project, you will need to add those paths to your project and re-resolve your result to seefunction names in the following.

    2 Tutorial: Finding Hotspots on an Android* Platform

    16

  • When you press stop and tachyon exits, the Intel VTune Amplifier finalizes the results and opens theHotspots by CPU Usage viewpoint where each window or pane is configured to display code regions thatconsumed a lot of CPU time. To interpret the data on the sample code performance, do the following:

    • Understand the basic performance metrics provided by the Basic Hotspots analysis.• Analyze the most time-consuming functions and CPU usage.• Analyze performance per thread.

    NOTEThe screenshots and execution time data provide in this tutorial are created on a system with four CPUcores. Your data may vary depending on the number and type of CPU cores on your Android device.

    Understand the Basic Hotspots Metrics

    Start analysis with the Summary window. To interpret the data, hover over the question mark icons toread the pop-up help and better understand what each performance metric means.

    The CPU Time for the tachyon sample application is equal to 22.600 seconds. It is the sum of CPU Timefor all application threads. Total Thread Count is 15, so multiple threads ran during data collection.

    The Top Hotspots section provides data on the most time consuming functions (hotspot functions) sortedby CPU Time spent on their execution.

    The closest_intersection function, which took 5.500 seconds to execute, shows up at the top of the listas the hottest function. The second hottest function writetgaregion shows up at 4.776 seconds, and so on.The [Others] entry at the bottom shows the sum of CPU time for all functions not listed in the table, at8.813 seconds.

    The CPU Usage Histogram represents the elapsed time and usage level for the available logical processors.

    Finding Hotspots 2

    17

  • The tachyon sample application ran on one, two, or three logical CPUs most of the time. If you hover overthe first bar in the red section of Simultaneously Utilized Logical CPUs, you see that it spent 3.669 secondstotal in one core, which is classified by the VTune Amplifier as poor CPU utilization. In comparison, very littletime was spent in Ideal or Target Concurrency, in which all four CPUs were utilized. To understand how theapplication used these available logical CPUs, explore the Bottom-up pane.

    Analyze the Most Time-consuming Functions and CPU UsageClick the Bottom-up tab. By default, the data in the grid is sorted by Function/Call Stack. You may changethe grouping level using the Grouping drop-down menu at the top of the grid.

    Examine the CPU Time by Utilization column values. This column is marked with a yellow star as theData of Interest column. It means that the VTune Amplifier uses this type of data for some calculationsincluding example, filtering, stack contribution, and others. Functions that took the most CPU time to executeare listed on top.

    The closest_intersection function took the maximum time to execute, 5.500 seconds, and had extensivePoor CPU utilization (red bars). This means that the processor cores were not well utilized most of the timespent on executing this function.

    NOTE

    You may change the stack representation to a "tree" style by clicking the Change StackLayout button located in the upper right of the menu.

    2 Tutorial: Finding Hotspots on an Android* Platform

    18

  • To see the detailed CPU usage information per function, use the Expand button in the Bottom-up pane toexpand the CPU Time by Utilization column.

    Finding Hotspots 2

    19

  • Select the closest_intersection function in the grid and explore the data provided in the Data ofInterest (CPU Metrics) pane on the right. The Call Stack pane displays full stack data for each hotspotfunction, enabling you to navigate between function call stacks and understand the impact of each stack tothe function CPU time. The stack functions in the Call Stack pane are represented in the following format.

    ! -

    For the sample application, the hottest function closest_intersect is located in the libjni-enginemodule in the grid.cpp source file. You can double click the module to view the source code.

    Analyze Performance per ThreadIf you change the grouping level in the Bottom-up pane from Function/Call Stack to Thread/Function/Call Stack, you see that five threads ran the tachyon application, Thread IDs 16725, 16797, 16800, 16795,and 16799 in this example. To get detailed information on the thread performance, explore the Timelinepane.

    When you hover over the Timeline area graph element, the timeline tooltip displays time passed since theapplication has been launched.

    The threads area shows the distribution of CPU time utilization per thread. Hover over a bar to see the CPUtime utilization in percent for this thread at each moment of time. Green zones the times threads are active.

    The CPU Usage area shows the distribution of CPU time utilization for the whole application. Hover over a barto see the application-level CPU time utilization in percent at each moment of time.

    VTune Amplifier calculates the overall CPU Usage metric as a sum of CPU time per each thread of theThreads area. Maximum CPU Usage value is equal to [number of processor cores ] x 100%, or 400%in the case above.

    2 Tutorial: Finding Hotspots on an Android* Platform

    20

  • The Timeline analysis identifies that the example.tachyon threads were utilizing five threads, and the CPUUsage tooltip shows that CPU time values are about 9% whereas the maximum CPU time value for thissystem is 400%. This means the processor cores seemed to be greatly under-utilized for most of the timespent on executing the tachyon application.

    Next StepCompare Results

    Compare Results

    Completing a Basic Hotspots Analysis on a version of the tachyon package which has been optimizedfor threading reveals a very different analysis result. In this example, unnecessary locks are removed thatwere causing only one CPU at a time to be used with pixel generation. Also, using a more efficient cachereading algorithm resulted in fewer cache misses.

    The following examples are presented to illustrate how some results from optimized code would comparewith the previous analysis.

    Performance Results for More Optimized CodeAfter optimizing, our Basic Hotspots Analysis changes. In an optimized version of tachyon in which thread-aware and cache-reading code replaced the two previously identified hotspots, there are now two new tophotspots, grid_intersect and sphere_intersect.

    Examining the CPU Usage Histogram in the optimized codes shows that this version of the tachyon sampleapplication ran on four logical CPUs, and that target Ideal concurrency was achieved.

    Finding Hotspots 2

    21

  • Exploring the Bottom-up tab shows that the grid_intersect function took the maximum time to execute,20.791 seconds, and in contrast to the previous example, had no Poor CPU utilization (red bars). Thismeans that the processor cores were well utilized most of the time spent on executing this function.

    Analyze Performance per ThreadThe Timeline pane also looks very different. The threads are much more evenly utilized between the fourCPUs.

    2 Tutorial: Finding Hotspots on an Android* Platform

    22

  • Next StepSummary

    Finding Hotspots 2

    23

  • 2 Tutorial: Finding Hotspots on an Android* Platform

    24

  • Summary 3 You have completed the Finding Hotspots tutorial. Here are some important things to remember when

    using the Intel(R) VTune(TM) Amplifier for Systems to analyze your code for hotspots:

    Step Tutorial Recap Key Tutorial Take-aways

    1. Set up theAndroid* Systemfor Analysis

    You enabled Debug connections toenable adb access. You also saw anexample of how to setup WiFi adbaccess in the case that USB access isnot possible.

    • You must have adb installed on yourhost to access your Android* device andto run Basic Hotspots Analysis, but youdo not require root mode access. Rootmode access is required for hardwareevent-based sampling and Java*analysis.

    2. Build theapplication andCreate a NewProject

    You installed the tachyon.apkpackage on your Android* device.You launched the GUI and configuredthe project on your Linux* server.

    • Use a fully optimized production buildwith symbols enabled.

    • Be sure to complete Binary/SymbolSearch and Source Search paths to seefunction names and drill down to source.

    3. Run BasicHotspotsAnalysis

    You ran the analysis and stopped theapplication after a single iteration.

    • You can launch analysis from the GUI orfrom the command line.

    4. InterpretResult Data

    You identified the function closestintersection as the function usingthe most CPU time. You alsoidentified extremely poor threadusage in the sample application.

    • Use Basic Hotspots Analysis toexamine the CPU usage and threadutilization for an application.

    5. CompareResults

    You viewed the results of a thread-aware version of the tachyonapplication to see how BasicHotspots Analysis results foroptimized code compares to theresults you obtained.

    • Compare subsequent Basic HotspotsAnalysis results to make sure changesto your code improve its performance .

    Optimization Notice

    Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors foroptimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, andSSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, oreffectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certainoptimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer tothe applicable product User and Reference Guides for more information regarding the specific instructionsets covered by this notice.

    Notice revision #20110804

    25

  • 3 Tutorial: Finding Hotspots on an Android* Platform

    26

  • Key Terms 4 The following list of Key Terms and definitions is included for easy reference while using this tutorial.

    baseline: A performance metric used as a basis for comparison of the application versions before and afteroptimization. Baseline should be measurable and reproducible.

    CPU time: The amount of time a thread spends executing on a logical processor. For multiple threads, theCPU time of the threads is summed. The application CPU time is the sum of the CPU time of all the threadsthat run the application.

    CPU usage: A performance metric when the VTune Amplifier identifies a processor utilization scale,calculates the target CPU usage, and defines default utilization ranges depending on the number of processorcores.

    Utilization Type

    Defaultcolor

    Description

    Idle All CPUs are waiting - no threads are running.

    Poor Poor usage. By default, poor usage is when the number of simultaneouslyrunning CPUs is less than or equal to 50% of the target CPU usage.

    OK Acceptable (OK) usage. By default, OK usage is when the number ofsimultaneously running CPUs is between 51-85% of the target CPU usage.

    Ideal Ideal usage. By default, Ideal usage is when the number of simultaneouslyrunning CPUs is between 86-100% of the target CPU usage.

    Elapsed time:The total time your target ran, calculated as follows: Wall clock time at end of application– Wall clock time at start of application.

    finalization: A process during which the Intel® VTune™ Amplifier converts the collected data to a database,resolves symbol information, and pre-computes data to make further analysis more efficient and responsive.

    host system: The Windows* system on which you have installed and are running the Intel VTunePerformance Analyzer for Systems.

    hotspot: A section of code that took a long time to execute. Some hotspots may indicate bottlenecks andcan be removed, while other hotspots inevitably take a long time to execute due to their nature.

    Basic Hotspots analysis: An analysis type used to understand the application flow and identify hotspots.VTune Amplifier creates a list of functions in your application ordered by the amount of time spent in afunction. It also detects the call stacks for each of these functions so you can see how the hot functions arecalled. VTune Amplifier uses a low overhead (about 5%) user-mode sampling and tracing collection that getsyou the information you need without slowing down the application execution significantly.

    target: A target is an executable file you analyze using the Intel® VTune™ Amplifier.

    target system:The Android* device on which your application and the tachyon sample code run. The targetsystem is connection to the host system by means of a USB connection, WiFi, or TCP/IP.

    viewpoint: A preset result tab configuration that filters out the data collected during a performance analysisand enables you to focus on specific performance problems. When you select a viewpoint, you select a set ofperformance metrics the VTune Amplifier shows in the windows/panes of the result tab. To select therequired viewpoint, click the (change) link and use the drop-down menu at the top of the result tab.

    27

  • 4 Tutorial: Finding Hotspots on an Android* Platform

    28

  • IndexAAnalysis, Android System 12

    HHotspots Analysis 15Hotspots, Finding 11

    KKey Terms 27

    NNavigation Quick Start 9

    OOverview 7

    PProjects 13

    SSummary 25

    Index

    29

  • Tutorial: Finding Hotspots on an Android* Platform

    30

    ContentsLegal InformationOverviewNavigation Quick StartFinding HotspotsSet Up the Android* System for AnalysisBuild Application and Create New ProjectRun Basic Hotspots AnalysisInterpret Result DataCompare Results

    SummaryKey Terms