Skip to content

Simple Pin tool to collect information about branch instructions during a program's execution.

Notifications You must be signed in to change notification settings

db434/branch-trace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Branch trace

Pin tool to collect information about branch instructions during a program's execution.

Build

  • Download Intel's Pin framework (tested with version 3.21)
  • Extract to a directory of your choice
  • From this directory (branch_traces, not the Pin framework)
    • export PIN_ROOT=path/to/your/pin/framework
    • make

Use

$PIN_ROOT/pin -t obj-intel64/branch_traces.so -o branches.out -- <your program here>

The specified output file will be a CSV file with one line per branch executed. Each line contains the branch's program counter, the target branch address, and whether the branch was taken or not.

pc, target, taken
0x7f25b1748e41, 0x7f25b1748eb6, 0
0x7f25b1748e72, 0x7f25b1748e9f, 1
0x7f25b1748ea3, 0x7f25b1748e78, 0
0x7f25b1748eb4, 0x7f25b1748e9f, 1
0x7f25b1748ea3, 0x7f25b1748e78, 0
0x7f25b1748eb4, 0x7f25b1748e9f, 1
0x7f25b1748ea3, 0x7f25b1748e78, 1
0x7f25b1748e82, 0x7f25b1749070, 1

About

Simple Pin tool to collect information about branch instructions during a program's execution.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages