paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Revisiting Partial Tracing for Safe, Efficient, and Concurrent Garbage Collection in Unmanaged Languages

重新审视部分追踪:非托管语言中安全、高效且并发的垃圾回收
PLDI 10(PLDI)2026匹配度 1/10 · 该论文研究非托管语言中的并发垃圾回收与内存回收运行时机制,属于程序语言与运行时系统方向,但完全不涉及静态分析、LLM/Agent、浮点程序分析或贝叶斯程序分析等用户核心研究方向。引用 0 inbox
Jeonghyeon Kim, Jongse Park, Youngjin Kwon, Jeehoon Kang
crossref: 2026-09-10

AI 速览

一句话:提出并发部分追踪 GC 库,用阶段共识与 hazard pointer 实现非托管语言安全、高效、易集成的并发回收。

非托管语言(C/C++、Rust)并发内存回收难以兼顾效率、安全与易集成:BDWGC 等追踪收集器有停顿与不安全保守扫描,CIRC 等引用计数安全但开销高且需手动处理环。本文重新审视部分追踪 PT:根用引用计数精确识别,从非零计数对象追踪以回收循环垃圾。为克服根变更昂贵,作者提出并发部分追踪 CPT,用阶段共识在不停顿 mutator 下协调并发阶段并消除遍历中多数引用计数更新;进而提出 CDPT,用受阶段屏障保护的 hazard pointer 替代原子根更新。并发数据结构微基准与 Moka 缓存库宏观基准显示,CDPT 优于 BDWGC/CIRC,并与 RCU 等手动方案相当。

问题
非托管语言中缺乏编译器/运行时支持,并发内存回收难以同时实现效率、安全和易集成;现有追踪收集器有停顿与不安全扫描,引用计数方案开销高且需手动处理环。
方法
重新审视部分追踪(PT),提出并发部分追踪(CPT)与并发延迟部分追踪(CDPT):CPT 用阶段共识协调并发阶段并减少引用计数更新,CDPT 用受阶段屏障保护的 hazard pointer 替代原子根更新。
评估
在并发数据结构微基准和 Moka 生产缓存库宏观基准上评估,CDPT 优于 BDWGC 与 CIRC 等自动收集器,并与 RCU 等手动方案性能相当。
原文摘要(Abstract)

Garbage collection (GC) remains a desirable yet elusive goal in unmanaged languages like C/C++ and Rust, where concurrent memory reclamation must be achieved without compiler or runtime support. Existing techniques face fundamental trade-offs among efficiency , safety , and ease of integration : tracing collectors like BDWGC incur costly stop-the-world pauses and unsafe conservative scanning, while reference counting schemes like CIRC are safe but introduce high overhead and require manual handling of cyclic data. We present a safe, efficient, and easy-to-integrate concurrent GC library, revisiting partial tracing (PT), a concept initially conceived by Bacon et al. 22 years ago. PT is a hybrid approach that maintains reference counts for roots, ensuring safety through precise root identification, and traces from objects with non-zero counts, offering ease of integration by handling cyclic garbage. Although PT has historically been considered inefficient due to the high cost of root mutation, we overcome this limitation in two design steps. First, Concurrent Partial Tracing (CPT) introduces phase consensus , enabling concurrent phase coordination without mutator suspension and eliminating most reference-count updates during traversal. Second, Concurrent Deferred Partial Tracing (CDPT) further reduces overhead by replacing atomic root updates with a lightweight, hazard pointer (HP)-based mechanism safeguarded by a phase barrier . We show that CDPT outperforms automatic collectors like BDWGC and CIRC while being comparable to manual schemes like RCU, through both micro-benchmarks on concurrent data structures and a macro-benchmark on Moka, a production cache library.

链接与引用

DOI 原文 · PDF(开放获取) · DBLP

BibTeX
@article{KimPKK26,
  title = {Revisiting Partial Tracing for Safe, Efficient, and Concurrent Garbage Collection in Unmanaged Languages},
  author = {Jeonghyeon Kim and Jongse Park and Youngjin Kwon and Jeehoon Kang},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {10},
  number = {PLDI},
  year = {2026},
  doi = {10.1145/3808310}
}