Linux / Kernel
File Size

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

Intro
  • File size measurements show the distribution of size of files.
  • Files are classified in four categories based on their size (lines of code): 1-100 (very small files), 101-200 (small files), 201-500 (medium size files), 501-1000 (long files), 1001+(very long files).
  • It is a good practice to keep files small. Long files may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
File Size Overall
  • There are 461 files with 266,447 lines of code.
    • 63 very long files (157,430 lines of code)
    • 79 long files (54,896 lines of code)
    • 115 medium size files (36,234 lines of codeclsfd_ftr_w_mp_ins)
    • 81 small files (12,331 lines of code)
    • 123 very small files (5,556 lines of code)
59% | 20% | 13% | 4% | 2%
Legend:
1001+
501-1000
201-500
101-200
1-100


explore: zoomable circles | sunburst | 3D view
File Size per Extension
1001+
501-1000
201-500
101-200
1-100
c60% | 20% | 13% | 4% | 1%
h37% | 14% | 22% | 13% | 12%
S0% | 0% | 0% | 0% | 100%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
trace75% | 13% | 8% | 1% | 1%
ROOT51% | 24% | 15% | 5% | 1%
bpf71% | 11% | 13% | 2% | 1%
sched75% | 10% | 5% | 7% | 1%
events88% | 4% | 3% | 3% | 0%
rcu55% | 31% | 9% | 2% | 1%
cgroup67% | 9% | 18% | 5% | 0%
locking35% | 37% | 11% | 9% | 5%
time28% | 46% | 16% | 3% | 4%
power43% | 23% | 27% | 2% | 2%
irq31% | 24% | 29% | 11% | 3%
printk66% | 20% | 0% | 8% | 4%
debug37% | 39% | 12% | 10% | <1%
dma26% | 28% | 36% | 0% | 8%
futex0% | 48% | 44% | 7% | 0%
livepatch0% | 50% | 20% | 20% | 8%
kcsan0% | 44% | 48% | 0% | 6%
gcov0% | 47% | 38% | 0% | 13%
entry0% | 0% | 73% | 0% | 26%
Longest Files (Top 50)
File# lines# units
10505 332
core.c
in events
8709 386
trace.c
in trace
7015 270
fair.c
in sched
6501 347
core.c
in sched
6161 366
ftrace.c
in trace
5243 187
btf.c
in bpf
5032 179
5009 155
cgroup.c
in cgroup
4080 179
lockdep.c
in locking
4016 191
syscall.c
in bpf
3851 130
module.c
in root
3482 199
3385 117
3199 176
signal.c
in root
3070 132
sysctl.c
in root
2888 65
2819 82
2745 81
tree.c
in rcu
2712 126
printk.c
in printk
2218 110
auditsc.c
in root
2199 77
fork.c
in root
2169 81
kdb_main.c
in debug/kdb
2136 57
sys.c
in root
2090 38
cpuset.c
in cgroup
2075 92
kprobes.c
in root
1959 118
sched.h
in sched
1944 136
rt.c
in sched
1901 116
core.c
in bpf
1828 73
hashtab.c
in bpf
1827 63
cpu.c
in root
1731 110
bpf_trace.c
in trace
1721 28
snapshot.c
in power
1687 100
deadline.c
in sched
1686 113
manage.c
in irq
1614 79
audit.c
in root
1579 73
uprobes.c
in events
1576 72
seccomp.c
in root
1572 63
1562 61
1526 59
topology.c
in sched
1514 53
1512 55
cgroup.c
in bpf
1507 53
blktrace.c
in trace
1442 87
1360 75
trace.h
in trace
1347 56
1328 80
1264 42
1263 56
hrtimer.c
in time
1258 78
Files With Most Units (Top 50)
File# lines# units
core.c
in events
8709 386
core.c
in sched
6161 366
fair.c
in sched
6501 347
10505 332
trace.c
in trace
7015 270
module.c
in root
3482 199
lockdep.c
in locking
4016 191
ftrace.c
in trace
5243 187
cgroup.c
in cgroup
4080 179
btf.c
in bpf
5032 179
3199 176
5009 155
sched.h
in sched
1944 136
signal.c
in root
3070 132
syscall.c
in bpf
3851 130
tree.c
in rcu
2712 126
kprobes.c
in root
1959 118
3385 117
rt.c
in sched
1901 116
deadline.c
in sched
1686 113
cpu.c
in root
1731 110
printk.c
in printk
2218 110
snapshot.c
in power
1687 100
cpuset.c
in cgroup
2075 92
timer.c
in time
1053 90
blktrace.c
in trace
1442 87
2819 82
fork.c
in root
2169 81
2745 81
1328 80
manage.c
in irq
1614 79
hrtimer.c
in time
1258 78
auditsc.c
in root
2199 77
1360 75
audit.c
in root
1579 73
core.c
in bpf
1828 73
uprobes.c
in events
1576 72
863 71
tasks.h
in rcu
1032 68
1024 66
sysctl.c
in root
2888 65
chip.c
in irq
911 65
rwsem.c
in locking
917 64
seccomp.c
in root
1572 63
hashtab.c
in bpf
1827 63
1562 61
915 61
softirq.c
in root
629 60
1526 59
1218 59
Files With Long Lines (Top 19)

There are 19 files with lines longer than 120 characters. In total, there are 35 long lines.

File# lines# units# long lines
568 10 5
854 57 4
tasks.h
in rcu
1032 68 3
2745 81 3
kprobes.c
in root
1959 118 3
1328 80 2
673 31 2
kmod.c
in root
106 3 2
core.c
in kcsan
761 34 1
5009 155 1
locktorture.c
in locking
866 49 1
rwsem.c
in locking
917 64 1
fair.c
in sched
6501 347 1
stats.h
in sched
195 15 1
664 30 1
tree.c
in rcu
2712 126 1
debug.c
in dma
1109 50 1
10505 332 1
smp.c
in root
776 42 1