3. What is a build system?
Source
code
Deliverable
!2
4. Build systems describe how sources are
translated into deliverables
.c
.o
.cc
.o
.exe
.tex
.dvi
.pdf
.a
.deb
!3
5. All builds are equal…
(1)
Think
(2)
Edit
The
developer’s
work cycle
(4)
Test
(3)
Build
!4
6. …But some builds are more
equal than others
“
http://xkcd.com/303/
Why is the gtk build so abysmally slow?
This hinders our ability to run gtk bots
and keep the gtk build green. :(
”
!5
19. …But where should we focus
refactoring effort?
Files that rebuild
the slowest?
!8
20. …But where should we focus
refactoring effort?
Files that rebuild
the slowest?
…but they may
only rarely change!
!8
21. …But where should we focus
refactoring effort?
Files that rebuild
the slowest?
Files that change
the most often?
…but they may
only rarely change!
!8
22. …But where should we focus
refactoring effort?
Files that rebuild
the slowest?
Files that change
the most often?
…but they may
only rarely change!
…but they may
already be optimal!
!8
23. …But where should we focus
refactoring effort?
Files that rebuild
the slowest?
Files that change
the most:often?
ots
…but they may
only rarely change!
…but they may
already be optimal!
otsp
h
ft e n
uild
ge o
on b
han
cus
nd c
Fo
ly a
slow
build
at re
es th
il
F
!8
25. MAKAO tool extracts build
dependency graphs
(1)
Dependency
Graph
Construction
(2)
Dependency
Graph
Analysis
(3)
Build
Hotspot
Detection
Design recovery and maintenance of build systems
B. Adams, Herman Tromp, Kris De Schutter, Wolfgang De Meuter
[ICSM 2007]
!10
26. The cost of traversing an edge is
derived by timing its build command
(1)
Dependency
Graph
Construction
(2)
Dependency
Graph
Analysis
(3)
Build
Hotspot
Detection
Median of 10
repetitions
!11
27. Mining frequently changing files
from version control
(1)
Dependency
Graph
Construction
Terminal
$ git clone …
…
$ git checkout <some_tag>
…
$ git log --oneline <some_file>
!12
(2)
Dependency
Graph
Analysis
(3)
Build
Hotspot
Detection
28. Quadrant plots highlight build
hotspots
Number of changes
(1)
Dependency
Graph
Construction
(2)
Dependency
Graph
Analysis
(3)
Build
Hotspot
Detection
Rebuild cost
!13
29. Quadrant plots highlight build
hotspots
Number of changes
(1)
Dependency
Graph
Construction
(2)
Dependency
Graph
Analysis
(3)
Build
Hotspot
Detection
Rebuild cost
!13
30. Quadrant plots highlight build
hotspots
Number of changes
(1)
Dependency
Graph
Construction
(2)
Dependency
Graph
Analysis
(3)
Build
Hotspot
Detection
Rebuild cost
!13
31. Number of changes
Quadrant plots highlight build
hotspots
factor
Re
e first!
thes
(1)
Dependency
Graph
Construction
(2)
Dependency
Graph
Analysis
(3)
Build
Hotspot
Detection
Rebuild cost
!13
32. Open source case studies!
Thresholds
!
Rebuild cost
90 seconds
Number of changes
!
Median
!
!14