View Code? Open in Web Editor
NEW
The easiest way to generate order files for Mach-O using Clang. Improving App Performance.
Home Page: http://yulingtianxia.com/blog/2019/09/01/App-Order-Files/
License: MIT License
Ruby 10.00%
Objective-C 86.09%
C 1.11%
Swift 2.80%
apporderfiles's Introduction
- 🔭 I’m currently working on DartNative
- 🌱 I’m currently learning iOS
- 🎮 I'm currently playing Wiedźmin 3: Dziki Gon
- 📫 How to reach me: [email protected]
apporderfiles's People
Contributors
apporderfiles's Issues
我们项目的工程是cocoapod管理, 除了main文件在主工程, 其他文件都分部在pods里, 我把工程配置好后运行, 发现输出的order file文件里只有_main, 这个的原因是什么, 怎么解决呢
是否只有在 Build phase->Compile Sources里的文件才能检测到
测试数据(重排)
- EnterMain()—>1623.5341796875 coldLanuchFinished-->3591.0869140625
- EnterMain()—>1671.537841796875 coldLanuchFinished-->4203.284912109375
- EnterMain()—>1463.7109375 coldLanuchFinished-->3916.2109375
- EnterMain()—>1535.093994140625 coldLanuchFinished-->4235.630126953125
- EnterMain()—>1654.43505859375 coldLanuchFinished-->4197.576904296875
- EnterMain()—>1413.18115234375 coldLanuchFinished-->4113.499267578125
测试数据(非重排)
- EnterMain()—>1381.821044921875 coldLanuchFinished-->4133.60986328125
- EnterMain()—>1563.06591796875 coldLanuchFinished-->4042.641845703125
- EnterMain()—>1490.971923828125 coldLanuchFinished-->4021.407958984375
- EnterMain()—>1689.35498046875 coldLanuchFinished-->3937.9599609375
- EnterMain()—>1594.353271484375 coldLanuchFinished-->3975.540283203125
用模拟器跑了几次数据,发现差距并不明显
在设置-sanitize-coverage=func -sanitize=undefined后,编译时,当Swift组件中import OC moudle时 会报 “No such module 'xxx'”
是否可以 !*guard && collectBegan 干掉
这个只能获取到Main方法与Appdelegate里面的相关方法,ViewController以及其他类的调用方法都没有获取到。是我打开方式不对吗,比如在Demo里面的RootVC里面的ViewDidLoad添加一个新方法调用,就没有捕捉到。
0 0x1049eb198 __assert_rtn + 127
1 0x1049f4f04 ld::passes::order::Layout::buildFollowOnTables() (.cold.5) + 0
2 0x1049c1de7 ld::passes::order::Layout::buildFollowOnTables() + 2209
3 0x1049c27c5 ld::passes::order::Layout::doPass() + 23
4 0x1049c28cd ld::passes::order::doPass(Options const&, ld::Internal&) + 151
5 0x1048ce113 main + 1001
6 0x7fff71a432e5 start + 1
ld: Assertion failed: (_followOnNexts.count(atom) == 0), function buildFollowOnTables, file /Library/Caches/com.apple.xbs/Sources/ld64/ld64-520/src/ld/passes/order.cpp, line 411.
clang: error: linker command failed with exit code 1 (use -v to see invocation)
build setting配置是clang的参数,如果pod引入的就是framework,并不是源码的pod,这类的framework的库是否生效?
用System Trace 查看File Backed Page In次数?