Linux / Drivers / Iommu
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 1,817 units with 30,290 lines of code in units (68.8% of code).
    • 10 very long units (1,338 lines of code)
    • 65 long units (4,524 lines of code)
    • 389 medium size units (11,558 lines of code)
    • 521 small units (7,637 lines of code)
    • 832 very small units (5,233 lines of code)
4% | 14% | 38% | 25% | 17%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c4% | 15% | 38% | 25% | 16%
h0% | 0% | 0% | 10% | 89%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
arm14% | 13% | 29% | 26% | 16%
ROOT1% | 11% | 43% | 24% | 18%
amd4% | 14% | 31% | 28% | 20%
intel1% | 21% | 40% | 23% | 13%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
203 27 2
152 46 1
149 34 3
146 45 1
127 19 1
127 25 1
119 26 1
111 22 1
103 18 2
101 24 3
97 22 3
97 22 2
95 13 1
93 19 5
93 21 3
93 15 1
90 24 4
90 22 1
89 17 1
87 25 1
85 20 1
82 14 2
81 20 4
80 19 1
80 15 2
80 18 1
78 17 1
78 14 1
77 18 3
77 24 2
76 12 1
75 12 7
75 19 2
74 18 1
73 16 1
73 21 1
71 16 3
71 7 3
69 15 1
68 12 1
68 10 4
66 12 2
66 5 1
66 11 1
64 17 1
64 16 1
63 16 4
63 16 5
63 18 1
63 16 1