User Guide

Contents

Prepare an Android* Application for Analysis

Before starting an analysis with the
VTune
Profiler
, make sure your Android application is compiled with required settings:

Compilation Settings

Performance analysis is only useful on binaries that have been optimized and have symbols to attribute samples to source code. To achieve that:
  • Compile your code with release level settings (for example, do not use the
    /O0
    setting on GCC*).
  • Do not set
    APP_OPTIM
    to
    debug
    in your
    Application.mk
    as this setting disables optimization (it uses
    /O0
    ) when the compiler builds your binary.
  • To run performance analysis (Hotspots) on non-rooted devices, make sure to compile your code setting the
    debuggable
    attribute to
    true
    in
    AndroidManifest.xml
    .
    If your application is debuggable (
    android:debuggable="true"
    ), the default setting will be
    debug
    instead of
    release
    . Make sure to override this by setting
    APP_OPTIM
    to
    release
    .
By default, the Android NDK build process for Android applications using JNI creates a version of your
.so
files with symbols.
The binaries with symbols included go to
[ApplicationProjectDir]/obj/local/x86
.
The stripped binaries installed on the target Android system via the
.apk
file go to
[ApplicationProjectDir]/libs/x86
. These versions of the binaries cannot be used to find source in the
VTune
Profiler
. However, you may collect data on the target system with these stripped binaries and then later use the binaries with symbols to do analysis (as long as it is an exact match).
When the
VTune
Profiler
finishes collecting the data, it copies
.so
files from the device (which have had their symbols stripped). This allows the very basic functionality of associating samples to assembly code.
Use ITT APIs to control performance data collection by adding basic instrumentation to your application.

Product and Performance Information

1

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

Notice revision #20110804