论文标题
ANICA:分析微体系代码分析仪中的不一致之处
AnICA: Analyzing Inconsistencies in Microarchitectural Code Analyzers
论文作者
论文摘要
微构造代码分析仪,即估计机器代码基本块的吞吐量的工具,是性能工程师工具带中的重要餐具。 LLVM-MCA,UICA和ITHEMAL等最新工具使用各种技术和不同的模型来进行吞吐量预测。进行测试时,通常会看到这些最先进的工具给出截然不同的结果。这些不一致要么是错误,要么指出工具设计人员做出的不同且很少有记录的假设。 在本文中,我们介绍了Anica,这是一种从差分测试和抽象解释中汲取灵感的工具,以系统地分析这些代码分析仪之间的不一致。我们的评估表明,Anica可以在几十个描述中总结数千个不一致之处,这直接导致对工具不同行为的高级见解。在一些案例研究中,我们进一步证明了Anica在LLVM-MCA中如何自动找到和表征已知和未知的错误,以及AMD Zen的微体系结构中的怪癖。
Microarchitectural code analyzers, i.e., tools that estimate the throughput of machine code basic blocks, are important utensils in the tool belt of performance engineers. Recent tools like llvm-mca, uiCA, and Ithemal use a variety of techniques and different models for their throughput predictions. When put to the test, it is common to see these state-of-the-art tools give very different results. These inconsistencies are either errors, or they point to different and rarely documented assumptions made by the tool designers. In this paper, we present AnICA, a tool taking inspiration from differential testing and abstract interpretation to systematically analyze inconsistencies among these code analyzers. Our evaluation shows that AnICA can summarize thousands of inconsistencies in a few dozen descriptions that directly lead to high-level insights into the different behavior of the tools. In several case studies, we further demonstrate how AnICA automatically finds and characterizes known and unknown bugs in llvm-mca, as well as a quirk in AMD's Zen microarchitectures.