You copied the Doc URL to your clipboard.

Recommended compiler options

When building executables for profiling using Streamline, it is best practice to use the compiler options that are listed in this topic.

When using GCC, use the following options:

-g
Turns on the debug symbols necessary for quality analysis reports.
-fno-inline
Disables inlining and substantially improves the call path quality.
-fno-omit-frame-pointer
Compiles your EABI images and libraries with frame pointers. This option enables Streamline to record the call stack with each sample taken.
-marm
When building for ARMv7 and earlier, this option is required if GCC was compiled with the --with-mode=thumb option enabled. Using the --with-mode=thumb option without -marm breaks call stack unwinding in Streamline.

Note

Streamline does not support call stack unwinding for T32 (Thumb®) code. It also does not support call stack unwinding for code that is generated by ARM Compiler version 5 and earlier (armcc).

For Android, Streamline can profile OAT files that are generated by Android runtime (ART), down to function level.

To enable OAT files to be built with debug symbols, ensure that dex2oat runs with the --no-strip-symbols option. This includes function names, but not line numbers, in the OAT files. As a result, the Streamline report for the application shows function names and disassembly in the Code view, but not source code.

To do this, run the following command on the device and then re-install the APK file:

setprop dalvik.vm.dex2oat-flags --no-strip-symbols

To verify the options for dex2oat are set correctly, run the command:

getprop dalvik.vm.dex2oat-flags

To check whether DEX files contain .debug_* sections, you could use the GNU tools readelf command, for example:

readelf –S …/images/*.dex
Related information