Home‎ > ‎


Pin Binary Instrumentation Tutorial
Binary Instrumentation Engine
Call for Participation!
ASPLOS 2014, Pin Tutorial
March 2014
Salt Lake City, Utah

About Pin

Pin is a dynamic instrumentation system provided by Intel (http://www.pintool.org), which allows C/C++/assembly introspection code to be injected at arbitrary places in a running executable. The injected introspection code is referred to as a Pin tool and is used to observe the behavior of the program. 

Pin tools can be written to perform various functionalities including application profiling, memory leak detection, security and trace generators for the IA32 and Intel64 platforms. Pin supports running on Android, Windows, Linux and OS X. 

Pin provides a rich API that abstracts away the underlying instruction set idiosyncrasies and allows context information such as register contents to be passed to the injected code as parameters. Pin automatically saves and restores registers that are overwritten by the injected code so the application continues to execute normally. Pin makes it easy to do studies on complex real-life applications, which makes it a useful tool not only for research, but also for education. Pin has been downloaded tens of thousands times, has been cited in over 700 publications, and has about 1000 registered mailing list users. 

Tutorial Objective

This tutorial will present detailed information on both developing Pin tools, and the inner workings of Pin with special emphasis on Android. The tutorial is comprised of four learning components. The first component provides insight into the workings of Pin, and introduces its fundamental instrumentation structures and concepts thru example Pin tools. The second component will present methods and considerations for writing performance optimal Pintools. The third component will present Android specific aspects of Pin, both how Pin functions on Android and considerations for writing Pin tools on Android. The fourth component will present some of the more advanced Pin APIs, such as signal/exception interception, multi-threaded Pin tools and Pin’s interface to debuggers. 

Tutorial Schedule

Overall 3 hours

Part One: Overview, Key Concepts (60 min) 

Part Two: Optimal Pintool Development (50 min) 

Part Three: Pin Android Specifics (60 min) 

Part Four: Advanced Pin Usage: Advanced Pin APIs (60 min) 

Presenter Bio

Benjamin Kemper is a software engineer at Intel and has been working in the Pin project for the last 2 years. Benjamin works on enabling Pin on various UNIX platforms.