This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ds-5 call graph question

Hi everyone!

I am using arm ds-5 professional under evaluation license, and I am trying to collect call-graph info from my test application under arm via streamline, but faced with issue.

Collected call graph is flat, there is no hierarchy

Screenshot from 2014-10-27 16:13:42.png

But it should be something like this: main -> f1 -> f2

I have used all necessary options that mentions in manual: -fno-omit-frame-pointer -fno-inline and checked "Call stack unwinding"

I ran this code on remote arm machine under Ubuntu 14.04 build according to this manual https://git.linaro.org/arm/ds5/gator.git/blob/HEAD:/README_Streamline.txt

I' ve used this config options for stream line:

Screenshot from 2014-10-27 16:13:53.png

Could some one please explain me what i am doing wrong?

I have attached src and build.sh.

Thanks in advance

6798.zip
  • Hi dinar,

    A flat or incomplete call path can occur for several reasons (several which you have already verified, but I will repeat for completeness):

    • Call Stack Unwinding is not enabled in the Streamline Capture & Analysis Options.
    • The image selected in Streamline is not derived from the same image that was run on the target.
    • The application is not compiled with frame-pointers. For GCC, use CFLAGS '-fno-omit-frame-pointer' option.
    • The application is compiled for Thumb mode. Only ARM mode may be call stack profiled due to compiler limitations, so do not use in parallel with '-mthumb'.
    • Old versions of gator do not work with AArch64 or with images compiled with LLVM/Clang, so ensure you are using gator v14 or later.
    • If you are profiling with library symbols, you may not have access to a correctly compiled library, which will result in many orphaned nodes.
    • Hand-written assembly is encountered in the call path which doesn't properly account for frames.
    • The compilation was not a clean build, i.e. some .o files are compiled with frame pointers, some without frame pointers.

    The most likely cause is that the image is compiled for Thumb mode. To ensure the image is not compiled for Thumb mode, add the -marm option, as the compiler may be configured with --with-mode=thumb, thus making Thumb mode default.

  • Hi dinar,

    Please bear in mind that Streamline is a statistical profiling tool.

    From the screenshots you provided, it seems that no PC (program counter) sample has fallen in your application space (functions are shown in grey color with 0.00% value).

    I suggest to write an application to keep the CPU running in a loop instead of using the sleep call.

    Then, you should see the Call-graph and Call-path similar to the images attached (taken from the Streamline_annotate example in DS-5/examples/Linux_examples.zip)

    call-path.pngcall-graph.png

    FYI, these are the recommended compiler options to enable call stack unwinding.

    Note: Streamline does not support call stack unwinding for Thumb code, so make sure you use -marm

    Please note the Call-graph tab has been removed in DS-5/Streamline 5.20.

    Best regards,

    Marcelo