nanoBench:在x86系统上运行微基准测试的低开销工具
nanoBench: A Low-Overhead Tool for Running Microbenchmarks on x86 Systems
摘要:
我们提出了nanoBench,一个工具,用于评估小型microbenchmarks使用英特尔和AMD x86系统上的硬件性能计数器。大多数现有的工具和库都旨在对整个程序进行基准测试,或者在更大的程序中执行程序段的上下文中进行基准测试。相比之下,nanoBench专门设计用于评估小的、孤立的代码片段。这种代码在基于微基准的硬件分析技术中很常见。与以前的工具不同,nanoBench可以直接在内核空间执行微基准测试。这允许对特权指令进行基准测试,并实现更精确的测量。性能计数器的读取以最小的开销实现,避免了函数调用和分支。因此,nanoBench足够精确,可以测量单个内存访问。我们说明了实用的nanoBench在两个案例研究的手。首先,我们简要讨论如何使用nanoBench来确定最近x86处理器上超过13,000个指令变体的延迟、吞吐量和端口使用情况。其次,我们将展示如何生成微基准,以精确地表征11个英特尔酷睿微架构的缓存架构。这包括迄今为止对所采用的缓存替换策略进行的最全面的分析。
英文摘要:
We present nanoBench, a tool for evaluating small microbenchmarks using hardware performance counters on Intel and AMD x86 systems. Most existing tools and libraries are intended to either benchmark entire programs, or program segments in the context of their execution within a larger program. In contrast, nanoBench is specifically designed to evaluate small, isolated pieces of code. Such code is common in microbenchmark-based hardware analysis techniques. Unlike previous tools, nanoBench can execute microbenchmarks directly in kernel space. This allows to benchmark privileged instructions, and it enables more accurate measurements. The reading of the performance counters is implemented with minimal overhead avoiding functions calls and branches. As a consequence, nanoBench is precise enough to measure individual memory accesses. We illustrate the utility of nanoBench at the hand of two case studies. First, we briefly discuss how nanoBench has been used to determine the latency, throughput, and port usage of more than 13,000 instruction variants on recent x86 processors. Second, we show how to generate microbenchmarks to precisely characterize the cache architectures of eleven Intel Core microarchitectures. This includes the most comprehensive analysis of the employed cache replacement policies to date.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。