Tutorial: Using PinPlay for Reproducible Analysis and Replay Debugging

Also see: Previous PinPlay tutorial (PLDI 2015).
When: Tuesday, June 14, 2016 (morning)
Where: At PLDI2016 in Santa Barbara, CA, USA. 
Theme: The focus of this tutorial was on cross-OS replay based analysis: record on Windows/MacOS --> replay + analyze on Linux! 
PinPlay  recorder and replayer for Windows/MacOS/Linux are now integrated (binary form) with Intel® Software Development Emulator (Intel SDE) (version 7.45 onwards).
NEW : Special PinPlay kit for PLDI2016 PinPlay tutorial 
             Slides for the tutorial presentation (without demo). Try the  simple_loop example setup used in the presentation.
            Demo of record/replay (mp4) [choppy audio; muting is okay].
PinPlay (www.pinplay.org) is a Pin (dynamic instrumentation framework)-based execution capture and replay system. It has two goals [1] control non-determinism in programs (single and multi-threaded) by logging system-call effects and shared-memory dependences and replaying them exactly, and [2] provide an easy way for repeatable Pin-based analysis of programs with  by eliminating the need to have the program binary, inputs, and environment around by logging the execution events once and replaying them multiple times. PinPlay is distributed (for Linux currently but Windows and Android kits to be made available soon) as an extended Pin kit at www.pinplay.org.  The PinPlay kit provides a library that Pin tools can link in with small source changes. A PinPlay enabled Pin tool can then act either as a recording tool creating a set of files called a ‘pinball’, or as a replaying tool consuming a pinball instead of a live binary. Replay-based analyses are guaranteed to be reproducible. A very useful example of reproducible analysis is replay-based debugging of multi-threaded programs. The pinball for a run of a program with a bug can be replayed with the replayer tool connected to a debugger (GDB). PinPlay guarantees that the same text/data addresses, and the same thread ordering is seen on each replay/debug session making cyclic debugging of multi-threaded programs a lot easier.  

The tutorial will provide a detailed description of PinPlay, instructions on writing PinPlay enabled Pin tools, and a demonstration of replay-based debugging with PinPlay. The replay debugging framework is available at www.drdebug.org for anyone to tailor to their debugging needs.

Topics to be covered:  
  • Overview of Pin
  • Description of PinPlay 
    • How to make Pin tools PinPlay enabled
    • Examples of reproducible analysis
  • An overview of Intel® Software Development Emulator (Intel SDE) that includes PinPlay recorder/replayer (to be released soon).
    • Recording on Windows/MacOS and replaying+ analyzing on Linux
  • Applications of replay: replay-debugging, dynamic program slicing, dynamic control-flow graph (DCFG ) based analysis.
    • An example toolchain for recording with DCFG generation, finding "hot loops", and using replay-based dynamic slicing to find loop dependences.
  • Replay-debugging with PinPlay
    • A small demo
    • How to write custom replay debugging tools

Subpages (1): Presenters