Pin: Building customized program analysis tools with dynamic instrumentation

Pin: Building customized program analysis tools with dynamic instrumentation
复制标题

DOI:
10.1145/1064978.1065034
复制
发表时间:
2005-06-01
影响因子:
--
通讯作者:
Hazelwood, K
Hazelwood, K
中科院分区:
其他
文献类型:
--
作者:
Luk, CK;Cohn, R;Hazelwood, K

文献摘要

被引文献

相似文献

强大而强大的软件仪器工具对于程序分析任务,例如分析,性能评估和错误检测至关重要。为了满足这种需求,我们开发了一种名为PIN的新仪器系统。我们的目标是提供易于使用,便携式,透明和有效的仪器。仪器工具(称为Pintools)使用PIN的RICH API用C/C ++编写。 PIN遵循原子模型,允许工具作者在指令级别分析应用程序,而无需详细了解基础指令集。 API旨在在可能的情况下独立于建筑,使Pintools源在不同体系结构之间兼容。但是,必要时,Pintool可以访问特定于架构的细节。随着应用程序和Pintool观察应用程序的原始,未录制的行为,带有引脚的仪器大多是透明的。 PIN在运行时使用动态汇编对仪器可执行文件。为了提高效率,PIN使用多种技术,包括插入,寄存器重新分配,LIVISE分析和指导计划来优化仪器。这种完全自动化的方法比类似工具提供的仪器性能要好得多。例如,针对基本块计数,PIN比Valgrind的速度比Valgrind快,比Dynamorio快2倍。为了说明PIN的多功能性,我们描述了日常使用中的两个Pintools来分析生产软件。 PIN可公开用于四个架构的Linux平台:IA32(32位X86),EM64T(64位X86),Itanium(R)和ARM。自2004年7月发布以来的十个月中,从其网站上进行了3000多个下载。
Robust and powerful software instrumentation tools are essential for program analysis tasks such as profiling, performance evaluation, and bug detection. To meet this need, we have developed a new instrumentation system called Pin. Our goals are to provide easy-to-use, portable, transparent, and efficient instrumentation. Instrumentation tools (called Pintools) are written in C/C++ using Pin's rich API. Pin follows the model of ATOM, allowing the tool writer to analyze an application at the instruction level without the need for detailed knowledge of the underlying instruction set. The API is designed to be architecture independent whenever possible, making Pintools source compatible across different architectures. However, a Pintool can access architecture-specific details when necessary. Instrumentation with Pin is mostly transparent as the application and Pintool observe the application's original, uninstrumented behavior. Pin uses dynamic compilation to instrument executables while they are running. For efficiency, Pin uses several techniques, including inlining, register re-allocation, liveness analysis, and instruction scheduling to optimize instrumentation. This fully automated approach delivers significantly better instrumentation performance than similar tools. For example, Pin is 3.3x faster than Valgrind and 2x faster than DynamoRIO for basic-block counting. To illustrate Pin's versatility, we describe two Pintools in daily use to analyze production software. Pin is publicly available for Linux platforms on four architectures: IA32 (32-bit x86), EM64T (64-bit x86), Itanium (R), and ARM. In the ten months since Pin 2 was released in July 2004, there have been over 3000 downloads from its website.