Linux / Include
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 5,652 files with 698,731 lines of code.
    • 77 very long files (137,042 lines of code)
    • 164 long files (113,870 lines of code)
    • 615 medium size files (189,819 lines of codeclsfd_ftr_w_mp_ins)
    • 842 small files (119,205 lines of code)
    • 3,954 very small files (138,795 lines of code)
19% | 16% | 27% | 17% | 19%
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
h19% | 16% | 27% | 17% | 19%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
linux23% | 15% | 27% | 15% | 18%
net32% | 13% | 26% | 15% | 13%
uapi13% | 21% | 22% | 17% | 24%
trace35% | 8% | 28% | 14% | 12%
dt-bindings8% | 13% | 31% | 23% | 22%
rdma33% | 14% | 25% | 13% | 12%
video29% | 16% | 30% | 16% | 8%
acpi32% | 22% | 28% | 7% | 9%
drm12% | 10% | 29% | 21% | 25%
sound6% | 18% | 33% | 17% | 23%
soc0% | 55% | 8% | 20% | 16%
asm-generic0% | 34% | 10% | 11% | 43%
scsi0% | 29% | 38% | 18% | 12%
math-emu0% | 51% | 18% | 24% | 5%
kunit0% | 84% | 0% | 12% | 3%
media0% | 4% | 38% | 25% | 30%
xen0% | 0% | 29% | 34% | 36%
pcmcia0% | 0% | 60% | 26% | 12%
crypto0% | 0% | 11% | 32% | 55%
ras0% | 0% | 100% | 0% | 0%
clocksource0% | 0% | 57% | 0% | 42%
kvm0% | 0% | 46% | 20% | 32%
misc0% | 0% | 0% | 39% | 60%
keys0% | 0% | 0% | 0% | 100%
vdso0% | 0% | 0% | 0% | 100%
memory0% | 0% | 0% | 0% | 100%
Longest Files (Top 50)
File# lines# units
mlx5_ifc.h
in linux/mlx5
8260 -
registers.h
in linux/mfd/arizona
6184 -
registers.h
in linux/mfd/wm8994
3834 -
netdevice.h
in linux
3161 173
palmas.h
in linux/mfd
2981 6
registers.h
in linux/mfd/madera
2964 -
ib_verbs.h
in rdma
2959 97
cros_ec_commands.h
in linux/platform_data
2901 -
pci_ids.h
in linux
2756 -
skbuff.h
in linux
2740 260
2718 27
ieee80211.h
in linux
2554 59
fs.h
in linux
2409 167
ext4.h
in trace/events
2309 -
mm.h
in linux
2191 216
hci.h
in net/bluetooth
2134 1
atomic-arch-fallback.h
in linux/atomic
1953 -
sock.h
in net
1903 155
sunrpc.h
in trace/events
1880 -
nl80211.h
in uapi/linux
1860 -
bpf.h
in linux
1832 86
rpcrdma.h
in trace/events
1816 -
1790 18
radeon.h
in video
1787 -
btrfs.h
in trace/events
1787 -
atomic-instrumented.h
in linux/atomic
1761 -
cec-funcs.h
in uapi/linux
1694 150
security.h
in linux
1691 247
pci.h
in linux
1672 109
tcp.h
in net
1658 126
f2fs.h
in trace/events
1650 -
xfrm.h
in net
1618 91
1598 7
videodev2.h
in uapi/linux
1592 1
greybus_protocols.h
in linux/greybus
1578 -
actbl2.h
in acpi
1528 -
kvm.h
in uapi/linux
1522 -
nfs_xdr.h
in linux
1520 1
hci_core.h
in net/bluetooth
1502 32
libata.h
in linux
1491 58
v4l2-controls.h
in uapi/linux
1482 -
kvm_host.h
in linux
1443 73
nvme.h
in linux
1386 2
bpf.h
in uapi/linux
1374 -
sched.h
in linux
1373 69
iscsi_common.h
in linux/qed
1351 -
device.h
in linux/mlx4
1322 13
rxrpc.h
in trace/events
1321 -
ip_vs.h
in net
1308 65
exynos5433.h
in dt-bindings/clock
1298 -
Files With Most Units (Top 50)
File# lines# units
skbuff.h
in linux
2740 260
security.h
in linux
1691 247
mm.h
in linux
2191 216
netdevice.h
in linux
3161 173
fs.h
in linux
2409 167
sock.h
in net
1903 155
cec-funcs.h
in uapi/linux
1694 150
tcp.h
in net
1658 126
memcontrol.h
in linux
1157 118
pci.h
in linux
1672 109
acpi.h
in linux
1125 107
pgtable.h
in linux
1091 104
of.h
in linux
1076 102
ib_verbs.h
in rdma
2959 97
audit.h
in linux
622 95
xfrm.h
in net
1618 91
io.h
in asm-generic
893 86
bpf.h
in linux
1832 86
netlink.h
in net
792 79
blkdev.h
in linux
960 79
dbx500-prcmu.h
in linux/mfd
432 78
hugetlb.h
in linux
831 76
kvm_host.h
in linux
1443 73
pm_runtime.h
in linux
256 71
1023 70
sched.h
in linux
1373 69
pagemap.h
in linux
713 67
fscrypt.h
in linux
542 67
iommu.h
in linux
733 66
irq.h
in linux
800 66
cpumask.h
in linux
516 66
ip_vs.h
in net
1308 65
ntb.h
in linux
599 64
vmstat.h
in linux
509 63
dmaengine.h
in linux
937 61
cgroup.h
in linux
481 61
ipv6.h
in net
934 60
perf_event.h
in linux
1003 60
tick.h
in linux
263 59
ieee80211.h
in linux
2554 59
libata.h
in linux
1491 58
phy.h
in linux
973 56
swapops.h
in linux
287 55
ftrace.h
in linux
638 55
kasan.h
in linux
379 55
ata.h
in linux
845 54
v4l2-tpg.h
in media/tpg
529 54
pm_opp.h
in linux
399 53
441 53
suspend.h
in linux
310 51
Files With Long Lines (Top 50)

There are 63 files with lines longer than 120 characters. In total, there are 208 long lines.

File# lines# units# long lines
efi.h
in linux
972 22 45
i915_drm.h
in uapi/drm
1003 - 27
zstd_lib.h
in linux
499 - 17
nouveau_drm.h
in uapi/drm
142 - 7
tegra_drm.h
in uapi/drm
250 - 6
etnaviv_drm.h
in uapi/drm
189 - 6
vc4_drm.h
in uapi/drm
221 - 5
radeon_drm.h
in uapi/drm
790 - 5
panfrost_drm.h
in uapi/drm
124 - 5
amdgpu_drm.h
in uapi/drm
677 - 5
pm_opp.h
in linux
399 53 5
emu10k1.h
in sound
1208 1 4
vmscan.h
in trace/events
389 - 3
wait_bit.h
in linux
184 1 3
465 - 2
msm_drm.h
in uapi/drm
194 - 2
savage_drm.h
in uapi/drm
140 - 2
actypes.h
in acpi
663 - 2
sock.h
in trace/events
215 - 2
net.h
in trace/events
245 - 2
filelock.h
in trace/events
197 - 2
ocelot.h
in soc/mscc
809 2 2
audit.h
in linux
622 95 2
uprobes.h
in linux
168 10 2
security.h
in linux
1691 247 2
75 14 2
module.h
in linux
568 39 2
syscalls.h
in linux
1122 9 2
gus.h
in sound
468 9 2
info.h
in sound
170 18 2
v3d_drm.h
in uapi/drm
253 - 1
zorro_ids.h
in uapi/linux
428 - 1
soundcard.h
in uapi/linux
754 - 1
md_p.h
in uapi/linux/raid
249 1 1
firewire.h
in uapi/sound
144 - 1
asound.h
in uapi/sound
948 - 1
tcp.h
in trace/events
272 - 1
devlink.h
in trace/events
173 2 1
mptcp.h
in trace/events
142 - 1
79 - 1
btrfs.h
in trace/events
1787 - 1
fib.h
in trace/events
83 - 1
kmem.h
in trace/events
298 1 1
fib6.h
in trace/events
73 - 1
thp.h
in trace/events
38 - 1
oom.h
in trace/events
148 - 1
migrate.h
in trace/events
79 - 1
mce.h
in trace/events
63 - 1
sched.h
in trace/events
464 1 1
irq_matrix.h
in trace/events
140 - 1