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

From: Sami Tolvanen
Date: Tue Apr 21 2020 - 16:20:10 EST


On Tue, Apr 21, 2020 at 09:47:49PM +0200, Peter Zijlstra wrote:
> 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.

Great, that works for me. Thanks for the link!

Sami