Pin (computer program): Difference between revisions

Content deleted Content added
See also: Added valgrind.
BG19bot (talk | contribs)
m WP:CHECKWIKI error fix for #61. Punctuation goes before References. Do general fixes if a problem exists. - using AWB (8853)
Line 12:
'''Pin''' is a dynamic binary [[instrumentation (computer programming)|instrumentation]] framework for the [[IA-32]] and [[x86-64]] [[instruction set|instruction set architectures]] that enables the creation of [[dynamic program analysis]] tools. Some tools built with Pin are [[Intel Parallel Inspector]], [[Intel Parallel Amplifier]] and [[Intel Parallel Advisor]].
 
The tools created using Pin, called Pintools, can be used to perform program analysis on [[user space]] applications in [[Linux]] and [[Windows]].<ref>[http://www.cs.virginia.edu/kim/docs/ispass10.pdf Dynamic Program Analysis of Microsoft Windows Applications]</ref>. As a dynamic binary instrumentation tool, instrumentation is performed at [[run time]] on the compiled binary files. Thus, it requires no recompiling of source code and can support instrumenting programs that dynamically generate code.
 
Pin was originally created as a tool for computer architecture analysis, but its flexible API and an active community (called "Pinheads") have created a diverse set of tools for security, emulation and parallel program analysis.
Line 19:
 
==Overview==
Pin performs instrumentation by taking control of the program just after it loads into memory. It then [[Just-in-time compilation|just-in-time recompiles]] (JIT) small sections of binary code just before they are run. New instructions, which perform the analysis, are added to the recompiled code. These new instructions come from the Pintool. A large array of optimization techniques are used to obtain the lowest possible running time and memory use overhead. As of June 2010, Pin's average base overhead is 30 percent (without running a pintool).<ref>[http://www.cs.virginia.edu/kim/docs/ieeeComputer10.pdf Analyzing Parallel Programs with Pin]</ref>.
 
Pin is a platform for creating analysis tools. A pin tool comprises instrumentation, analysis and callback [[Subroutine|routines]]. Instrumentation routines are called when code that has not yet been recompiled is about to be run, and enable the insertion of analysis routines. Analysis routines are called when the code they are associated with is run. Callback routines are called when specific conditions are met, or when a certain event has occurred. Pin provides an extensive [[application programming interface]] (API) for instrumentation at many abstraction levels, from one instruction to an entire binary module. It also supports callbacks for many events such as library loads, system calls, signals/exceptions and thread creation events.
 
== Features ==
 
=== Instrumentation modes ===
Pin supports two modes of instrumentation called JIT mode and Probe mode. JIT mode supports all features of Pin, while Probe mode supports a limited feature set but is far faster, adding almost no overhead to program running time. JIT mode uses a just-in-time compiler to recompile all program code and insert instrumentation, while Probe mode uses [[Trampoline (computers)|code trampolines]] for instrumentation.
Line 40 ⟶ 41:
* Components of '''[[Intel Parallel Studio]]''' make heavy use of pintools for memory debugging, performance analysis, [[Thread (computer science)|multithreading]] correctness analysis and parallelization preparation.
* '''[http://software.intel.com/en-us/articles/intel-software-development-emulator/ Intel Software Development Emulator]''' is a pintool that enables the development of applications using instruction set extensions that are not currently implemented in hardware.
* '''CMP$IM''' is a cache profiler built using pin. <ref>[http://www.ece.umd.edu/~blj/papers/mobs2008.pdf CMP$im: A Pin-Based On-The-Fly Multi-Core Cache Simulator]</ref>
*'''PinPlay''' enables the capture and deterministic replay of the running of multithreaded programs under pin. Capturing the running of a program helps developers overcome the non-determinism inherent in multithreading.<ref>[http://delivery.acm.org/10.1145/1780000/1772958/p2-patil.pdf PinPlay: a framework for deterministic replay and reproducible analysis of parallel programs]</ref>
* Pin itself comes with many example tools that make use of its abilities. These tools are licensed under a BSD-like license.
Line 57 ⟶ 58:
* {{cite journal | title = Analyzing Parallel Programs With Pin | author = Moshe Bach, Mark Charney, Robert Cohn, Elena Demikhovsky, Tevi Devor, Kim Hazelwood, Aamer Jaleel, Chi-Keung Luk, Gail Lyons, Harish Patil, and Ady Tal | journal = Computer | volume = 43 | number = 3 | pages = 34–41 | date = March 2010 | publisher = IEEE| url = http://www.computer.org/portal/web/csdl/magazines/computer#4 }}
* {{cite conference | title = Pin: Building Customized Program Analysis Tools with Dynamic Instrumentation | url = http://www.cs.virginia.edu/papers/p190-luk.pdf | author = Chi-Keung Luk, Robert Cohn, Robert Muth, Harish Patil, Artur Klauser, Geoff Lowney, Steven Wallace, Vijay Janapa Reddi, and Kim Hazelwood | booktitle = Proceedings of the 2005 ACM SIGPLAN conference on Programming language design and implementation | pages = 190-120 | date = June 2005 | publisher = ACM | ___location = Chicago, Illinois, USA }}
* {{cite conference | title = Dynamic Program Analysis of Microsoft Windows Applications | url = http://www.cs.virginia.edu/kim/docs/ispass10.pdf | author = Alex Skaletsky, Tevi Devor, Nadav Chachmon, Robert Cohn, Kim Hazelwood, Vladimir Vladimirov, Moshe Bach | booktitle = International Symposium on Performance Analysis of Software and Systems (ISPASS) | pages = 2-122–12 | date = April 2010 | ___location = White Plains, NY }}
{{refend}}
 
==External links==
 
* [http://www.pintool.org/ Pin: a dynamic binary instrumentation tool] home page
* [http://tech.groups.yahoo.com/group/pinheads/ Pinheads], a mailing list for the Pin users community