Re: [PATCH 2/3] objtool: optimize insn_hash for split sections

From: Peter Zijlstra
Date: Tue Apr 21 2020 - 15:48:01 EST


On Tue, Apr 21, 2020 at 11:07:23AM -0700, Sami Tolvanen wrote:
> When running objtool on vmlinux.o compiled with -ffunction-sections,
> we end up with a ton of collisions in the insn_hash table as each
> function is in its own section. This results in a runtime of minutes
> instead of seconds. Use both section index and offset as the key to
> avoid this, similarly to rela_hash.
>
> Signed-off-by: Sami Tolvanen <samitolvanen@xxxxxxxxxx>

I already have this queued:

https://lkml.kernel.org/r/20200416115119.227240432@xxxxxxxxxxxxx

which looks very similar.