Linux / Tools
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 2,673 files with 506,853 lines of code.
    • 89 very long files (185,873 lines of code)
    • 139 long files (97,059 lines of code)
    • 329 medium size files (104,449 lines of codeclsfd_ftr_w_mp_ins)
    • 423 small files (60,356 lines of code)
    • 1,693 very small files (59,116 lines of code)
36% | 19% | 20% | 11% | 11%
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
c40% | 18% | 20% | 11% | 8%
py50% | 18% | 16% | 6% | 8%
h12% | 22% | 20% | 15% | 29%
pl75% | 11% | 0% | 6% | 6%
po0% | 100% | 0% | 0% | 0%
y0% | 80% | 15% | 0% | 4%
S0% | 0% | 49% | 23% | 27%
awk0% | 0% | 100% | 0% | 0%
l0% | 0% | 52% | 42% | 4%
cpp0% | 0% | 0% | 61% | 38%
pm0% | 0% | 0% | 67% | 32%
cfg0% | 0% | 0% | 0% | 100%
boot0% | 0% | 0% | 0% | 100%
xs0% | 0% | 0% | 0% | 100%
PL0% | 0% | 0% | 0% | 100%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
perf52% | 15% | 16% | 6% | 8%
testing20% | 19% | 26% | 17% | 16%
lib55% | 16% | 15% | 6% | 6%
power46% | 28% | 10% | 9% | 4%
include33% | 26% | 8% | 11% | 19%
bpf28% | 38% | 21% | 7% | 3%
objtool47% | 26% | 0% | 15% | 10%
vm92% | 0% | 0% | 7% | 0%
tracing33% | 35% | 23% | 2% | 4%
hv69% | 0% | 18% | 12% | 0%
arch0% | 19% | 44% | 16% | 19%
iio0% | 69% | 19% | 7% | 2%
usb0% | 20% | 49% | 20% | 9%
firewire0% | 69% | 0% | 26% | 4%
thermal0% | 0% | 86% | 9% | 4%
io_uring0% | 0% | 65% | 13% | 20%
virtio0% | 0% | 28% | 43% | 28%
accounting0% | 0% | 100% | 0% | 0%
bootconfig0% | 0% | 91% | 0% | 8%
edid0% | 0% | 51% | 0% | 48%
firmware0% | 0% | 100% | 0% | 0%
cgroup0% | 0% | 38% | 51% | 10%
pci0% | 0% | 100% | 0% | 0%
gpio0% | 0% | 25% | 58% | 15%
build0% | 0% | 0% | 28% | 71%
laptop0% | 0% | 0% | 100% | 0%
wmi0% | 0% | 0% | 100% | 0%
spi0% | 0% | 0% | 100% | 0%
leds0% | 0% | 0% | 0% | 100%
counter0% | 0% | 0% | 0% | 100%
rcu0% | 0% | 0% | 0% | 100%
pcmcia0% | 0% | 0% | 0% | 100%
memory-model0% | 0% | 0% | 0% | 100%
Longest Files (Top 50)
File# lines# units
libbpf.c
in lib/bpf
9229 272
btf.c
in testing/selftests/bpf/prog_tests
6489 21
sleepgraph.py
in power/pm-graph
6204 209
event-parse.c
in lib/traceevent
5701 146
turbostat.c
in power/x86/turbostat
4957 158
3919 142
exported-sql-viewer.py
in perf/scripts/python
3741 456
3440 107
intel-pt-decoder.c
in perf/util/intel-pt-decoder
3371 104
ktest.pl
in testing/ktest
3361 101
header.c
in perf/util
3246 145
btf.c
in lib/bpf
3207 133
seccomp_bpf.c
in testing/selftests/seccomp
3201 19
intel-pt.c
in perf/util
3184 119
probe-event.c
in perf/util
3020 86
hists.c
in perf/ui/browsers
2972 87
2809 90
parse-events.c
in perf/util
2730 82
sort.c
in perf/util
2619 123
annotate.c
in perf/util
2493 110
isst-config.c
in power/x86/intel-speed-select
2465 94
check.c
in objtool
2453 71
2432 59
machine.c
in perf/util
2414 96
2278 84
evsel.c
in perf/util
2273 93
auxtrace.c
in perf/util
2232 108
hist.c
in perf/util
2226 82
linker.c
in lib/bpf
2131 43
session.c
in perf/util
2043 105
nolibc.h
in include/nolibc
2033 107
2012 77
prog.c
in bpf/bpftool
2004 43
cs-etm.c
in perf/util
1978 73
symbol.c
in perf/util
1964 75
ipsec.c
in testing/selftests/net
1907 56
symbol-elf.c
in perf/util
1823 70
synthetic-events.c
in perf/util
1763 54
nettest.c
in testing/selftests/net
1761 53
calls.c
in testing/selftests/bpf/verifier
1761 -
latency-collector.c
in tracing/latency
1719 83
parse-filter.c
in lib/traceevent
1710 29
1657 33
trace-event-python.c
in perf/util/scripting-engines
1648 59
sockmap_listen.c
in testing/selftests/bpf/prog_tests
1643 55
1643 58
btf_dump.c
in lib/bpf
1636 52
evlist.c
in perf/util
1634 96
probe-finder.c
in perf/util
1626 47
1584 57
Files With Most Units (Top 50)
File# lines# units
exported-sql-viewer.py
in perf/scripts/python
3741 456
libbpf.c
in lib/bpf
9229 272
sleepgraph.py
in power/pm-graph
6204 209
turbostat.c
in power/x86/turbostat
4957 158
event-parse.c
in lib/traceevent
5701 146
header.c
in perf/util
3246 145
3919 142
btf.c
in lib/bpf
3207 133
sort.c
in perf/util
2619 123
intel-pt.c
in perf/util
3184 119
annotate.c
in perf/util
2493 110
auxtrace.c
in perf/util
2232 108
nolibc.h
in include/nolibc
2033 107
3440 107
session.c
in perf/util
2043 105
intel-pt-decoder.c
in perf/util/intel-pt-decoder
3371 104
ktest.pl
in testing/ktest
3361 101
machine.c
in perf/util
2414 96
evlist.c
in perf/util
1634 96
isst-config.c
in power/x86/intel-speed-select
2465 94
evsel.c
in perf/util
2273 93
2809 90
kvm_util.c
in testing/selftests/kvm/lib
1378 88
hists.c
in perf/ui/browsers
2972 87
probe-event.c
in perf/util
3020 86
2278 84
latency-collector.c
in tracing/latency
1719 83
hist.c
in perf/util
2226 82
parse-events.c
in perf/util
2730 82
2012 77
symbol.c
in perf/util
1964 75
cs-etm.c
in perf/util
1978 73
check.c
in objtool
2453 71
symbol-elf.c
in perf/util
1823 70
sched-migration.py
in perf/scripts/python
342 64
bpf.c
in lib/bpf
965 61
protection_keys.c
in testing/selftests/vm
1183 60
2432 59
dso.c
in perf/util
1043 59
trace-event-python.c
in perf/util/scripting-engines
1648 59
1643 58
xdpxceiver.c
in testing/selftests/bpf
1117 57
1584 57
x86_energy_perf_policy.c
in power/x86/x86_energy_perf_policy
1187 56
ipsec.c
in testing/selftests/net
1907 56
pmu.c
in perf/util
1497 56
sockmap_listen.c
in testing/selftests/bpf/prog_tests
1643 55
synthetic-events.c
in perf/util
1763 54
nettest.c
in testing/selftests/net
1761 53
btf_dump.c
in lib/bpf
1636 52
Files With Long Lines (Top 50)

There are 75 files with lines longer than 120 characters. In total, there are 377 long lines.

File# lines# units# long lines
exported-sql-viewer.py
in perf/scripts/python
3741 456 72
intel_pstate_tracer.py
in power/x86/intel_pstate_tracer
436 27 29
svghelper.c
in perf/util
626 30 28
i915_drm.h
in include/uapi/drm
1003 - 27
synthetic-events.h
in perf/util
103 1 23
sleepgraph.py
in power/pm-graph
6204 209 21
parse-options.h
in lib/subcmd
163 - 19
export-to-sqlite.py
in perf/scripts/python
645 32 14
export-to-postgresql.py
in perf/scripts/python
812 38 11
3919 142 9
align.c
in testing/selftests/bpf/prog_tests
505 3 7
btf.c
in testing/selftests/bpf/prog_tests
6489 21 7
ptrace_syscall.c
in testing/selftests/x86
334 11 6
libbpf.c
in lib/bpf
9229 272 5
2809 90 5
2432 59 4
turbostat.c
in power/x86/turbostat
4957 158 3
isst-config.c
in power/x86/intel-speed-select
2465 94 3
timerlat_top.c
in tracing/rtla/src
467 6 3
init.c
in testing/selftests/wireguard/qemu
257 11 3
numa.c
in perf/bench
1326 39 3
l
parse-events.l
in perf/util
354 - 3
2278 84 3
bootgraph.py
in power/pm-graph
935 29 2
isst-core.c
in power/x86/intel-speed-select
841 33 2
setns-sysvipc.c
in testing/selftests/proc
91 2 2
rseq-arm.h
in testing/selftests/rseq
687 8 2
mptcp_connect.c
in testing/selftests/net/mptcp
1079 45 2
btf.h
in lib/bpf
354 29 2
hists.c
in perf/ui/browsers
2972 87 2
beauty.h
in perf/trace/beauty
157 - 2
seccomp.c
in perf/trace/beauty
43 2 2
sync_file_range.c
in perf/trace/beauty
19 2 2
open_flags.c
in perf/trace/beauty
74 2 2
sort.c
in perf/util
2619 123 2
cs-etm.c
in perf/util
1978 73 2
tracepoint.py
in perf/python
36 2 2
bpf.h
in perf/include/bpf
43 1 2
SchedGui.py
in perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace
132 16 2
prog.c
in bpf/bpftool
2004 43 2
x86_energy_perf_policy.c
in power/x86/x86_energy_perf_policy
1187 56 1
asound.h
in include/uapi/sound
947 - 1
rseq-x86.h
in testing/selftests/rseq
1105 19 1
rseq-s390.h
in testing/selftests/rseq
493 8 1
rseq-ppc.h
in testing/selftests/rseq
582 8 1
aliasing-test.c
in testing/selftests/ia64
193 5 1
udpgso_bench_tx.c
in testing/selftests/net
604 20 1
strlen.c
in testing/selftests/powerpc/stringloops
94 4 1
nsPlugin.py
in testing/selftests/tc-testing/plugin-lib
129 11 1
seccomp_bpf.c
in testing/selftests/seccomp
3201 19 1