arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.06551cs.SE
收藏

理解并发现JIT编译器性能缺陷

Understanding and Finding JIT Compiler Performance Bugs

The University of Texas at Austin(德克萨斯大学奥斯汀分校)

Zijian Yi, Cheng Ding, August Shi, Milos Gligoric

AI总结:

本文提出了一种轻量级技术,用于自动检测JIT编译器性能错误,并通过Jittery工具发现了12个新错误。

摘要:

Just-in-time(JIT)编译器是许多流行编程语言(如Java和JavaScript)管理运行时的关键组件。JIT编译器根据动态剖析数据在运行时执行优化并生成原生代码,以提高正在运行的应用程序的执行性能。像其他软件系统一样,JIT编译器可能会有软件错误,先前的工作已经开发出一系列自动检测功能错误(即生成的原生代码在语义上不匹配原始代码)的技术。然而,此前没有工作针对JIT编译器性能错误,这些错误在应用程序运行时可能导致显著的性能下降。这些性能错误难以检测,因为JIT编译器的复杂性和动态性。在本文中,我们首次提出了揭开JIT性能错误的谜团。首先,我们对四个流行的Java和JavaScript JIT编译器进行了实证研究。我们对191个bug报告的手动分析揭示了性能错误的常见触发因素、这些错误的表现模式及其根本原因。第二,基于这些见解,我们提出了分层的差异性能测试,这是一种轻量级技术,用于自动检测JIT编译器性能错误,并在名为Jittery的工具中实现了它。我们向Jittery加入了实用的优化,例如测试优先级,这可以将测试时间减少92.40%,而不会影响错误检测能力,以及自动过滤假阳性和重复项,这大大减少了手动检查的努力。使用Jittery,我们发现了Oracle HotSpot和Graal JIT编译器中的12个以前未知的性能错误,其中11个已被确认,6个已由开发者修复。

英文摘要:

Just-in-time (JIT) compilers are key components for many popular programming languages with managed runtimes (e.g., Java and JavaScript). JIT compilers perform optimizations and generate native code at runtime based on dynamic profiling data, to improve the execution performance of the running application. Like other software systems, JIT compilers might have software bugs, and prior work has developed a number of automated techniques for detecting functional bugs (i.e., generated native code does not semantically match that of the original code). However, no prior work has targeted JIT compiler performance bugs, which can cause significant performance degradation while an application is running. These performance bugs are challenging to detect due to the complexity and dynamic nature of JIT compilers. In this paper, we present the first work on demystifying JIT performance bugs. First, we perform an empirical study across four popular JIT compilers for Java and JavaScript. Our manual analysis of 191 bug reports uncovers common triggers of performance bugs, patterns in which these bugs manifest, and their root causes. Second, informed by these insights, we propose layered differential performance testing, a lightweight technique to automatically detect JIT compiler performance bugs, and implement it in a tool called Jittery. We incorporate practical optimizations into Jittery such as test prioritization, which reduces testing time by 92.40% without compromising bug-detection capability, and automatic filtering of false-positives and duplicates, which substantially reduces manual inspection effort. Using Jittery, we discovered 12 previously unknown performance bugs in the Oracle HotSpot and Graal JIT compilers, with 11 confirmed and 6 fixed by developers.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑