xcode Shark 用于分析 iPhone 应用程序

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/834135/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 18:33:41  来源:igfitidea点击:

Shark for profiling iPhone app

iphonexcodeshark

提问by Manish

I am using Shark to profile my application on iphone. As per instruction in Shark user guide from http://developer.apple.com/iphone/library/documentation/DeveloperTools/Conceptual/SharkUserGuide/SelectingExecutiontoSampleorTrace/SelectingExecutiontoSampleorTrace.html#//apple_ref/doc/uid/TP40005233-CH13-SW19

我正在使用 Shark 在 iphone 上分析我的应用程序。根据来自http://developer.apple.com/iphone/library/documentation/DeveloperTools/Conceptual/SharkUserGuide/SelectingExecutiontoSampleorTrace/SelectingExecutiontoSampleorTrace.html#//apple_ref/doc/uid/TP40005233-CH13-SW19 的Shark 用户指南中的说明

I am able to generate profile for my application. But most of functions in my application appear as unknown under symbol header. This is because I am using release version of application. The user guide suggest that symbol information can be generated by using symbolification information and symbol rich binary of application. So first I generated debug version of application retaining the debug information then generated release version and used shark to profile and then used FILE/symbolicate option and selected the debug version of application from Debug-iphoneOs. I get error symbolification failed. Can anyone suggest a method to eliminate this error?

我能够为我的应用程序生成配置文件。但是我的应用程序中的大多数函数在符号标题下显示为未知。这是因为我正在使用应用程序的发布版本。用户指南建议可以使用符号化信息和符号丰富的应用程序二进制生成符号信息。所以首先我生成了保留调试信息的应用程序的调试版本,然后生成了发布版本并使用shark进行分析,然后使用FILE/symbolicate选项并从Debug-iphoneOs中选择了应用程序的调试版本。我得到错误符号化失败。任何人都可以提出一种消除此错误的方法吗?

回答by cduhn

If you want to profile your iPhone app with symbols using File->Symbolicate, I believe you need to profile the debug version on your iPhone, not the release version. At least that's how I've gotten it to work in the past. That way when you symbolicate using the build in Debug-iphoneos, you're referencing the same image.

如果您想使用 File->Symbolicate 使用符号来配置您的 iPhone 应用程序,我相信您需要在您的 iPhone 上配置调试版本,而不是发布版本。至少这就是我过去让它工作的方式。这样,当您使用 Debug-iphoneos 中的构建进行符号化时,您将引用相同的图像。