Linux / Drivers / Dma
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,429 units with 66,987 lines of code in units (61.9% of code).
    • 0 very complex units (0 lines of code)
    • 19 complex units (3,111 lines of code)
    • 184 medium complex units (14,061 lines of code)
    • 375 simple units (14,116 lines of code)
    • 2,851 very simple units (35,699 lines of code)
0% | 4% | 20% | 21% | 53%
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% | 4% | 21% | 21% | 52%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT0% | 3% | 20% | 21% | 53%
ti0% | 14% | 20% | 22% | 41%
xilinx0% | 9% | 14% | 26% | 48%
sh0% | 8% | 14% | 13% | 63%
ioat0% | 11% | 26% | 18% | 43%
ppc4xx0% | 5% | 46% | 14% | 32%
qcom0% | 0% | 24% | 23% | 51%
dw-edma0% | 0% | 39% | 10% | 50%
idxd0% | 0% | 9% | 26% | 63%
mediatek0% | 0% | 23% | 7% | 68%
ipu0% | 0% | 22% | 27% | 50%
dw0% | 0% | 17% | 15% | 67%
dw-axi-dmac0% | 0% | 19% | 19% | 61%
lgm0% | 0% | 18% | 8% | 72%
fsl-dpaa2-qdma0% | 0% | 23% | 11% | 65%
ptdma0% | 0% | 12% | 20% | 67%
bestcomm0% | 0% | 0% | 73% | 26%
sf-pdma0% | 0% | 0% | 25% | 74%
hsu0% | 0% | 0% | 24% | 75%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
203 50 1
309 48 1
219 44 1
181 44 1
158 38 1
206 37 1
127 35 1
233 35 2
144 33 1
167 33 1
139 30 3
136 30 1
138 29 1
83 29 2
159 29 1
116 28 2
154 27 1
117 26 1
122 26 1
177 25 1
97 25 2
115 25 1
148 25 2
104 25 2
159 25 1
153 24 2
99 24 3
100 24 3
68 23 3
92 23 1
133 23 1
124 23 1
153 23 1
119 23 1
83 22 1
138 22 1
94 22 1
148 22 1
151 22 1
28 21 2
118 21 1
109 20 5
54 20 1
90 20 2
95 20 2
125 20 1
55 20 1
77 20 1
89 20 2
68 20 2