Linux / Mm
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 147 files with 102,846 lines of code.
    • 32 very long files (71,876 lines of code)
    • 18 long files (12,036 lines of code)
    • 36 medium size files (12,104 lines of codeclsfd_ftr_w_mp_ins)
    • 33 small files (5,328 lines of code)
    • 28 very small files (1,502 lines of code)
69% | 11% | 11% | 5% | 1%
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
c71% | 11% | 11% | 4% | 1%
h0% | 26% | 34% | 28% | 10%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
ROOT74% | 9% | 9% | 4% | 1%
damon0% | 66% | 7% | 23% | 2%
kfence0% | 71% | 0% | 23% | 5%
kasan0% | 0% | 86% | 9% | 4%
Longest Files (Top 50)
File# lines# units
5738 271
4765 234
hugetlb.c
in root
4343 175
slub.c
in root
4177 224
memory.c
in root
3482 131
shmem.c
in root
3097 101
slab.c
in root
2770 109
swapfile.c
in root
2730 111
vmscan.c
in root
2664 103
vmalloc.c
in root
2483 77
mmap.c
in root
2364 80
2279 82
filemap.c
in root
2185 91
2042 74
ksm.c
in root
2016 68
migrate.c
in root
2008 62
percpu.c
in root
1855 65
gup.c
in root
1825 72
1732 67
zsmalloc.c
in root
1706 118
1670 61
vmstat.c
in root
1519 85
1518 76
1366 61
1366 66
rmap.c
in root
1321 53
z3fold.c
in root
1295 47
memblock.c
in root
1179 70
kmemleak.c
in root
1175 62
nommu.c
in root
1155 48
madvise.c
in root
1040 29
zswap.c
in root
1011 39
925 75
831 35
dbgfs.c
in damon
789 30
748 45
core.c
in damon
725 47
oom_kill.c
in root
710 36
mremap.c
in root
705 17
685 37
swap.c
in root
653 49
sparse.c
in root
647 47
util.c
in root
638 36
621 24
slab.h
in root
610 34
610 19
core.c
in kfence
590 28
vaddr.c
in damon
533 26
512 11
mprotect.c
in root
504 11
Files With Most Units (Top 50)
File# lines# units
5738 271
4765 234
slub.c
in root
4177 224
hugetlb.c
in root
4343 175
memory.c
in root
3482 131
zsmalloc.c
in root
1706 118
swapfile.c
in root
2730 111
slab.c
in root
2770 109
vmscan.c
in root
2664 103
shmem.c
in root
3097 101
filemap.c
in root
2185 91
vmstat.c
in root
1519 85
2279 82
mmap.c
in root
2364 80
vmalloc.c
in root
2483 77
1518 76
925 75
2042 74
gup.c
in root
1825 72
memblock.c
in root
1179 70
ksm.c
in root
2016 68
1732 67
1366 66
percpu.c
in root
1855 65
migrate.c
in root
2008 62
kmemleak.c
in root
1175 62
1366 61
1670 61
rmap.c
in root
1321 53
swap.c
in root
653 49
nommu.c
in root
1155 48
sparse.c
in root
647 47
z3fold.c
in root
1295 47
core.c
in damon
725 47
748 45
zswap.c
in root
1011 39
685 37
util.c
in root
638 36
oom_kill.c
in root
710 36
831 35
slab.h
in root
610 34
list_lru.c
in root
495 34
dbgfs.c
in damon
789 30
madvise.c
in root
1040 29
internal.h
in root
430 28
core.c
in kfence
590 28
vaddr.c
in damon
533 26
truncate.c
in root
479 25
common.c
in kasan
362 25
295 25
Files With Long Lines (Top 8)

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

File# lines# units# long lines
filemap.c
in root
2185 91 1
831 35 1
mmap.c
in root
2364 80 1
usercopy.c
in root
167 10 1
mremap.c
in root
705 17 1
oom_kill.c
in root
710 36 1
5738 271 1
kmemleak.c
in root
1175 62 1