Linux / Drivers / Clk
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 5,610 units with 103,229 lines of code in units (26.1% of code).
    • 0 very complex units (0 lines of code)
    • 14 complex units (2,673 lines of code)
    • 160 medium complex units (11,227 lines of code)
    • 502 simple units (17,742 lines of code)
    • 4,934 very simple units (71,587 lines of code)
0% | 2% | 10% | 17% | 69%
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% | 2% | 10% | 17% | 69%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT0% | 6% | 11% | 23% | 58%
imx0% | 5% | 6% | 3% | 84%
at910% | 7% | 32% | 14% | 44%
ti0% | 3% | 15% | 25% | 55%
samsung0% | 4% | 17% | 14% | 63%
berlin0% | 34% | 15% | 0% | 49%
mvebu0% | 6% | 12% | 24% | 56%
qcom0% | 0% | 8% | 23% | 68%
tegra0% | 0% | 7% | 24% | 67%
renesas0% | 0% | 18% | 25% | 55%
bcm0% | 0% | 14% | 26% | 58%
ux5000% | 0% | 49% | 7% | 42%
zynq0% | 0% | 63% | 12% | 24%
sunxi0% | 0% | 12% | 48% | 38%
ingenic0% | 0% | 22% | 7% | 70%
rockchip0% | 0% | 11% | 3% | 84%
sunxi-ng0% | 0% | 1% | 4% | 94%
socfpga0% | 0% | 15% | 21% | 62%
st0% | 0% | 14% | 26% | 58%
versatile0% | 0% | 34% | 24% | 41%
nxp0% | 0% | 13% | 25% | 60%
davinci0% | 0% | 12% | 17% | 69%
mmp0% | 0% | 5% | 24% | 70%
pistachio0% | 0% | 26% | 0% | 73%
sprd0% | 0% | 3% | 1% | 94%
axis0% | 0% | 61% | 38% | 0%
keystone0% | 0% | 12% | 55% | 32%
microchip0% | 0% | 13% | 17% | 69%
xilinx0% | 0% | 27% | 0% | 72%
analogbits0% | 0% | 44% | 16% | 39%
starfive0% | 0% | 33% | 0% | 66%
mstar0% | 0% | 80% | 0% | 20%
meson0% | 0% | 4% | 24% | 71%
ralink0% | 0% | 22% | 16% | 61%
zynqmp0% | 0% | 5% | 21% | 72%
pxa0% | 0% | 4% | 0% | 95%
hisilicon0% | 0% | 0% | 16% | 83%
mediatek0% | 0% | 0% | 7% | 92%
baikal-t10% | 0% | 0% | 18% | 81%
x860% | 0% | 0% | 21% | 78%
visconti0% | 0% | 0% | 27% | 72%
axs10x0% | 0% | 0% | 30% | 69%
h83000% | 0% | 0% | 51% | 48%
imgtec0% | 0% | 0% | 93% | 6%
sifive0% | 0% | 0% | 14% | 85%
actions0% | 0% | 0% | 2% | 97%
uniphier0% | 0% | 0% | 32% | 67%
spear0% | 0% | 0% | 0% | 100%
mxs0% | 0% | 0% | 0% | 100%
loongson10% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
156 46 3
233 42 2
174 42 1
202 41 2
203 35 1
427 33 1
198 33 1
160 32 2
185 32 1
181 30 1
149 29 1
112 28 1
141 28 2
152 27 2
106 25 6
138 25 3
86 25 3
135 24 1
148 24 1
136 24 1
66 23 2
135 23 1
99 22 3
115 22 2
322 21 1
72 21 2
119 21 1
129 21 2
30 21 2
104 20 2
53 20 4
85 20 1
63 20 1
117 20 1
58 20 2
320 19 1
54 19 1
80 19 2
166 19 1
64 19 6
110 19 1
371 18 1
59 18 2
92 18 3
89 18 1
88 18 1
66 18 1
107 18 1
79 18 1
96 18 1