Linux / Drivers / Iommu
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 1,817 units with 30,290 lines of code in units (68.8% of code).
    • 0 very complex units (0 lines of code)
    • 5 complex units (769 lines of code)
    • 73 medium complex units (4,834 lines of code)
    • 238 simple units (7,541 lines of code)
    • 1,501 very simple units (17,146 lines of code)
0% | 2% | 15% | 24% | 56%
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% | 16% | 25% | 56%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
arm0% | 10% | 13% | 20% | 55%
amd0% | 4% | 12% | 25% | 58%
ROOT0% | 0% | 16% | 23% | 60%
intel0% | 0% | 19% | 30% | 50%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
152 46 1
146 45 1
149 34 3
203 27 2
119 26 1
87 25 1
127 25 1
77 24 2
90 24 4
101 24 3
111 22 1
97 22 3
54 22 2
97 22 2
90 22 1
93 21 3
73 21 1
81 20 4
85 20 1
93 19 5
75 19 2
127 19 1
80 19 1
62 18 1
77 18 3
63 18 1
74 18 1
103 18 2
80 18 1
89 17 1
64 17 1
78 17 1
60 17 2
63 16 4
63 16 5
73 16 1
71 16 3
64 16 1
63 16 1
93 15 1
69 15 1
80 15 2
29 14 1
82 14 2
42 14 2
78 14 1
55 13 1
42 13 1
56 13 1
95 13 1