冗余负载:软件效率低下的指标
Redundant Loads: A Software Inefficiency Indicator
摘要:
现代软件包已经变得越来越复杂,具有数百万行代码和对许多外部库的引用。冗余操作是这些代码库中常见的性能限制因素。错过编译器优化机会、不恰当的数据结构和算法选择以及开发人员对性能的不关注是冗余操作存在的一些常见原因。开发人员主要依靠编译器来消除冗余操作。然而,编译器的静态分析经常由于模糊性和有限的分析范围而错过优化机会;对算法和数据结构问题的自动优化超出了范围。我们开发LoadSpy,一个完整的程序分析器,以查明冗余的内存加载操作,这往往是许多冗余操作的症状。LoadSpy的优势在于识别和量化程序中的冗余加载操作,并将冗余与程序执行上下文和范围相关联,以将开发人员的注意力集中在有问题的代码上。LoadSpy工作在完全优化的二进制文件上,采用各种优化技术来减少其开销,并提供丰富的图形用户界面,这使它成为一个完整的开发工具。应用LoadSpy表明,尽管自动编译器优化水平最高,但现代软件包中很大一部分冗余负载是常见的。在LoadSpy的指导下,我们优化了几个著名的基准测试和现实世界的应用程序,产生了显着的加速。
英文摘要:
Modern software packages have become increasingly complex with millions of lines of code and references to many external libraries. Redundant operations are a common performance limiter in these code bases. Missed compiler optimization opportunities, inappropriate data structure and algorithm choices, and developers' inattention to performance are some common reasons for the existence of redundant operations. Developers mainly depend on compilers to eliminate redundant operations. However, compilers' static analysis often misses optimization opportunities due to ambiguities and limited analysis scope; automatic optimizations to algorithmic and data structural problems are out of scope. We develop LoadSpy, a whole-program profiler to pinpoint redundant memory load operations, which are often a symptom of many redundant operations. The strength of LoadSpy exists in identifying and quantifying redundant load operations in programs and associating the redundancies with program execution contexts and scopes to focus developers' attention on problematic code. LoadSpy works on fully optimized binaries, adopts various optimization techniques to reduce its overhead, and provides a rich graphic user interface, which make it a complete developer tool. Applying LoadSpy showed that a large fraction of redundant loads is common in modern software packages despite highest levels of automatic compiler optimizations. Guided by LoadSpy, we optimize several well-known benchmarks and real-world applications, yielding significant speedups.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。