Program Record/Replay Toolkit

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

Windows/MacOS PinPlay support in Intel SDE DCFG | Dynamic Slicing

Product Overview

This toolkit is called Program Record/Replay Toolkit.

The current version is 3.2  and was uploaded on February 16th, 2017. [ md5sum e3c1667989ac1e9f8a7d8abc591e82ec ]

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.

PinPlay  recorder and replayer for Windows/MacOS/Linux are now integrated (binary form) with Intel® Software Development Emulator (Intel SDE).

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


Latest Release Notes

Version 3.2 based on pin-3.2-81205-gcc-linux  from http://www.pintool.org.

What's new:

Multiple bug-fixes.


Installation

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
make

Making your Pintool record/replay enabled

Prerequisite:

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

Pintool source changes: ( Please look at $PIN_ROOT/extras/pinplay/examples/pinplay-driver.cpp for reference.)

#include "pinplay.H"
PINPLAY_ENGINE pinplay_engine;
KNOB<BOOL> KnobPinPlayLogger(KNOB_MODE_WRITEONCE,
                      "pintool", "log", "0",
                      "Activate the pinplay logger");
KNOB<BOOL> KnobPinPlayReplayer(KNOB_MODE_WRITEONCE,
                      "pintool", "replay", "0",
                      "Activate the pinplay replayer");

main()
{
..
pinplay_engine.Activate(argc, argv,
      KnobPinPlayLogger, KnobPinPlayReplayer);
..
}

Makefile changes: (Please look at $PIN_ROOT/extras/pinplay/examples/makefile.rules for reference.)

PINPLAY_HOME=$(PIN_ROOT)/extras/pinplay/
PINPLAY_INCLUDE_HOME=$(PINPLAY_HOME)/include
PINPLAY_LIB_HOME=$(PINPLAY_HOME)/lib/$(TARGET)
EXT_LIB_HOME=$(PINPLAY_HOME)/lib-ext/$(TARGET)

CXXFLAGS += -I$(PINPLAY_INCLUDE_HOME)


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

Link in these libraries before Pin libraries.

Pintool run command changes:

 pintool + pinplay logger:
 -------------------------

   % pin -t your-tool.so -log -log:basename pinball/foo -- test-app

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

   % pin -xyzzy -reserve_memory pinball/foo.address -t your-tool.so
	-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.  PinPlay Tutorial at PLDI 2016 [Slides]
  2.  PinPlay Tutorial at PLDI2015 [Slides]
  3. PinPoints tutorial at ISCA2014.
  4. Deterministic PinPoints (HPCA2013).

Related Publications

  1. Pinballs: Portable and Shareable User-level Checkpoints for Reproducible Analysis and Simulation.
     [Paper | Slides ]
  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.[Most influential paper of PLDI 2005 : Awarded PLDI 2015]
  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 ]
  9. Graph-matching-based simulation-region selection for multiple binaries, Yount, C., Patil, H. Islam, M.S., Srikanth, A.; Performance Analysis of Systems and Software (ISPASS), 2015 IEEE International Symposium on , vol., no., pp.52,61, 29-31 March 2015. [Slides][Paper]

Developers/Collaborators:

  • 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, Vineet Singh, Prof. Rajiv Gupta, and Prof. Iulian Neamtiu: University of California, Riverside. [2012-2016]

Navigate to: Pin  | DrDebug

For more complete information about compiler optimizations, see our Optimization Notice.

10 comments

Top
Molly C.'s picture

Hello,

I'm from China. I'm now doing work for finding and creating trace for a simulator. I wonder till now if any work has been done for converting pinball for other simulators, eg. Qemu ?  Many thanks.

Regards

Molly C.

Harish Patil (Intel)'s picture

Hi:

PinPlay kit is only available for Linux currently.

Intel SDE has a binary-only version of PinPlay recorder though which will allow you to do record/replay on Windows. See  Windows/MacOS PinPlay support in Intel SDE However you will not be able to write a replay-based tool on Windows with it. If it helps, the option of copying recorded pinballs to Linux and processing with cross-OS replay based tool with the Linux PinPlay kit exists. See the PinPlay tutorial at PLDI2016 for more details on Windows->Linux transfer/replay.​

-Harish

 

 

 

GyeongMin K.'s picture

Hi,

I am student at Hanyang Univ. (S.Korea), studying computer security especially anti-debugging technique. 

'PinPlay tool' Download available only Linux-gcc version, But I need Windows-VisualStudio compiler version.

Not yet published 'PinPlay tool' windows version? 

Regards

 GyMin,Kim

 

Harish Patil (Intel)'s picture

 Please post your questions to pinheads@yahoogroups.com.

-Harish

praveen a.'s picture

Hi

Sub : Running Pinpoints on Native Hardware

I wanted to know if its possible to run pinpoints on native hardware either in OS or baremetal context.

If ready support is not available can anyone share their thoughts on how we can go about achieving above requirement with pinplay..

Thanks

Praveen

Simon S.'s picture

Hello,

         I am a student at Harbin University of Science and Technology, China. Now, I am learning the PinPlay, but I encountered errors. I do not know why. When I used the "gdb_record --pinball=region.pb/log -- hello" of DrDebug, it always told me " ERROR: Non-printable char found in command line option "/home/sunjianda//pinplay-drdebug-2.2-pldi2015-pin-2.14-71313-gcc.4.4.7-linux//extras/pinplay/scripts/log.py".  Possibly the string "--" (two hyphens) which Windows has turned into the non-printable char "-" (dash). " I have already set the environment variables.  Please told me why it happened, and If you have a minute, please told me how to solve this problem..

Simon

Harish Patil (Intel)'s picture

The download should be working now. Please try.

Thanks for your patience on this matter.

 

-Harish

Ivan U.'s picture

Hello,

I am experiencing the same problem as Soumyajit described. After clicking on the tar.gz file, I am asked to sign in, and, after signing in, I get “You are not authorized to access this page.” I would be grateful if you could fix the problem. Thank you!

Ivan

Harish Patil (Intel)'s picture

Thanks for pointing this out. I have reported this problem to the support team.

Currently, after the license agreement you see the download page with *.tar.gz file; on clicking on the tar.gz file you should see a screen that prompts you to sign in and if you do, you should be able to download. Being prompted to sign in on clicking on the tar.gz file is a new, un-expected behavior which hopefully the support team will fix soon. If you do not sign in then you will get the "Access Denied" message.

In short, please sign in after clicking on the tar.gz file for download.

 

-Harish

Soumyajit P.'s picture

Hello,

         I am a PhD student at Indian Institute of Engg, Science and Technology, Howrah, India, working on multicore simulation. I need the pinplay tool for my work, however after license agreement, "access denied" message is being displayed. Please guide me if i am missing something.

Regards

Soumyajit

Add a Comment

Have a technical question? Visit our forums. Have site or software product issues? Contact support.