bdsys icsm v3.5

57
An Empirical Study of Build System Migrations in Practice Case Studies on KDE and the Linux Kernel 1 R. Suvorov , B. Adams, M. Nagappan, A. E. Hassan,Y. Zou

Upload: sailqu

Post on 12-Apr-2017

196 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Bdsys icsm v3.5

An Empirical Study of Build System

Migrations in PracticeCase Studies on KDE and the Linux Kernel

1

R. Suvorov, B. Adams, M. Nagappan, A. E. Hassan, Y. Zou

Page 2: Bdsys icsm v3.5

Analogy: Car Assembly

2

+4x +assembly

+

Page 3: Bdsys icsm v3.5

Build System Transforms Source Code & Resources into Executables

3

+bdSys

+

Page 4: Bdsys icsm v3.5

bdSys is at the Heart of the Development Process!

4

bdSys+

Developers

QA Personnel Testers

Page 5: Bdsys icsm v3.5

bdSys Technology is “different”

5

Page 6: Bdsys icsm v3.5

bdSys Technology is “different”

5

Our record so far is a project we inherited with an Ant script weighing in at 10,000 lines of XML. Needless to say, this project required an entire team devoted to keeping the build working - a complete waste of resources.[Jez Humble & David Farley]

KDE 4 is leaving the aging "autotool" build chain behind. Some developers,

not only in KDE, like to nickname

the autotools as "auto-hell"

because of its difficult to comprehend architecture.[Alexander Neundorf]

I've been examining the existing kernel configuration system, and concluded that the best favor we could do everybody involved with it is to take it out behind the barn and shoot it through the head. [Eric Raymond]

Page 7: Bdsys icsm v3.5

... yet a bdSys Must Keep on Evolving

6

MLO

C

Page 8: Bdsys icsm v3.5

..., in fact a bdSys Changes Relatively More than Source Code

71

(c) McIntosh et al.: “An Empirical Study of

Build Maintenance Effort”

Page 9: Bdsys icsm v3.5

..., in fact a bdSys Changes Relatively More than Source Code

71

ArgoUML Hibernate Eclipse GCC Git Linux Mozilla PLPlot PostgreSQL0

0.51

1.52

2.53

3.54

4.55

# changes / source file# changes / build file

(c) McIntosh et al.: “An Empirical Study of

Build Maintenance Effort”

Page 10: Bdsys icsm v3.5

..., in fact a bdSys Changes Relatively More than Source Code

71

ArgoUML Hibernate Eclipse GCC Git Linux Mozilla PLPlot PostgreSQL0

0.51

1.52

2.53

3.54

4.55

# changes / source file# changes / build file

(c) McIntosh et al.: “An Empirical Study of

Build Maintenance Effort”

Page 11: Bdsys icsm v3.5

..., in fact a bdSys Changes Relatively More than Source Code

71

ArgoUML Hibernate Eclipse GCC Git Linux Mozilla PLPlot PostgreSQL0

0.51

1.52

2.53

3.54

4.55

# changes / source file# changes / build file

(c) McIntosh et al.: “An Empirical Study of

Build Maintenance Effort”

Page 12: Bdsys icsm v3.5

In Other Words ...

8

Page 13: Bdsys icsm v3.5

In Other Words ...

8

Software Projects need HELP Maintaining their Build Systems

Page 14: Bdsys icsm v3.5

The “easy” way out: Build System Migrations

9

Page 15: Bdsys icsm v3.5

The “easy” way out: Build System Migrations

9

Page 16: Bdsys icsm v3.5

10

Page 17: Bdsys icsm v3.5

11

Page 18: Bdsys icsm v3.5

12

Page 19: Bdsys icsm v3.5

12

Build system migrations are not that easy! But why?

Page 20: Bdsys icsm v3.5

Major Contributions

13

Common Migration

Methodology

Major Migration Challenges

Major Challenge: Requirements

Gathering

Page 21: Bdsys icsm v3.5

Study Setup

• Linux & KDE:

• Two established projects: 21 & 16 years old

• Large: 25 & 4.3 MLOC

• 1 failed & 1 successful migration each

• Data sources:

• git repos: 300 K & 100 K commits

• 4 mailing lists, over 1.5 million messages

14

Page 22: Bdsys icsm v3.5

Quantitative Study of Developer Commits

• git repositories

• Native git tools + bash scripts

• Statistics on source & bdSys code:

• Evolution

• Churn

• Distinguish between “normal” periods & migrations

15

Page 23: Bdsys icsm v3.5

Qualitative Analysis of Developer Communication

• Personal emails to migration participants

• Mailing lists

• Mass-downloaded and analyzed

• Statistics on number of messages:

• By groups (roles)

• By period of time

• Distinguish between “normal” periods & migrations

16

Page 24: Bdsys icsm v3.5

Major Contributions

17

Common Migration

Methodology

Major Migration Challenges

Major Challenge: Requirements

Gathering

Page 25: Bdsys icsm v3.5

18

Common Migration

Methodology

Page 26: Bdsys icsm v3.5

The Spiral Model of bdSys Migration

19

1. Planning 2. Risk Analysis

3. Development4. Evaluation

Page 27: Bdsys icsm v3.5

Why? Migration is Incremental!

• Linux kernel

• 33K+ source code files

• 2,300+ subdirectories

• 5 major subsystems

• KDE

• 11K+ source code files

• 22 packages

20

Page 28: Bdsys icsm v3.5

21

Common Migration

Methodology

Page 29: Bdsys icsm v3.5

21

Common Migration

Methodology

spiral model!

Page 30: Bdsys icsm v3.5

21

Common Migration

Methodology

spiral model!

migration happens

incrementally

Page 31: Bdsys icsm v3.5

22

Common Migration

Methodology

Major Migration Challenges

spiral model!

migration happens

incrementally

Page 32: Bdsys icsm v3.5

Communication AmongKey Participants

23

Page 33: Bdsys icsm v3.5

Communication AmongKey Participants

23

bdSys Managermajor decisions

Page 34: Bdsys icsm v3.5

Communication AmongKey Participants

23

bdSys Managermajor decisions

bdSys Championleading bdSys dev’t

Page 35: Bdsys icsm v3.5

Communication AmongKey Participants

23

bdSys Managermajor decisions

bdSys Championleading bdSys dev’t

bdSys ExpertbdSys contributor

Page 36: Bdsys icsm v3.5

Communication AmongKey Participants

23

bdSys Managermajor decisions

bdSys Championleading bdSys dev’t

bdSys ExpertbdSys contributor

Core Developersource contributor

Page 37: Bdsys icsm v3.5

Major Challenges

• Communication issues

• Build experts form a sub-community often reluctant to communicate effectively

• Performance vs. complexity

• Improving performance often means introducing hacks

• Effective evaluation

• When is migration "successfully finished"? How to measure?

• Requirements gathering (see remainder)

24

Page 38: Bdsys icsm v3.5

25

Common Migration

Methodology

Major Migration Challenges

spiral model!

migration happens

incrementally

Page 39: Bdsys icsm v3.5

25

Common Migration

Methodology

Major Migration Challenges

requirementsspiral model!

migration happens

incrementally

Page 40: Bdsys icsm v3.5

25

Common Migration

Methodology

Major Migration Challenges

requirements

communicationspiral model!

migration happens

incrementally

Page 41: Bdsys icsm v3.5

25

Common Migration

Methodology

Major Migration Challenges

requirements

communication

performance

spiral model!

migration happens

incrementally

Page 42: Bdsys icsm v3.5

25

Common Migration

Methodology

Major Migration Challenges

requirements

communication

performance

evaluation

spiral model!

migration happens

incrementally

Page 43: Bdsys icsm v3.5

26

Common Migration

Methodology

Major Migration Challenges

Major Challenge: Requirements

Gathering

requirements

communication

performance

evaluation

spiral model!

migration happens

incrementally

Page 44: Bdsys icsm v3.5

Example bdSys Requirements

• Platform independence

• Two new major platforms: Mac OS X & Windows

• High-level configuration

• Single-pass methodology

• Away with multiple-steps build!

• Simple and platform-independent syntax

27

Page 45: Bdsys icsm v3.5

Requirements Gathering Process1. Stakeholder identification - who?

• Who needs to be involved?

2. Elicitation

• What requirements are there?

3. Analysis

• Get all requirement data. Resolve conflicts, refine and organize.

4. Specification & Maintenance

• Document & order resulting requirements.

28

Page 46: Bdsys icsm v3.5

How SCons failed• Stakeholder identification

• Only 150 of 800 developers attended aKademy

• Elicitation

• Too little, too late: “trawled” for requirements

• Analysis

• Not enough attention paid to this phase!

• Specification & Maintenance

• Not done at all!

29

Page 47: Bdsys icsm v3.5

30

“the main SCons tree has intolerable problems, and there are so many layers [...] that it barely

resembles what a normal SCons build system looks like. Don't get me wrong; I use SCons at work and I

really like it, but if it isn't capable of handling KDE then why are we trying to make it do so? Is it really

worth keeping a KDE specific build system (which is what we are moving towards)?

[...] Perhaps it’s time to cut our losses and run.” [Jaison Lee]

As a Result:

Page 48: Bdsys icsm v3.5

Rise and Fall of SCons

31

% m

ax (

LOC

)

Page 49: Bdsys icsm v3.5

How succeeded

• Stakeholder identification

• Learned from SCons. Involved experts early.

• Elicitation

• Reuse some of SCons’ data.Active participation by experts!

• Analysis

• Identified conflicting requirements early.

• Specification & Maintenance

• An initiative by the build champion.32

Page 50: Bdsys icsm v3.5

33

Common Migration

Methodology

Major Migration Challenges

Major Challenge: Requirements

Gathering

spiral model!requirements

communication

performance

evaluation

migration happens

incrementally

Page 51: Bdsys icsm v3.5

33

Common Migration

Methodology

Major Migration Challenges

Major Challenge: Requirements

Gathering

spiral model!requirements

communication

performance

evaluation

migration happens

incrementally

involve all stakeholders

Page 52: Bdsys icsm v3.5

33

Common Migration

Methodology

Major Migration Challenges

Major Challenge: Requirements

Gathering

spiral model!requirements

communication

performance

evaluation

migration happens

incrementally

involve all stakeholders

identify &

resolve conflicts

Page 53: Bdsys icsm v3.5

33

Common Migration

Methodology

Major Migration Challenges

Major Challenge: Requirements

Gathering

spiral model!requirements

communication

performance

evaluation

migration happens

incrementally

involve all stakeholders

identify &

resolve conflicts

efficient elicitation

Page 54: Bdsys icsm v3.5

34

Page 55: Bdsys icsm v3.5

34

Common Migration

Methodology

spiral model!

migration happens

incrementally

Page 56: Bdsys icsm v3.5

34

Major Migration Challenges

requirements

communication

performance

evaluation

Common Migration

Methodology

spiral model!

migration happens

incrementally

Page 57: Bdsys icsm v3.5

34

Major Migration Challenges

requirements

communication

performance

evaluation

Common Migration

Methodology

spiral model!

migration happens

incrementally

Major Challenge: Requirements

Gathering

involve all stakeholders

identify &

resolve conflicts

efficient elicitation