2

I'm currently using Xcode's Time Profiler Instrument for iOS. One function is extremely large. Yes, splitting it up into much smaller inline ones would be far more intelligent. However, is there a way to fake stack levels or get the instrument to deal with such a large function to make it easier to determine what's actually the slow portion?

In AMD Code Analyst and Intel VTune, you're able to see graphs of the function so you can pin-point different areas of slow down. I'm basically wondering if there's an equivalent for the Xcode for an iOS device.

Mike Weir
  • 3,094
  • 1
  • 30
  • 46
  • 1
    Instruments should already be showing you which lines of your code are consuming the most time. Have you built with debug symbols (DWARF with dSYM)? – Ken Thomases May 12 '12 at 05:31
  • @KenThomases : Yes. It's giving me full stack information. Though I just discovered that you can double click a function, I'm having trouble following it. – Mike Weir May 12 '12 at 05:35

1 Answers1

0

If you have a large function in the Instruments time profiler, you should be able to double click that line (or click the little arrow that shows up to the right) and it will take you directly to the code (in Instruments).

timeProfilerImg

From there, any specific line that uses lots of CPU time will be highlighted with the specific percentage. In the upper right corner of the code view there will be a small xCode icon that you can click to open that specific area of code in xCode.

teradyl
  • 2,584
  • 1
  • 25
  • 34