Changes between Version 3 and Version 4 of instruments


Ignore:
Timestamp:
07/01/16 04:51:22 (9 years ago)
Author:
agscott1
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • instruments

    v3 v4  
    8686[[Image(http://i.imgur.com/j8kCtok.jpg)]]
    8787
     88== Call Tree Option Explanations ==
     89
     90From the previous section, we selected `Separate by Thread`, `Invert Call Tree`, `Hide System Libraries`, and `Flatten Recursion`. This section will explain these options as well as the other options we did not select, and why we chose those options.
     91
     92=== Separate by Thread ===
     93For multi-threaded applications, or for applications that call a multi-threaded library, if turn this setting on, we will get to see what is executed under each thread during run time. This is left on by default, and is extremely useful for profiling multi-threaded applications or tests that might call multi-threaded functions.
     94
     95=== Invert Call Tree ===
     96This is probably the most important option you can enable if you want to find the most time-consuming functions. Within the call tree there is a `running time` column and a `self time` column. The running time displays a total running time for that function, including other functions that are called from that specific function. The self time will show you how much time is actually spent inside the function, excluding other function calls.
     97
     98For example, if `functionA()` spends 200ms before calling `functionB()`, and `functionB()` takes 400ms, then `functionA()` will have a running time of 600ms while `functionB()` only has a running time of 400ms. This makes it seem like `functionA()` takes the most time, but in reality `functionB()` is actually the slowest function. With invert call tree on we examine leaves of the call tree. This means that functions which do not call other functions are shown first. With this setting on, sorting by run time actually displays the correct run time and therefore gives us a better idea of what we can optimize.
     99
     100=== Hide System Libraries ===
     101
     102This setting cleans up our call tree view by hiding away functions we don't have to worry about.
     103
     104=== Flatten Recursion ===
     105
     106Instead of creating a separate symbol for each level of recursion, only a single function name and symbol is generated for the entire recursive call. This allows us to see what the total time is in a recursive function instead of seeing a partial amount of time for each level of recursion.
     107
     108=== Top Functions ===