Program Record/Replay Toolkit

PinPlay Tutorial at PLDI2015  | Release Notes |  Additional Documents | Related Tutorials | Related Publications | People | PinPlay FAQ

Product Overview

This toolkit is called Program Record/Replay Toolkit.

The current version is 2.1 and was created on March 3rd  2015 and updated on April 3rd 2015.

Program Record/Replay Toolkit is built upon the Pin dynamic binary instrumentation system. It is a re-distribution of the latest/reasonably recent Pin kit for Linux with some additions for making Pin-based analyses repeatable. The additions include a library and a header file that provide an API for making Pintools enabled for recording a program execution and doing analysis while replaying a program recording. Also included in the toolkit are example Pintools that are record/replay enabled and a number of scripts for recording, replaying, and doing replay-based analysis for finding and check-pointing representative regions ("PinPoints") of large applications. Scripts/tools for Deterministic Replay based Debugging ("DrDebug") are also included in this toolkit.

PinPlay has been integrated with the Maple tool for exposing multi-threaded bugs. The Sniper simulator project also uses PinPlay.

Intel is releasing this toolkit so that developers can experiment with making their Pin-based analysis repeatable.

Latest Release Notes

Version 2.1 based on pin-2.14-71313-gcc.4.4.7-linux  from

What's new:

  • No installation necessary anymore. Pre-built included.

  •  Recording/replaying made easier with new scripts:

     (put $PIN_ROOT/extras/pinplay/scripts in PATH)

         I. 'record'
                    Usage : record <options>  -- binary args
                                OR record --pid=XXXX <options> -- binary #no args
         II. 'replay'
                    Usage : replay <options> -- pinball-basename
         III. 'relog'
                 Usage : relog <options>  -- old-pinball-basename new-pinball-basename

  •   First release with DrDebug('D'eterministic 'r'eplay based 'Debug'ging) support:
  1. now includes a "PinPlay debugger shell" that uses Pin's Advanced Debugger Extensions (PinADX) for  supporting fast breakpoints, gathering/printing of memory/register values.
  2. GDB wrapper scripts:
    (put $PIN_ROOT/extras/pinplay/scripts in PATH)
    Prerequisite: GDB version 7.4 or higher configured with Python support.

    I.  'gdb_record' allows interactive recording of a region of interest.

    Usage : gdb_record <options> -- binary args
         ​OR  gdb_record --pid=XXXX <options> -- binary #no args

             #<BEGIN:region of interest>
             (gdb) pin record on

              #<END:region of interest>
            (gdb) pin record off

        II. 'gdb_replay' allows replay-based debugging.
Usage : gdb_replay <options>  -- pinball-basename program-binary

  •     Pin's IMG API is now supported with replay-based Pintools.



Download and unpack the toolkit. Set your PIN_ROOT variable to point to that directory. You can also refer to the tools in the kit using full or relative paths. Do not rearrange the files or subdirectories in the unpacked kit. If you want to move the kit directory, move everything.

No installation is normally needed as pre-built tools are already included in the kit. If the pre-installed tools do not work for you, do the following:

Prerequisites: Installation will only work on 64-bit Linux machines with gcc/g++ installed for both 32-bit and 64-bit compiles.

cd $PIN_ROOT/extras/pinplay/examples
make instclean

Making your Pintool record/replay enabled


  • Your tool should not be modifying control-flow of the test program (no PIN_ExecuteAt()).

Pintool source changes:

#include "pinplay.H"
PINPLAY_ENGINE pinplay_engine;
                      "pintool", "log", "0",
                      "Activate the pinplay logger");
                      "pintool", "replay", "0",
                      "Activate the pinplay replayer");

pinplay_engine.Activate(argc, argv,
      KnobPinPlayLogger, KnobPinPlayReplayer);

Makefile changes:



linking: link in $(PINPLAY_LIB_HOME)/libpinplay.a,
    $(EXT_LIB_HOME)/libbz2.a, $(EXT_LIB_HOME)/libz.a 

Link in these libraries before Pin libraries.

Pintool run command changes:

 pintool + pinplay logger:

   % pin -t -log -log:basename pinball/foo -- test-app

 pintool + pinplay replayer:
   % pin -xyzzy -reserve_memory pinball/foo.address -t
	-replay -replay:basename pinball/foo -- $PIN_ROOT/extrans/pinplay/bin/intel64/nullapp
     [for intel64 pinballs]

   % pin -xyzzy -reserve_memory pinball/foo.address -t
	-replay -replay:basename pinball/foo -- $PIN_ROOT/extrans/pinplay/bin/ia32/nullapp
	[for ia32 pinballs]

Known issues

Please check all the Pin known issues in Pin documentation, they apply to PinPlay as well. In addition, the following are the currently known PinPlay issues:

  1. Pintools that change application control flow (with PIN_ExecuteAt() for example) cannot work with replay for obvious reasons (replay faithfully follows the control-flow as captured during logging).
  2. Replay-based tools have not been tested with Pin features such as buffering.


Additional Documents

  1. DrDebug: Common Usage Examples
  2. Testimonials

Related Tutorials

  1. Upcoming: PinPlay Tutorial at PLDI2015 
  2. PinPoints tutorial at ISCA2014.
  3. Deterministic PinPoints (HPCA2013).

Related Publications

  1. Pinballs: Portable and Shareable User-level Checkpoints for Reproducible Analysis and Simulation.
  2. DrDebug: Deterministic Replay based Cyclic Debugging with Dynamic Slicing; Yan Wang, Harish Patil, Cristiano Pereira, Gregory Lueck, Rajiv Gupta, and Iulian Neamtiu. CGO 2014.
  3. PinADX: An Interface for Customizable Debugging with Dynamic Instrumentation; Gregory Lueck, Harish Patil, and Cristiano Pereira. CGO 2012. [Nominated for Best Paper Award ]
  4. Maple: A Coverage-driven Testing tool for Multithreaded Programs; Jie Yu, Satish Narayanasamy, Cristiano Pereira, and Gilles Pokam. OOPSLA 2012.
  5. PinPlay: A Framework for Deterministic Replay and Reproducible Analysis of Parallel Programs; Harish Patil, Cristiano Pereira, Mack Stallcup, Gregory Lueck, James Cownie. CGO 2010. [CGO 2010 Best Paper Award Winner!]
  6. Automatic Logging of Operating System Effects to Guide Application-Level Architecture Simulation; Satish Narayanasamy, Cristiano Pereira, Harish Patil, Robert Cohn, and Brad Calder In the proceedings of ACM SIGMETRICS: the International Conference on Measurement and Modeling of Computer Systems, June 2006.
  7. Pin: Building Customized Program Analysis Tools with Dynamic Instrumentation; Chi-Keung Luk, Robert Cohn, Robert Muth, Harish Patil, Artur Klauser, Geoff Lowney, Steven Wallace, Vijay Janapa Reddi, and Kim Hazelwood. Proceedings of the 2005 ACM SIGPLAN conference on Programming language design and implementation.
  8. Pinpointing Representative Portions of Large Intel® Itanium® Programs with Dynamic Instrumentation; Patil, H., Cohn, R., Charney, M., Kapoor, R., Sun, A., and Karunanidhi, A. In Proceedings of the 37th Annual IEEE/ACM international Symposium on Microarchitecture (Portland, Oregon, December 04 - 08, 2004). [Nominated for Best Paper Award ]



  • Numerous Pin and PinPlay team members at Intel. [ongoing]
  • Cristiano Pereira, Satish Narayanasamy, and Prof. Brad Calder: University of California, San Diego.[2005-2007]
  • Yan Wang, Prof. Rajiv Gupta, and Prof. Iulian Neamtiu: University of California, Riverside. [2012-2014]

Navigate to: Pin  | DrDebug 

Per informazioni più dettagliate sulle ottimizzazioni basate su compilatore, vedere il nostro Avviso sull'ottimizzazione.