Linux / Drivers / Pinctrl
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 3,264 units with 59,504 lines of code in units (16.1% of code).
    • 0 very complex units (0 lines of code)
    • 21 complex units (2,331 lines of code)
    • 212 medium complex units (13,842 lines of code)
    • 370 simple units (13,922 lines of code)
    • 2,661 very simple units (29,409 lines of code)
0% | 3% | 23% | 23% | 49%
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
c0% | 3% | 23% | 23% | 49%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT0% | 2% | 23% | 25% | 48%
qcom0% | 11% | 40% | 9% | 38%
mediatek0% | 11% | 16% | 23% | 48%
sunxi0% | 12% | 10% | 21% | 55%
sprd0% | 18% | 27% | 25% | 28%
mvebu0% | 7% | 10% | 26% | 55%
stm320% | 10% | 11% | 20% | 57%
renesas0% | 2% | 27% | 24% | 44%
bcm0% | 2% | 19% | 24% | 52%
cirrus0% | 8% | 21% | 37% | 33%
intel0% | 0% | 25% | 21% | 53%
nomadik0% | 0% | 33% | 16% | 49%
freescale0% | 0% | 20% | 25% | 53%
samsung0% | 0% | 19% | 18% | 62%
tegra0% | 0% | 31% | 9% | 58%
uniphier0% | 0% | 34% | 26% | 38%
nuvoton0% | 0% | 19% | 34% | 46%
meson0% | 0% | 21% | 18% | 60%
spear0% | 0% | 15% | 34% | 49%
vt85000% | 0% | 17% | 25% | 57%
aspeed0% | 0% | 13% | 29% | 56%
ti0% | 0% | 15% | 29% | 55%
visconti0% | 0% | 32% | 19% | 48%
actions0% | 0% | 7% | 22% | 69%
berlin0% | 0% | 24% | 0% | 75%
ralink0% | 0% | 17% | 31% | 51%
pxa0% | 0% | 0% | 58% | 41%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
150 45 4
107 40 1
125 38 4
100 37 3
124 35 4
137 35 4
89 32 3
56 32 3
162 29 2
122 28 2
117 28 2
99 28 4
132 28 1
99 27 3
102 27 3
121 27 1
76 27 3
95 26 4
157 26 3
88 26 4
73 26 3
78 25 3
81 24 4
105 24 2
134 24 8
83 24 1
59 24 3
92 24 4
123 24 1
81 23 4
89 23 5
82 23 4
75 23 4
112 23 5
112 23 5
166 23 1
105 22 4
129 22 4
98 22 1
87 22 4
64 22 6
74 22 5
113 22 4
58 22 2
58 22 3
85 21 2
61 21 3
69 21 3
73 21 1
96 21 4