一句话:提出 mkcheck2,结合 eBPF 系统调用追踪与增量分析高效验证构建依赖,检测开销最高降低 99.7%。
构建系统的依赖规格错误(包括缺失依赖与冗余依赖)在大型软件项目中占构建错误的 50% 以上。现有检测工具存在两大局限:基于 ptrace 的系统调用追踪运行时开销高,且需要验证构建依赖图中的所有边。本文提出 mkcheck2,将扩展伯克利包过滤器(eBPF)系统调用追踪与增量分析相结合,实现高效的依赖验证。在多个开源项目上的评估表明,相比基于 ptrace 的方法,mkcheck2 在保持检测准确率的同时将依赖错误检测开销最多降低 99.7%;在整个包含 300 个 Make 项目的语料上,增量分析技术将每次提交的平均分析时间从 1267.49 秒降至 23.56 秒,使持续依赖验证在实际开发环境中变得可行。
Build systems are fundamental to modern software development, but maintaining correct dependency specifications remains a significant challenge. Dependency-related errors, including missing and redundant dependencies, account for over 50% of build errors in large-scale software projects. Existing tools for detecting such errors suffer from two major limitations: high runtime overhead due to ptrace-based system call tracing, and the need to verify all edges in the build dependency graph. This paper presents mkcheck2, a novel approach that combines extended Berkeley Packet Filter (eBPF)-based system call tracing with incremental analysis to enable efficient dependency verification. Our evaluation on a diverse set of open-source projects demonstrates that mkcheck2 reduces the overhead of dependency error detection by up to 99.7% compared to existing ptrace-based approaches while maintaining detection accuracy. Across the entire 300-project Make corpus, the incremental analysis technique lowers the mean analysis time per commit from 1267.49 seconds to just 23.56 seconds, making continuous dependency verification practical in real-world development environments.