Вопрос

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.

Это было полезно?

Решение

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top