* instrument启动优化关键函数
1. + load函数: load_images
2. dispatch_async: _dispatch_call_block_and_release/_dispatch_client_callout
3. 全局C++函数初始化: dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const
4. didFinishLaunchingWithOptions
dispatch_async
代码:
dispatch_async(dispatch_get_main_queue(), ^{
CHECK_SELF_AND_RETURN();
[self.recSoundEffectsDelegate onSelectRecSoundEffects:selectedSoundEffect];
});
堆栈
#2 0x00000001161c5900 in __34-[WSRecSoundEffectsVC viewDidLoad]_block_invoke
#3 0x000000019b8c4370 in _dispatch_call_block_and_release ()
#4 0x000000019b8c60d0 in _dispatch_client_callout ()
#5 0x000000019b8d49e0 in _dispatch_main_queue_drain ()
#6 0x000000019b8d45fc in _dispatch_main_queue_callback_4CF ()
#7 0x0000000193bc4204 in __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ ()
#8 0x0000000193bc1440 in __CFRunLoopRun ()
#9 0x0000000193bc0830 in CFRunLoopRunSpecific ()
#10 0x00000001dfba01c4 in GSEventRunModal ()
#11 0x0000000196726eb0 in -[UIApplication _run] ()
#12 0x00000001967d55b4 in UIApplicationMain ()