Skip to content

Commit 37eca1b

Browse files
committed
fix #5225
1 parent 69179c0 commit 37eca1b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Reports/2025/#360-2025.12.15.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@
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)

0 commit comments

Comments
 (0)