Linux / Include
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 15,964 units with 85,824 lines of code in units (12.3% of code).
    • 0 very complex units (0 lines of code)
    • 3 complex units (167 lines of code)
    • 24 medium complex units (979 lines of code)
    • 176 simple units (3,494 lines of code)
    • 15,761 very simple units (81,184 lines of code)
0% | <1% | 1% | 4% | 94%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
h0% | <1% | 1% | 4% | 94%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
linux0% | <1% | <1% | 3% | 95%
sound0% | 0% | 15% | 3% | 81%
math-emu0% | 0% | 87% | 0% | 12%
net0% | 0% | <1% | 6% | 92%
media0% | 0% | 3% | 0% | 96%
asm-generic0% | 0% | 1% | 10% | 88%
video0% | 0% | 7% | 5% | 87%
uapi0% | 0% | 0% | 8% | 91%
rdma0% | 0% | 0% | 6% | 93%
crypto0% | 0% | 0% | 4% | 95%
drm0% | 0% | 0% | 4% | 95%
xen0% | 0% | 0% | 13% | 86%
scsi0% | 0% | 0% | 2% | 97%
soc0% | 0% | 0% | 0% | 100%
acpi0% | 0% | 0% | 0% | 100%
kvm0% | 0% | 0% | 0% | 100%
clocksource0% | 0% | 0% | 0% | 100%
keys0% | 0% | 0% | 0% | 100%
kunit0% | 0% | 0% | 0% | 100%
trace0% | 0% | 0% | 0% | 100%
vdso0% | 0% | 0% | 0% | 100%
misc0% | 0% | 0% | 0% | 100%
memory0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
40 32 2
33 29 1
94 26 3
69 25 1
37 23 2
42 23 2
71 22 2
37 20 2
99 20 3
38 20 2
45 20 1
29 19 1
26 18 1
23 17 1
24 16 1
34 16 2
33 15 3
71 14 2
65 13 5
27 12 3
30 11 4
16 11 5
49 11 2
24 11 1
51 11 8
19 11 3
20 11 1
17 10 1
27 10 2
26 10 2
32 10 2
42 10 5
25 10 2
24 10 1
13 10 2
35 10 2
33 10 3
22 10 3
28 9 2
12 9 6
25 9 2
15 9 1
17 9 3
21 9 2
29 9 1
16 9 1
13 9 2
20 9 2
35 9 1
17 8 3