Pin (computer program): Difference between revisions

Content deleted Content added
Other Alternatives to Pin Tool: Remove backlink to deleted article
OAbot (talk | contribs)
m Open access bot: url-access updated in citation with #oabot.
 
(42 intermediate revisions by 32 users not shown)
Line 1:
{{Infobox software
| developer = [[Intel]]
| latest release version = 23.1231
| latest release date = {{release date|202024|1106|201330}}
| operating_system = [[Linux]], [[Windows]], [[OSX]], [[Android (operating system)|AndroidmacOS]]
| platform = [[IA-32]], [[x86-64]], [[Intel Xeon Phi]]
| genre = [[Instrumentation (computer programming)|Instrumentation framework]], [[Profiling (computer programming)|Profiler]]
| license = [[Proprietary software|Proprietary]], Pin is given free, butof youcharge cannotfor redistributeany Pinuse orunder the '''[https://software.intel.com/sites/landingpage/pintool/intel-simplified-software-license.txt Intel Simplified Software binariesLicense]'''.
| website = [{{URL|http://www.intel.com/software/pintool www.intel.com/software/pintool]}}
}}
'''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 associated with them is run. Callback routines are only called when specific conditions are met, or when a certain event has occurred. Pin provides an extensive [[application programming interface]] (API) for instrumentation at different 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.
 
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. Then [[Just-in-time compilation|just-in-time recompiles]] (JIT) small sections of the binary code using pin just before it is ran. New instructions to perform 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 performs instrumentation by taking control of the program just after it loads into the memory. Then [[Just-in-time compilation|just-in-time recompiles]] (JIT) small sections of the binary code using pin just before it is ranrun. New instructions to perform 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.csjaleels.virginia.eduorg/kimajaleel/docspublications/ieeeComputer10.pdf Analyzing Parallel Programs with Pin]</ref>
 
== Features ==
Line 35 ⟶ 37:
* Pin itself comes with many example tools that make use of its abilities. These tools are licensed under a BSD-like license.
 
== UsesAlternatives asto aPin Defence MechanismTool ==
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|url = |title = Building secure products and solutions.|journal = Bell Labs Technical Journal|volume = 12|issue = 3|page = 21-38|last = Gupta|first = Chandrashekhar|date = 2007|journal = |doi = 10.1002/bltj.20247|pmid = |access-date 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|url = |title = Dynamic binary instrumentation and data aggregation on large scale systems|last = Lee|first = Schulz|date = 2007|journal = International Journal of Parallel Programming|doi volume=35 |pmid issue=3 |access pages=207–232 | doi=10.1007/s10766-007-date0036-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|url = http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=5427374|journal = Computer|date = March 2010|access-date = 2015-04-27|issn = 0018-9162|pages = 34–41|volume = 43|issue = 3|doi = 10.1109/MC.2010.60|firstfirst1 = M.|lastlast1 = 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.
Most scholars think that one can use Pin tool or binary instrumentation techniques to detect malwares in the future. Unlike traditional antiviruses where scanning files is used to detect viruses, one can use tools like Pin tool to scan program's resources to detect abnormalities; thus detect malwares.
 
=== Utilizing System Resource Monitoring ===
Unlike traditional techniques of scanning files, this approach doesn’t need to be updated regularly and uses a more efficient way to detect malwares rather than burdening the processor by scanning all the files. This approach keeps track of the system’s resources used by a program and terminates the program if its resource usage goes beyond a given threshold limit. The good thing about this approach is that it can be implemented inside a program itself or in an antivirus.
 
=== Other 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|url = |title = Building secure products and solutions. Bell Labs Technical Journal|last = Gupta|first = Chandrashekhar|date = 2007|journal = |doi = 10.1002/bltj.20247|pmid = |access-date = }}</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|url = |title = Dynamic binary instrumentation and data aggregation on large scale systems|last = Lee|first = Schulz|date = 2007|journal = International Journal of Parallel Programming|doi = |pmid = |access-date = }}</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|url = http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=5427374|journal = Computer|date = March 2010|access-date = 2015-04-27|issn = 0018-9162|pages = 34–41|volume = 43|issue = 3|doi = 10.1109/MC.2010.60|first = M.|last = 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}}</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 ==
Line 56 ⟶ 52:
 
{{refbegin}}
* {{cite journal | title = Analyzing Parallel Programs With Pin | author author1= Moshe Bach, |author2=Mark Charney, |author3=Robert Cohn, |author4=Elena Demikhovsky, |author5=Tevi Devor, |author6=Kim Hazelwood, |author7=Aamer Jaleel, |author8=Chi-Keung Luk, |author9=Gail Lyons, |author10=Harish Patil, and |author11=Ady Tal |name-list-style=amp |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 | doi=10.1109/mc.2010.60 |s2cid=15155077 |access-date=2010-07-05 |archive-url=https://web.archive.org/web/20101229163736/http://www.computer.org/portal/web/csdl/magazines/computer#4 |archive-date=2010-12-29 |url-status=dead |url-access=subscription }}
* {{cite conference | title = Pin: Building Customized Program Analysis Tools with Dynamic Instrumentation | url = httphttps://www.cs.tufts.edu/comp/150IPL/papers/luk05pin.pdf | author author1= Chi-Keung Luk, |author2=Robert Cohn, |author3=Robert Muth, |author4=Harish Patil, |author5=Artur Klauser, |author6=Geoff Lowney, |author7=Steven Wallace, |author8=Vijay Janapa Reddi, and |author9=Kim Hazelwood |name-list-style=amp booktitle| book-title = Proceedings of the 2005 ACM SIGPLAN conference on Programming language design and implementation | pages = 190-120190–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 author1= Alex Skaletsky, |author2=Tevi Devor, |author3=Nadav Chachmon, |author4=Robert Cohn, |author5=Kim Hazelwood, |author6=Vladimir Vladimirov, |author7=Moshe Bach | booktitlebook-title = International Symposium on Performance Analysis of Software and Systems (ISPASS) | pages = 2–12 | date = April 2010 | ___location = White Plains, NY | archive-url = https://web.archive.org/web/20160918102825/http://www.cs.virginia.edu/kim/docs/ispass10.pdf | archive-date = 2016-09-18 }}
{{refend}}
 
== External links ==
* [http://www.pintool.orgintel.com/ Pin: a dynamic binary instrumentation tool] home page
* [httphttps://tech.groups.yahoo.comio/groupg/pinheads/ Pinheads], a mailing list for the Pin users community
* [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