Search code examples
xcodeperformancexcode-instruments

How to See Line Numbers in Instruments Performance Profiles


I may just be using this program wrong, but I've been having a lot of difficulty using the C++ profiler on MacOS. There are two major issues:

  1. I'd preferably like to see line-by-line annotations of where time is spent not just per-function. I haven't figured out how to do this.
  2. When I look at the per-function annotations, the function annotation is so large it pushes the function name off the screen, and Instruments doesn't seem to want to let me scroll to the right. See photo.

enter image description here

I'm sure I'm using this wrong. Would anyone be able to help me out?

Thanks so much!


Solution

  • I'd preferably like to see line-by-line annotations of where time is spent not just per-function. I haven't figured out how to do this.

    Double-clicking a function in the call tree view opens the source view, which shows line-by-line statistics.

    The following articles should help you interpret the data Instruments generates: