简体   繁体   English

如何在xcode中运行我的应用程序中获得最常调用函数的有序列表?

[英]How can I get an ordered list of the most called functions in a run of my application in xcode?

How can I get an ordered (number of calls) list of the most called functions in a run of my application? 如何在我的应用程序运行中获得最常调用函数的有序(调用次数)列表?

eg: 例如:

1. <NSObject:0x000000:init> 1. <NSObject:0x000000:init>

2. <MyObject:0x000000:setPosition> 2. <MyObject:0x000000:setPosition>

etc 等等

Is this possible using build in xCode tools? 使用xCode工具构建是否可以实现?

If not, is it possible to override objc_msgSend and implement this functionality? 如果没有,是否可以覆盖objc_msgSend并实现此功能?

I am aware of the possible overhead of this however it would only be used in testing. 我知道这可能带来的开销,但它只会用于测试。

Thank You, 谢谢,

Nonono 不不不

Use Instruments, particularly the Time Profiler instrument: 使用仪器,尤其是Time Profiler仪器:

(You can see more fields like Total Samples instead of just time-based fields, if you right-click on the table header.) (如果右键单击表标题,则可以看到更多字段,如“总样本”而不是基于时间的字段。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM