Skip to content

Commit 513b5ca

Browse files
author
Peter Zijlstra
committed
objtool: Resize insn_hash
Perf shows we're spending a lot of time in find_insn() and the statistics show we have around 3.2 million instruction. Increase the hash table size to reduce the bucket load from around 50 to 3. This shaves about 2s off of objtool on vmlinux.o runtime, down to 16s. Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: Miroslav Benes <[email protected]> Acked-by: Josh Poimboeuf <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 53d2072 commit 513b5ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/objtool/check.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ struct instruction {
5050
struct objtool_file {
5151
struct elf *elf;
5252
struct list_head insn_list;
53-
DECLARE_HASHTABLE(insn_hash, 16);
53+
DECLARE_HASHTABLE(insn_hash, 20);
5454
bool ignore_unreachables, c_file, hints, rodata;
5555
};
5656

0 commit comments

Comments
 (0)