diff options
author | Peter Zijlstra <peterz@infradead.org> | 2020-03-12 10:20:46 +0100 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2020-03-25 18:28:30 +0100 |
commit | 513b5ca6b5fbeb766999fb1a4bc9a55c9fb7c9ca (patch) | |
tree | 496c3cc712bee303774059f2ff1a6875e06b9c97 /tools/objtool/check.h | |
parent | objtool: Rename find_containing_func() (diff) | |
download | linux-513b5ca6b5fbeb766999fb1a4bc9a55c9fb7c9ca.tar.xz linux-513b5ca6b5fbeb766999fb1a4bc9a55c9fb7c9ca.zip |
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) <peterz@infradead.org>
Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
Link: https://lkml.kernel.org/r/20200324160924.617882545@infradead.org
Diffstat (limited to 'tools/objtool/check.h')
-rw-r--r-- | tools/objtool/check.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/objtool/check.h b/tools/objtool/check.h index 6d875ca6fce0..f0ce8ffe7135 100644 --- a/tools/objtool/check.h +++ b/tools/objtool/check.h @@ -50,7 +50,7 @@ struct instruction { struct objtool_file { struct elf *elf; struct list_head insn_list; - DECLARE_HASHTABLE(insn_hash, 16); + DECLARE_HASHTABLE(insn_hash, 20); bool ignore_unreachables, c_file, hints, rodata; }; |