Skip to content
Commit da359f69 authored by Zhen Lei's avatar Zhen Lei Committed by Greg Kroah-Hartman
Browse files

kallsyms: Reduce the memory occupied by kallsyms_seqs_of_names[]

[ Upstream commit 19bd8981

 ]

kallsyms_seqs_of_names[] records the symbol index sorted by address, the
maximum value in kallsyms_seqs_of_names[] is the number of symbols. And
2^24 = 16777216, which means that three bytes are enough to store the
index. This can help us save (1 * kallsyms_num_syms) bytes of memory.

Signed-off-by: default avatarZhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
Stable-dep-of: b022f0c7

 ("tracing/kprobes: Return EADDRNOTAVAIL when func matches several symbols")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 3918cada
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment