-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
78 lines (55 loc) · 2.33 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
--------------------
IFRit - an interference-free-region based data race detection tool
Implementation by Laura Effinger-Dean and Brandon Lucia
-
Based on the ideas in the OOPSLA 2012 paper
IFRit: Interference-Free Regions for Dynamic Data-Race Detection
by Laura Effinger-Dean, Brandon Lucia, Luis Ceze, Dan Grossman, and Hans-J. Boehm
--------------------
This repository includes:
(1) a copy of LLVM with a new pass that inserts data-race detection
calls during compilation
(2) a runtime that actally implements those data-race detection
calls
(3) A test program to check your setup.
---------------------------------
Compiler Pass Build pre-requisites:
1)Install LLVM (3.4?) from source
2)Install Clang, building against the LLVM you built in step (1)
3)Install CMake
Building the compiler pass:
cd /path/to/ifrit/LLVM/IFRit
make IFRITDIR=/home/linux/Desktop/IFRit <-- <replace with your path>
--
Runtime Build Pre-requisites:
1)Install glib-2
Building the runtime:
cd /path/to/ifrit/Runtime
make IFRITDIR=/home/linux/Desktop/IFRit <-- <replace with your path>
note that there are several #define build options in the Runtime source
------------------------------------
Testing the setup:
$cd /path/to/ifrit/Test
-edit the Makefile in that directory so the paths point to your installation
of IFRIT and clang. Note that you must use the same clang as the one
that you linked against the LLVM that you used to build the pass
export LD_LIBRARY_PATH=/home/linux/Desktop/IFRit/Runtime:$LD_LIBRARY_PATH <-- <replace with your path>
make IFRITDIR=/home/linux/Desktop/IFRit <-- <replace with your path>
./test.elf
You should then see some output like this.
[IFRit] Hash-table-based implementation in use.
[IFRit] Single-threaded optimization enabled.
[IFRit] Partitioning global state into 32 partitions.
Hello world
[IFRit] Sampling disabled
[IFRit] 6 6 : 0x40089a 0x40089a
Final value of x: 2000
[IFRit] Bye!
The 6 6 there is a race report saying that IFRs 6 and 6 overlapped.
The 0x40089a are the addresses of the line numbers.
$ addr2line -e test.elf 0x40089a
/sampa/home/effinger/drd/drd/test/test.c:10
Note that the compiler produces a file ifrs.txt containing a list of
IFRs detected in the code. The IFRit code just appends to this file,
so delete it before recompiling or you'll end up with a bunch of
redundant copies in the file.