一句话:提出动态分析描述语言 ALDA 及优化编译器 ALDAcc,可生成与手工调优性能相当的分析实现。
动态程序分析对构建安全可靠的计算环境至关重要,但其实现通常需要大量底层优化才能达到可接受性能,导致许多分析难以落地或实现低效。本文提出面向动态分析的高层描述语言 ALDA:它利用动态分析的常见结构化模式,并将支持行为限制为分析所需的基本操作,从而使优化编译器能够生成高效实现。作者实现了面向 LLVM 插桩框架的优化编译器 ALDAcc,并用它构建了 8 种动态分析算法,包括 MemorySanitizer。实验将 Eraser 和 MemorySanitizer 的 ALDA 实现与手工调优版本对比,表明 ALDAcc 优化后的分析性能与手工实现相当,且构建过程简洁。
Dynamic program analyses are essential to creating safe, reliable, and productive computing environments. However, these analyses are challenging and time-consuming to construct due to the low-level optimization required to achieve acceptable performance. Consequently, many analyses are often never realized, or have inefficient implementations. In this work we argue that many analyses can and should be constructed with a high-level description language, leaving the burden of low-level optimizations to the analysis instrumentation system itself. We propose a novel language for dynamic analysis called ALDA. ALDA leverages common structuring of dynamic analyses to provide a simple and high-level description for dynamic analyses. Through restricting the supported behaviors to only essential operations in dynamic analyses, an optimizing compiler for ALDA can create analysis implementations with performance on-par to hand-tuned analyses. To demonstrate ALDA’s universality and efficiency, we create an optimizing compiler for ALDA targeting the LLVM instrumentation framework named ALDAcc. We use ALDAcc to construct 8 different dynamic analysis algorithms, including the popular MemorySanitizer analysis, and show their construction is succinct and simple. By comparing two of them (Eraser and MemorySanitizer) with their hand-tuned implementations, we show that ALDAcc’s optimized analyses are comparable to hand-tuned implementations.