首页> 外文期刊>Performance evaluation review >The CSI Framework for Compiler-Inserted Program Instrumentation
【24h】

The CSI Framework for Compiler-Inserted Program Instrumentation

机译:编译器插入程序工具的CSI框架

获取原文
获取原文并翻译 | 示例

摘要

The CSI framework [15] 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%.
机译:CSI框架[15]提供了全面的静态工具,编译器可以将其插入被测程序,以便动态分析工具(内存检查器,竞争检测器,缓存模拟器,性能分析器,代码覆盖分析器等)可以使用。观察和调查运行时行为。迄今为止,基于编译器工具的工具将各自单独地修改编译器以插入其自己的工具。相反,CSI将标准的工具挂钩集合插入被测程序。每个CSI工具都实现为库,该库定义了相关的挂钩,其余的挂钩在编译时或链接时优化过程中被“清空”并删除,从而产生了与自定义工具同等的工具化运行时。 CSI允许将许多基于编译器的工具编写为简单的库,而无需修改编译器,从而降低了动态分析工具开发的门槛。我们为CSI定义了一个标准API,并修改了LLVM,以将CSI挂钩插入到程序的编译器内部表示(IR)中。该API将IR对象(例如功能,基本块和内存访问)组织到平面和紧凑的ID空间中,这不仅简化了工具的构建,而且与传统的哈希表相比,令人惊讶地实现了IR对象数据的更快维护。 CSI挂钩包含一个“ property”参数,该参数允许工具基于静态信息自定义行为,而不会造成开销。 CSI提供了“取证”表,工具可使用这些表将IR对象与源代码位置相关联,并使IR对象相互关联。为了评估CSI的有效性,我们实施了六个示范性CSI工具。我们的一项研究表明,使用CSI进行编译并与“ null” CSI工具进行链接会产生与工具无关的可执行文件,该可执行文件的速度与原始未经票据处理的代码一样快。另一项使用Google ThreadSanitizer的CSI端口的研究表明,该CSI工具可与Google基于自定义编译器的实现的性能相媲美。所有其他示范性CSI工具都将被测程序的执行速度降低了不到70%。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号