Reputation: 3192
Is there an Instrument in Xcode Instruments that records ALL the calls made by my code (with or without Apple's own frameworks).
The closest instrument that seems to do that is Time Profiler.
However, Time Profiler does NOT record ALL calls made among your own code. All Time Profiler does is take a snapshot of the stack at given intervals.
I'm guessing some of you may suggest changing the "sampling interval" on Time Profiler, and perhaps that MIGHT work, but isn't there an instrument that records ALL calls in your code. This seems like it would be broadly quite useful, which is making it hard to believe there isn't such an instrument.
I've tried making my own DTrace instrument, but no matter what I do I get the message saying that said instrument isn't runnable in any configuration.
Another option, which also doesn't work, is to pause the debugger, and at the LLDB prompt, set breakpoints on the code I'm interested in, and add commands to those breakpoints so that when they're hit, they spit out the frame info, essentially telling me the order of the calls.
Unfortunately, that functionality ceased working a few versions of Xcode ago. I have a 50 point bounty explaining that issue here...
lldb breakpoint commands not working in XCode 8
Upvotes: 0
Views: 457
Reputation: 476
This answer doesn't guarantee "ALL calls" will be captured, but using deferred mode recording should give you more detailed samples.
Deferred mode: Select to defer data analysis until after data collection is complete. This can result in faster and more accurate data collection, as more system resources are directed at the process being recorded.
It's in the Record Options pane but isn't available for all instruments. It definitely helps for Time Profiler though.
Upvotes: 2