11.5.5. Generating the profile report

The ARM profiler utility, armprof, generates the profile report using the data in the file. The report is divided into sections, each of which gives information about a single function in the program.

A section function (called the current function) is indicated by having its name start at the left-hand edge of the Name column. If call graph profiling is used, information is also given about child and parent functions. Functions listed below the current function are its children. Those listed above the current function are the function parents it.

The columns in the report have the following meanings:

Name

Displays the function names. The current function in a section starts at the left-hand edge of the column. Parent and child functions are shown indented.

cum%

Shows the total percentage time spent in the current function plus the time spent in any functions that it called. It is only valid for the current function.

self%

Shows the percentage time spent in a function.

  • For the current function, it shows the percentage time spent in this function.

  • For parent functions, it shows the percentage time spent in the current function on behalf of the parent.

  • For child functions, it shows the percentage time spent in this child on behalf of the current function.

desc%

Shows the percentage time spent in a function:

  • for the current function, it shows the percentage time spent in children of the current function on the current function's behalf

  • for parent functions, it shows the percentage time spent in children of the current function on behalf of this parent

  • for child functions, it shows the percentage time spent in this child's children on behalf of the current function.

calls

Shows the number of times a function is called:

  • for the current function, it shows the number of times this function was called

  • for parent functions, it shows the number of times this parent called the current function

  • for child functions, it shows the number of times this child was called by the current function.

Below is a section of the output from armprof for a call graph profile:


Name        cum%      self%    desc%    calls
main        96.04%    0.16%   95.88%        0
  qsort               0.44%    0.75%        1
  _printf             0.00%    0.00%        3
  clock               0.00%    0.00%        6
  _sprintf            0.34%    3.56%     1000
  check_order         0.29%    5.28%        3
  randomise           0.12%    0.69%        1
  shell_sort          1.59%    3.43%        1
  insert_sort        19.91%   59.44%        1
-------------------------------------------------------------
  main               19.91%   59.44%        1
insert_sort 79.35%   19.91%   59.44%        1
  strcmp             59.44%    0.00%   243432
-------------------------------------------------------------

From the cum% column, you can see (in the main section) that the program spent 96.04 percent of its time in main and its children. Of this, only 0.16 percent of the time is spent in main (self% column), whereas 95.88 percent of the time is spent in functions called by main (desc% column). The call count for main is 0 because it is the top-level function, and is not called by any other functions, whereas the section for insert_sort shows that it made 243432 calls to strcmp, and that this accounted for 59.44 percent of the time spent in strcmp (the desc% column shows 0 in this case because strcmp does not call any functions).

Copyright © 1997, 1998 ARM Limited. All rights reserved.ARM DUI 0040D
Non-Confidential