Before you can profile your executable with Streamline, you must compile your executable. This topic describes the compiler options to use when you compile your application.
When compiling with GCC or Clang, use the following options:
-gTurns on the debug symbols necessary for quality analysis reports.
-fno-inlineDisables inlining and substantially improves the call path quality.
-fno-omit-frame-pointerCompiles your EABI images and libraries with frame pointers. This option enables Streamline to record the call stack with each sample taken.
-mno-omit-leaf-frame-pointerKeeps the frame pointer in leaf functions.
-marmWhen building for AArch32, if GCC was compiled with the --with-mode=thumb
option enabled, this -marm is required. Using --with-mode=thumb
without -marm breaks call stack unwinding in Streamline.
To enable call stack unwinding in Streamline, you need to compile your executable with some additional compiler options:
For AArch64 applications:
Compiling with GCC, use: -fno-omit-frame-pointer and
-mno-omit-leaf-frame-pointer
Note
Arm recommends using -mno-omit-leaf-frame-pointer to prevent
samples in leaf functions incorrectly listing their grand-parent
function as their parent.
Compiling with Clang, use: -fno-omit-frame-pointer
Note
-mno-omit-leaf-frame-pointer is not supported on Clang.
For AArch32 applications, compiling with either GCC or Clang, use:
-fno-omit-frame-pointer, -marm, and -mapcs-frame.
Note
Streamline supports call stack unwinding for code that has been generated by Arm® Compiler 6.
Streamline does not support call stack unwinding for T32 (Thumb®) code.
To enable Streamline to provide extra context when profiling your executable, you can add annotations to your source code. Streamline supports two types of annotations:
User space annotations, for annotating your application
Kernel annotations, to profile system calls
You can read more information about annotating your code in the Annotate your code chapter of the Arm Streamline User Guide.