Linux / Scripts
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 961 files with 129,381 lines of code.
    • 16 very long files (26,366 lines of code)
    • 33 long files (23,428 lines of code)
    • 119 medium size files (35,888 lines of codeclsfd_ftr_w_mp_ins)
    • 160 small files (22,717 lines of code)
    • 633 very small files (20,982 lines of code)
20% | 18% | 27% | 17% | 16%
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
c36% | 33% | 23% | 4% | 2%
pl63% | 11% | 14% | 7% | 1%
h7% | 13% | 32% | 23% | 22%
cc100% | 0% | 0% | 0% | 0%
y0% | 71% | 28% | 0% | 0%
glade0% | 100% | 0% | 0% | 0%
py0% | 20% | 19% | 41% | 18%
cocci0% | 0% | 22% | 31% | 45%
l0% | 0% | 100% | 0% | 0%
in0% | 0% | 0% | 0% | 100%
S0% | 0% | 0% | 0% | 100%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
ROOT50% | 24% | 17% | 5% | 1%
dtc9% | 15% | 33% | 21% | 20%
kconfig40% | 35% | 18% | 3% | 1%
mod81% | 0% | 13% | 3% | 1%
genksyms0% | 43% | 48% | 0% | 7%
gcc-plugins0% | 27% | 41% | 17% | 13%
coccinelle0% | 0% | 22% | 31% | 45%
gdb0% | 0% | 0% | 69% | 30%
selinux0% | 0% | 0% | 100% | 0%
basic0% | 0% | 0% | 100% | 0%
clang-tools0% | 0% | 0% | 72% | 27%
tracing0% | 0% | 0% | 0% | 100%
Longest Files (Top 50)
File# lines# units
6097 72
2196 62
modpost.c
in mod
1985 61
checks.c
in dtc
1633 69
qconf.cc
in kconfig
1582 61
nconf.c
in kconfig
1364 36
1361 14
exynos5433.h
in dtc/include-prefixes/dt-bindings/clock
1298 -
1216 66
gconf.c
in kconfig
1212 39
mt8192-pinfunc.h
in dtc/include-prefixes/dt-bindings/pinctrl
1115 -
mt6797-pinfunc.h
in dtc/include-prefixes/dt-bindings/pinctrl
1095 -
mt8135-pinfunc.h
in dtc/include-prefixes/dt-bindings/pinctrl
1083 -
expr.c
in kconfig
1072 17
symbol.c
in kconfig
1034 21
mt6779-pinfunc.h
in dtc/include-prefixes/dt-bindings/pinctrl
1023 -
unifdef.c
in root
950 9
mconf.c
in kconfig
949 19
pads-imx8qm.h
in dtc/include-prefixes/dt-bindings/pinctrl
947 -
mt8183-pinfunc.h
in dtc/include-prefixes/dt-bindings/pinctrl
931 -
confdata.c
in kconfig
913 30
849 10
rk3568-cru.h
in dtc/include-prefixes/dt-bindings/clock
839 -
mt8195-pinfunc.h
in dtc/include-prefixes/dt-bindings/pinctrl
810 -
conf.c
in kconfig
783 15
763 32
mt8195-gce.h
in dtc/include-prefixes/dt-bindings/gce
763 -
mt8195-clk.h
in dtc/include-prefixes/dt-bindings/clock
758 -
linux-event-codes.h
in dtc/include-prefixes/dt-bindings/input
757 -
genksyms.c
in genksyms
741 18
pads-imx8qxp.h
in dtc/include-prefixes/dt-bindings/pinctrl
738 -
731 27
mt8365-pinfunc.h
in dtc/include-prefixes/dt-bindings/pinctrl
707 -
get_abi.pl
in root
694 13
689 28
rk3399-cru.h
in dtc/include-prefixes/dt-bindings/clock
674 -
fdt_ro.c
in dtc/libfdt
650 25
pads-imx8dxl.h
in dtc/include-prefixes/dt-bindings/pinctrl
628 -
y
parser.y
in kconfig
613 -
rsrc.h
in dtc/include-prefixes/dt-bindings/firmware/imx
613 -
menu.c
in kconfig
603 24
glade
gconf.glade
in kconfig
603 -
kallsyms.c
in root
556 26
bpf_doc.py
in root
546 35
util.c
in kconfig/lxdialog
542 34
541 16
527 21
511 -
nconf.gui.c
in kconfig
509 9
mt8192-clk.h
in dtc/include-prefixes/dt-bindings/clock
497 -
Files With Most Units (Top 50)
File# lines# units
6097 72
checks.c
in dtc
1633 69
1216 66
2196 62
qconf.cc
in kconfig
1582 61
modpost.c
in mod
1985 61
gconf.c
in kconfig
1212 39
nconf.c
in kconfig
1364 36
bpf_doc.py
in root
546 35
util.c
in kconfig/lxdialog
542 34
763 32
478 31
confdata.c
in kconfig
913 30
689 28
731 27
kallsyms.c
in root
556 26
fdt_ro.c
in dtc/libfdt
650 25
menu.c
in kconfig
603 24
fdt_rw.c
in dtc/libfdt
380 24
gcc-common.h
in gcc-plugins
365 24
device.py
in gdb/linux
127 21
symbol.c
in kconfig
1034 21
527 21
312 20
313 20
mconf.c
in kconfig
949 19
genksyms.c
in genksyms
741 18
utils.py
in gdb/linux
126 18
libfdt.h
in dtc/libfdt
351 18
data.c
in dtc
187 18
323 18
expr.c
in kconfig
1072 17
fdt_sw.c
in dtc/libfdt
265 17
388 17
proc.py
in gdb/linux
162 16
541 16
227 16
cpus.py
in gdb/linux
119 15
conf.c
in kconfig
783 15
fdt_overlay.c
in dtc/libfdt
467 15
stackleak_plugin.c
in gcc-plugins
342 15
rbtree.py
in gdb/linux
101 14
util.c
in dtc
350 14
1361 14
fdt.c
in dtc/libfdt
254 13
get_abi.pl
in root
694 13
tasks.py
in gdb/linux
75 11
fixdep.c
in basic
197 11
849 10
unifdef.c
in root
950 9
Files With Long Lines (Top 15)

There are 15 files with lines longer than 120 characters. In total, there are 105 long lines.

File# lines# units# long lines
6097 72 67
glade
gconf.glade
in kconfig
603 - 11
731 27 5
gcc-common.h
in gcc-plugins
365 24 4
287 5 3
cocci
flexible_array.cocci
in coccinelle/misc
95 - 2
cocci
pci_free_consistent.cocci
in coccinelle/free
46 - 2
cocci
eno.cocci
in coccinelle/null
40 - 2
cocci
kfree_mismatch.cocci
in coccinelle/api
191 - 2
checks.c
in dtc
1633 69 2
cocci
stream_open.cocci
in coccinelle/api
320 - 1
388 17 1
structleak_plugin.c
in gcc-plugins
168 8 1
get_abi.pl
in root
694 13 1
2196 62 1