Linux / Drivers / Gpu
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 43,403 units with 930,666 lines of code in units (23.4% of code).
    • 107 very complex units (42,513 lines of code)
    • 460 complex units (66,762 lines of code)
    • 2,646 medium complex units (181,806 lines of code)
    • 5,500 simple units (199,613 lines of code)
    • 34,690 very simple units (439,972 lines of code)
4% | 7% | 19% | 21% | 47%
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
c4% | 7% | 20% | 21% | 45%
h0% | 0% | <1% | 5% | 93%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
drm4% | 7% | 19% | 21% | 47%
ipu-v30% | 9% | 14% | 24% | 51%
vga0% | 16% | 12% | 18% | 52%
host1x0% | 0% | 8% | 16% | 74%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
1760 414 1
1751 412 1
1521 397 1
1653 393 1
1586 384 1
639 303 3
862 300 1
504 210 4
734 195 1
1506 191 1
804 189 2
410 186 3
1496 175 1
252 166 3
387 162 4
587 142 2
509 134 3
477 131 1
1217 130 1
1129 121 1
1241 120 1
367 119 3
134 111 3
118 109 1
332 107 4
367 106 1
149 98 3
276 94 4
128 91 6
128 91 6
238 87 3
349 87 1
285 85 4
463 84 3
340 84 4
215 82 7
242 81 22
278 80 22
165 80 3
150 77 2
232 77 2
400 76 1
152 74 5
152 74 5
127 72 6
320 71 5
321 70 2
210 69 2
199 69 6
197 69 6