Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: 修复方法调用链路重复的问题 #30

Merged
merged 1 commit into from
Dec 20, 2023

Conversation

erduoniba
Copy link

@erduoniba erduoniba commented Dec 20, 2023

问题描述: 方法的调用链不能根据 callDepth 来判断,不然所有层级相等的深度,都在一个调用链路中了。
解决方案: 通过 lr 作为方法调用的标识,作为方法调用链更加合理。
测试验证: 新增 +[SMCallTraceDemo test] 测试代码来验证 lr 的合理性。测试数据如下:

     0|  39.11|+[SMCallTraceDemo test1_1]
     1|  13.03|  +[SMCallTraceDemo test1_2]
     1|  14.02|  +[SMCallTraceDemo test1_3]

     0|  69.08|+[SMCallTraceDemo test2_1]
     1|  23.02|  +[SMCallTraceDemo test2_2]
     1|  24.03|  +[SMCallTraceDemo test2_3]

     0|  99.32|+[SMCallTraceDemo test3_1]
     1|  33.13|  +[SMCallTraceDemo test3_2]
     1|  34.14|  +[SMCallTraceDemo test3_3]

     0|  39.29|+[SMCallTraceDemo test1_1]
     1|  13.09|  +[SMCallTraceDemo test1_2]
     1|  14.06|  +[SMCallTraceDemo test1_3]

     0|  68.76|+[SMCallTraceDemo test2_1]
     1|  23.06|  +[SMCallTraceDemo test2_2]
     1|  24.13|  +[SMCallTraceDemo test2_3]

     0|  99.24|+[SMCallTraceDemo test3_1]
     1|  33.09|  +[SMCallTraceDemo test3_2]
     1|  34.07|  +[SMCallTraceDemo test3_3]

问题:方法的调用链不能根据 callDepth 来判断,不然所有层级相等的深度,都在一个调用链路中了。
解决方案:通过 lr 作为方法调用的标识,作为方法调用链更加合理。
新增:方法的测试代码验证 lr 的合理性。
@JW-chenjingwei
Copy link

JW-chenjingwei commented Dec 20, 2023 via email

@ming1016 ming1016 merged commit 33e1eca into ming1016:master Dec 20, 2023
erduoniba pushed a commit to erduoniba/Qi_ObjcMsgHook that referenced this pull request Dec 20, 2023
问题描述:方法的调用链不能根据 callDepth 来判断,不然所有层级相等的深度,都在一个调用链路中了。
解决方案:通过 lr 作为方法调用的标识,作为方法调用链更加合理。
新增:方法的测试代码验证 lr 的合理性。
问题可以参考:ming1016/RSSReader#30

bugfix2:
问题描述:iOS15及以上的系统运行崩溃
解决方案:更新 fishhook 代码解决,详细问题参考 facebook/fishhook#87
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants