The CSI Framework for Compiler-Inserted Program Instrumentation
The CSI Framework for Compiler-Inserted Program Instrumentation
复制标题
用于编译器插入程序检测的 CSI 框架
DOI:
10.1145/3154502
复制
发表时间:
2017
期刊:
影响因子:
--
通讯作者:
Leiserson, Charles E.
中科院分区:
文献类型:
--
作者:
Schardl, Tao B.;Denniston, Tyler;Doucet, Damon;Kuszmaul, Bradley C.;Lee, I-Ting Angelina;Leiserson, Charles E.
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%.
登录
查看更多内容
DOI:
--
发表时间:
2015
期刊:
ACM Symposium on Parallelism in Algorithms and Architectures
影响因子:
--
作者:
I. Lee;T. Schardl
通讯作者:
T. Schardl
DOI:
--
发表时间:
2015
期刊:
ACM Symposium on Parallelism in Algorithms and Architectures
影响因子:
--
作者:
T. Schardl;Bradley C. Kuszmaul;I. Lee;W. Leiserson;C. Leiserson
通讯作者:
C. Leiserson
DOI:
--
发表时间:
1998
期刊:
Symposium on Parallel and Distributed Tools
影响因子:
--
作者:
S. Shende;A. Malony;J. Cuny;P. Beckman;S. Karmesin;K. Lindlan
通讯作者:
K. Lindlan
DOI:
--
发表时间:
2017
期刊:
IEEE/ACM International Symposium on Code Generation and Optimization
影响因子:
--
作者:
Teresa L. Johnson;M. Amini;D. Li
通讯作者:
D. Li
DOI:
--
发表时间:
2011
期刊:
Conference on Object-Oriented Programming Systems, Languages, and Applications
影响因子:
--
作者:
Donghwan Jeon;Saturnino Garcia;Christopher M. Louie;M. Taylor
通讯作者:
M. Taylor