Content deleted Content added
Jerryobject (talk | contribs) m Per Wikipedia Style Manual: corrected punctuation of unprintworthy terms, heading capitalization; removed excess punctuation; defined initialism; changed instances of passive voice to active. |
m Open access bot: url-access updated in citation with #oabot. |
||
(80 intermediate revisions by 65 users not shown) | |||
Line 1:
{{Infobox software
| developer = [[Intel]]
| latest release version =
| latest release date = {{release date|
| operating_system = [[Linux]], [[Windows]], [[macOS]]
| platform = [[IA-32]], [[x86-64]]
| genre = [[Instrumentation (computer programming)|Instrumentation framework]], [[Profiling (computer programming)|Profiler]]
| license = [[Proprietary software|Proprietary]], Pin is given free of charge for
| website =
}}
'''Pin''' is a platform for creating analysis tools. A pin tool comprises instrumentation, analysis and callback [[
In 2020, it received the ''Programming Languages Software Award'' from [[Association for Computing Machinery|ACM]] [[SIGPLAN]].<ref>{{Cite web|url=http://www.sigplan.org/Awards/Software/|title=Programming Languages Software Award|website=www.sigplan.org}}</ref>
Pin performs instrumentation by taking control of the program just after it loads into the memory.
== Features ==▼
▲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 consumption overhead. As of June 2010, Pin's average base overhead is 30 per cent (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 [[routine|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 a single 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
=== Platform independence ===
Pin was designed for tool [[Cross-platform|portability]], and despite JIT compiling from one ISA to the same ISA (and not using a single [[intermediate representation]] for all code), most of its APIs are architecture and [[operating system]] independent. It was also designed to be portable itself, carefully isolating platform-specific code from generic code, allowing the fast adaptation of Pin to new platforms. Approximately half of the code is generic and the rest is either architecture or OS dependent.<ref>[http://
=== Optimizations ===
Pin uses many techniques to optimize instrumentation and analysis code, using techniques such as [[Inline function|inlining]], [[liveness analysis]] and smart [[register spilling]]. Pin performs these optimizations automatically whenever possible, without
=== Ease of use ===
Pin’s API and implementation are focused on making pin tools easy to write. Pin takes full responsibility for assuring that the instrumentation code from the pin tool does not affect the application state. Also, the API enables
== Tools ==
There are many Pintools that are used for varying tasks.
* 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/
* '''CMP$IM''' is a cache profiler built using pin.
*'''[http://www.pinplay.org PinPlay]''' enables the capture and deterministic replay of the running of multithreaded programs under pin. Capturing the running of a program
* Pin itself comes with many example tools that make use of its
== Alternatives to Pin Tool ==
There are many other tools available to collect resource usage of running programs on the system such as [[Bell Lab]]’s strapon tool and [[Dyninst]] tool etc. [[Bell Lab]]’s tool uses the strap on technology which runs a tool to collect resources simultaneously with the program but this tool is only compatible with the programs which allow other programs to run simultaneously with them.<ref>{{Cite journal|title = Building secure products and solutions|journal = Bell Labs Technical Journal|volume = 12|issue = 3|page = 21-38|last = Gupta|first = Chandrashekhar|date = 2007|doi = 10.1002/bltj.20247| s2cid=30412754 }}</ref> Furthermore, Dyninst tool uses [[binary rewriting]] of the program’s executable and implementable commands inside the program to check for resource usage and is very efficient. However, it is very unstable as it is a relatively new tool and crashes on large scale programs.<ref>{{Cite journal|title = Dynamic binary instrumentation and data aggregation on large scale systems|last = Lee|first = Schulz|date = 2007|journal = International Journal of Parallel Programming| volume=35 | issue=3 | pages=207–232 | doi=10.1007/s10766-007-0036-3 | s2cid=6653468 }}</ref> Lastly, [[Intel]] Pin tool uses static binary instrumentation and runs the program as a part of itself while keeping track of all its resources.<ref>{{Cite journal|title = Analyzing Parallel Programs with PIN|journal = Computer|date = March 2010|issn = 0018-9162|pages = 34–41|volume = 43|issue = 3|doi = 10.1109/MC.2010.60|first1 = M.|last1 = Bach|first2 = M.|last2 = Charney|first3 = R.|last3 = Cohn|first4 = E.|last4 = Demikhovsky|first5 = T.|last5 = Devor|first6 = K.|last6 = Hazelwood|first7 = A.|last7 = Jaleel|first8 = Chi-Keung|last8 = Luk|first9 = G.|last9 = Lyons| s2cid=15155077 }}</ref> This approach is more suitable for an antivirus as it can easily run all the processes under itself and can kill programs if they reach a maximum allocated limit as defined by the antivirus.
== See also ==
* [[Dynamic program analysis]]
* [[Valgrind]]
* [[DynamoRIO]]
== Notes ==
{{
== References ==
{{refbegin}}
* {{
* {{
* {{
{{refend}}
== External
* [
* [http://jbremer.org/detecting-uninitialized-memory-read-access-bugs-using-pin-a-la-valgrind/ Detecting Read-Before-Write Bugs (a la Valgrind)]
* [https://github.com/SEDS/PinPP Pin++], a framework for authoring Pintools
[[Category:Profilers]]
▲* [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
|