File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 3939
4040[ @AidenRao ] ( https://weibo.com/AidenRao ) :本文探讨了在 SwiftUI 中正确初始化和管理 ` @Observable ` 对象的几种模式。作者通过清晰的代码示例,层层递进地讲解了使用 ` @State ` 的必要性、如何通过 ` .task ` 修饰符避免不必要的初始化开销,以及如何利用 ` environment ` 实现跨场景的状态共享。如果你对 ` @Observable ` 的生命周期管理还有疑惑,这篇文章会给你清晰的答案。
4141
42+ ### 🐕 [ Demystifying the profraw format] ( https://leodido.dev/demystifying-profraw/ )
43+
44+ [ @david-clang ] ( https://github.com/david-clang ) :本文深入剖析了 LLVM 用于代码覆盖率分析的 ` .profraw ` 二进制文件格式及其生成机制。其核心原理分为编译时插桩与运行时记录两步:
45+
46+ 1 . 编译时,Clang 的 ` -fprofile-instr-generate ` 选项会在程序中插入计数器 (` __profc_* ` ) 和元数据 (` __profd_* ` ) 到特定的 ELF 节中,并在关键执行点插入 Load/Add/Store 指令进行实时计量。
47+ 2 . 运行时,LLVM 运行时库通过 ` atexit() ` 钩子,在程序终止时自动将内存中这些节的最终数据序列化到 ` .profraw ` 文件中。该文件依次包含 Header、Data 段(元数据)、Counters 段(执行次数)和 Names 段,完整记录了代码执行轨迹。
48+
4249## 工具
4350
4451### 🐕 [ https://github.com/CodeEditApp/CodeEdit ] ( https://github.com/CodeEditApp/CodeEdit )
You can’t perform that action at this time.
0 commit comments