summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2022-12-27 19:00:59 +0300
committerJosh Poimboeuf <jpoimboe@kernel.org>2023-02-01 20:15:23 +0300
commit8045b8f0b17edf375849f83c80dd05194850b6ed (patch)
tree24aa73268610f0191db29d47503f49490824edca /tools/perf/scripts/python
parentcfd66e81799f4a2fdc6447fa99bdb1871f45ff08 (diff)
downloadlinux-8045b8f0b17edf375849f83c80dd05194850b6ed.tar.xz
objtool: Allocate multiple structures with calloc()
By using calloc() instead of malloc() in a loop, libc does not have to keep around bookkeeping information for each single structure. This reduces maximum memory usage while processing vmlinux.o from 3153325 KB to 3035668 KB (-3.7%) on my notebooks "localmodconfig". Note this introduces memory leaks, because some additional structs get added to the lists later after reading the symbols and sections from the original object. Luckily we don't really care about memory leaks in objtool. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20221216-objtool-memory-v2-3-17968f85a464@weissschuh.net Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions