The CSI Framework for Compiler-Inserted Program Instrumentation

The CSI Framework for Compiler-Inserted Program Instrumentation
复制标题

用于编译器插入程序检测的 CSI 框架

DOI:
10.1145/3154502
复制
发表时间:
2017
期刊:
Proceedings of the ACM on Measurement and Analysis of Computing Systems
影响因子:
--
通讯作者:
Leiserson, Charles E.
Leiserson, Charles E.
中科院分区:
--
文献类型:
--
作者:
Schardl, Tao B.;Denniston, Tyler;Doucet, Damon;Kuszmaul, Bradley C.;Lee, I-Ting Angelina;Leiserson, Charles E.

文献摘要

参考文献

被引文献

相似文献

CSI框架提供了全面的静态检测工具,编译器可以将其插入到被测程序中,以便动态分析工具——内存检查器、竞争检测器、缓存模拟器、性能分析器、代码覆盖率分析器等——可以观察和调查运行时行为。到目前为止,基于编译器插装的工具将分别修改编译器以插入它们自己的插装。相反,CSI在被测程序中插入一个标准的检测挂钩集合。每个csi工具都是作为定义相关钩子的库实现的,其余的钩子在编译时或链接时优化期间被“空化”和省略,从而导致仪表化的运行时与自定义仪表化相当。CSI允许将许多基于编译器的工具编写为简单的库,而无需修改编译器,从而降低了开发动态分析工具的门槛。我们为CSI定义了一个标准API,并修改了LLVM,以便将CSI钩子插入到程序的编译器内部表示(IR)中。API将IR对象(如函数、基本块和内存访问)组织到扁平和紧凑的ID空间中,这不仅简化了工具的构建,而且比传统的哈希表更快地维护IR对象数据。CSI钩子包含一个“属性”参数,该参数允许工具基于静态信息定制行为,而不会引入开销。CSI提供了“取证”表,工具可以使用这些表将IR对象与源代码位置关联起来,并将IR对象彼此关联起来。为了评估CSI的疗效,我们实施了六个示范CSI工具。我们的一项研究表明,使用CSI进行编译并链接到“null”CSI工具会产生一个工具检测的可执行文件,其速度与原始的未检测代码一样快。另一项使用谷歌的ThreadSanitizer的CSI端口的研究表明,CSI工具的性能可以与谷歌的定制的基于编译器的实现相媲美。所有其他演示CSI工具将被测程序的执行速度降低不到70%。
The CSI framework provides comprehensive static instrumentation that a compiler can insert into a program-under-test so that dynamic-analysis tools - memory checkers, race detectors, cache simulators, performance profilers, code-coverage analyzers, etc. - can observe and investigate runtime behavior. Heretofore, tools based on compiler instrumentation would each separately modify the compiler to insert their own instrumentation. In contrast, CSI inserts a standard collection of instrumentation hooks into the program-under-test. Each CSI-tool is implemented as a library that defines relevant hooks, and the remaining hooks are "nulled" out and elided during either compile-time or link-time optimization, resulting in instrumented runtimes on par with custom instrumentation. CSI allows many compiler-based tools to be written as simple libraries without modifying the compiler, lowering the bar for the development of dynamic-analysis tools.We have defined a standard API for CSI and modified LLVM to insert CSI hooks into the compiler's internal representation (IR) of the program. The API organizes IR objects - such as functions, basic blocks, and memory accesses - into flat and compact ID spaces, which not only simplifies the building of tools, but surprisingly enables faster maintenance of IR-object data than do traditional hash tables. CSI hooks contain a "property" parameter that allows tools to customize behavior based on static information without introducing overhead. CSI provides "forensic" tables that tools can use to associate IR objects with source-code locations and to relate IR objects to each other.To evaluate the efficacy of CSI, we implemented six demonstration CSI-tools. One of our studies shows that compiling with CSI and linking with the "null" CSI-tool produces a tool-instrumented executable that is as fast as the original uninstrumented code. Another study, using a CSI port of Google's ThreadSanitizer, shows that the CSI-tool rivals the performance of Google's custom compiler-based implementation. All other demonstration CSI tools slow down the execution of the program-under-test by less than 70%.
有效检测使用Reducer超对象的Cilk程序中的竞争
DOI: --
发表时间: 2015
期刊: ACM Symposium on Parallelism in Algorithms and Architectures
影响因子: --
作者:
I. Lee;T. Schardl
通讯作者: T. Schardl
Cilkprof 可扩展性分析器
DOI: --
发表时间: 2015
期刊: ACM Symposium on Parallelism in Algorithms and Architectures
影响因子: --
作者:
T. Schardl;Bradley C. Kuszmaul;I. Lee;W. Leiserson;C. Leiserson
通讯作者: C. Leiserson
使用 C 的并行科学应用程序的便携式分析和跟踪
DOI: --
发表时间: 1998
期刊: Symposium on Parallel and Distributed Tools
影响因子: --
作者:
S. Shende;A. Malony;J. Cuny;P. Beckman;S. Karmesin;K. Lindlan
通讯作者: K. Lindlan
ThinLTO:可扩展和增量 LTO
DOI: --
发表时间: 2017
期刊: IEEE/ACM International Symposium on Code Generation and Optimization
影响因子: --
作者:
Teresa L. Johnson;M. Amini;D. Li
通讯作者: D. Li
Kismet:串行程序的并行加速估计
DOI: --
发表时间: 2011
期刊: Conference on Object-Oriented Programming Systems, Languages, and Applications
影响因子: --
作者:
Donghwan Jeon;Saturnino Garcia;Christopher M. Louie;M. Taylor
通讯作者: M. Taylor