一句话:提出免插桩的轻量采样框架 Witch,利用 PMU 与调试寄存器检测软件低效。
复杂分层软件中普遍存在低效问题,许多表现为浪费的内存操作。现有工具通常插桩每条 load/store 来监控内存,导致严重减速和巨大内存开销。Witch 不进行插桩,而是利用性能监控单元(PMU)和调试寄存器,对同一内存位置的连续访问进行采样。基于 Witch 构建的工具能以可忽略的减速和内存消耗,达到与穷举插桩工具相当的准确性。作者借此将分析扩展到大量代码库,并在重要代码库中发现若干性能问题,修复后获得显著加速。
Inefficiencies abound in complex, layered software. A variety of inefficiencies show up as wasteful memory operations. Many existing tools instrument every load and store instruction to monitor memory, which significantly slows execution and consumes enormously extra memory. Our lightweight framework, Witch, samples consecutive accesses to the same memory location by exploiting two ubiquitous hardware features: the performance monitoring units (PMU) and debug registers. Witch performs no instrumentation. Hence, witchcraft---tools built atop Witch---can detect a variety of software inefficiencies while introducing negligible slowdown and insignificant memory consumption and yet maintaining accuracy comparable to exhaustive instrumentation tools. Witch allowed us to scale our analysis to a large number of code bases. Guided by witchcraft, we detected several performance problems in important code bases; eliminating these inefficiencies resulted in significant speedups.
DOI 原文 ·
@inproceedings{paperbot4280,
title = {Watching for Software Inefficiencies with Witch},
author = {Shasha Wen and Xu Liu and John Byrne and Milind Chabbi},
booktitle = {ASPLOS},
year = {2018},
doi = {10.1145/3173162.3177159}
}