PerPI: Tutorial

This tutorial is organised as follow: after a short introduction, the first part describes the installation, the second part presents a step by step first use by the way of the project manager. The third part shows how to directly address the Pilp5 pintool, and pintool internals which helps to understand what and how exactly the pintool computes.



Install

  1. Make a tutorial directory such as: ~/tutorial/
  2. Install dependencies: Pin and other packages (see download section)
    • Pin installation will provide you a pin directory
  3. Uncompress and untar archives:
    • tar -xvfz Pilp5.tar.gz
    • tar -xvfz Ilptool.tar.gz
  4. Now, you have some known directories:
    • ~/tutorial/pin-2.12-54730-gcc.4.4.7-linux/ (called pin directory)
    • ~/tutorial/Pilp5/ (called Pilp5 directory)
    • ~/tutorial/Ilptool/ (called Ilptool directory)
  5. Build Pilp5 tool:
    • Go into Pilp5 directory, edit makefile and set appropriate PIN variables with full path such as example below:
      	    
      	      PIN_HOME = /home/dparello/tutorial/pin-2.12-54730-gcc.4.4.7-linux
      	      PIN_ROOT = /home/dparello/tutorial/pin-2.12-54730-gcc.4.4.7-linux
      	      PIN_KIT = /home/dparello/tutorial/pin-2.12-54730-gcc.4.4.7-linux
      	    
      	  
    • Build the tool: make




Getting started

Ilptool setup





Example 1 (source code: ex1.tar.gz)

Setp 1: Getting simple Profile

Setp 2: Getting detailed Profile

Setp 3: Getting Histogram

Setp 4: Getting Dependency graph (Trace)





  • Other Examples (source code: extra-perpi.tar.gz)

  • ...



    Pilp5 internals

    Pilp5 direct address

    Setp 1: Getting detailed Profile

    Setp 2: Getting Histogram

    Setp 3: Getting Trace



    Source organisation

    Each function call has its own analysis. Thus Independantly of which analysis is provide (profiling, histogram or trace), the analyser class is coupled with a routine class which control when analysis start and stop.

    Instrumentation

    Profile analysis

    Histogram analysis

    Trace analysis



    Full code

    Pilp5

    Profile analysis

    Histogram analysis

    Trace analysis

    Misc