如何从Shark获取有用的数据?
一段时间后,我发现我可以将 Shark 绑定到模拟器中可执行文件的进程。但不在设备上。好吧,无论如何,这里有一些绝对零意义的东西,但看起来很糟糕:
42.2% 42.2% QuartzCore sw_scanline(int, int, int, ogl_poly_vert*, ogl_poly_vert*, ogl_poly_vert*, ogl_poly_vert*, unsigned int, void*)
这是邪恶列表中最上面的条目。鲨鱼在这里想表达什么?我现在如何利用这些信息解决性能问题?知道这意味着什么吗?或者是否有一个隐藏功能可以为我提供更多有用的数据?
After a while I figured out I could bind Shark to the process of my executable in the simulator. Not on the device though. Well, anyways, here is something that makes absolutely zero sense, but looks bad:
42.2% 42.2% QuartzCore sw_scanline(int, int, int, ogl_poly_vert*, ogl_poly_vert*, ogl_poly_vert*, ogl_poly_vert*, unsigned int, void*)
That was the topmost entry in the List of Evil. What does Shark try to say here? And how can I fix a performance problem now, with this information? Any idea what that means? Or is there a hidden feature that will give me more useful data?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这很可能是模拟器的实现细节。可能是执行使 UIKit 绘图显示在窗口中所需的任何操作的部分。
针对设备上运行的应用程序使用采样器仪器。如果该特定功能消耗了设备上同样多的 CPU,Instruments 将显示它。
您在模拟器中只能进行这么多低级优化;例如,任何特定于体系结构或特定于设备的事情都无法完成。这可能是环境特定的差异,因此无需担心。
More likely than not, that is an implementation detail of the Simulator. Probably the bit that does whatever is necessary to make the UIKit drawing show up in a window.
Use the Sampler Instrument against your application running on the device. If that particular function is consuming as much CPU on the device, Instruments will show it.
There is only so much low level optimization you can do in the simulator; anything architecture specific or device specific can't be done, for example. This may be an environment specific difference and, thus, not something to worry about.