一个高度可扩展、混合、跨平台的时序分析框架:通过指令级追踪提供精确的差分吞吐量估计
A Highly Scalable, Hybrid, Cross-Platform Timing Analysis Framework Providing Accurate Differential Throughput Estimation via Instruction-Level Tracing
AI总结:
提出轻量级时序分析框架MCAD,通过QEMU模拟和LLVM指令级分析,为二进制程序提供精确的差分吞吐量估计,将周转时间缩短数个数量级,并在百万级指令的真实应用中实现低于3%的几何平均误差。
摘要:
估计指令级吞吐量对于许多应用至关重要:多媒体、低延迟网络、医疗、汽车、航空电子和工业控制系统都依赖于其软件严格可计算且精确的时序边界。遗憾的是,程序可能运行多久——或者它是否确实会停止——在一般情况下是无法回答的。这就是为什么最先进的吞吐量估计工具通常只关注操作的子集,并做出若干简化假设。正确识别程序中的这些约束集合和感兴趣区域通常需要源代码、专用工具和专门的专家知识。每当修改单条指令时,都必须重复此过程,这在实践中迭代开发时序敏感代码时会产生高昂成本。\n在本文中,我们提出了MCAD,一种新颖且轻量级的时序分析框架,能够识别二进制程序中代码变更在微架构层面上的影响。MCAD通过使用QEMU模拟整个程序执行并将追踪转发给LLVM进行指令级分析,提供精确的差分吞吐量估计。这使得开发者能够使用常见工具快速迭代且开销很低:在MCAD中,识别对变更较不敏感的执行路径(相对于时序关键路径)仅需几分钟。据我们所知,这代表了一种全新的能力,与最先进的工具相比,将差分吞吐量估计的周转时间缩短了几个数量级。我们的详细评估表明,MCAD可扩展至具有数百万条指令的FFmpeg和Clang等真实应用,在x86和ARM机器上与硬件性能计数器的真实时序相比,实现了低于3%的几何平均误差。
英文摘要:
Estimating instruction-level throughput is critical for many applications: multimedia, low-latency networking, medical, automotive, avionic, and industrial control systems all rely on tightly calculable and accurate timing bounds of their software. Unfortunately, how long a program may run - or if it may indeed stop at all - cannot be answered in the general case. This is why state-of-the-art throughput estimation tools usually focus on a subset of operations and make several simplifying assumptions. Correctly identifying these sets of constraints and regions of interest in the program typically requires source code, specialized tools, and dedicated expert knowledge. Whenever a single instruction is modified, this process must be repeated, incurring high costs when iteratively developing timing sensitive code in practice. In this paper, we present MCAD, a novel and lightweight timing analysis framework that can identify the effects of code changes on the microarchitectural level for binary programs. MCAD provides accurate differential throughput estimates by emulating whole program execution using QEMU and forwarding traces to LLVM for instruction-level analysis. This allows developers to iterate quickly, with low overhead, using common tools: identifying execution paths that are less sensitive to changes over timing-critical paths only takes minutes within MCAD. To the best of our knowledge this represents an entirely new capability that reduces turnaround times for differential throughput estimation by several orders of magnitude compared to state-of-the-art tools. Our detailed evaluation shows that MCAD scales to real-world applications like FFmpeg and Clang with millions of instructions, achieving < 3% geo mean error compared to ground truth timings from hardware-performance counters on x86 and ARM machines.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。