Messages in this thread | | | Date | Wed, 22 Apr 2020 09:45:12 +0200 | From | Ingo Molnar <> | Subject | Re: [GIT pull] perf/urgent for 5.7-rc2 |
| |
* Peter Zijlstra <peterz@infradead.org> wrote:
> On Mon, Apr 20, 2020 at 09:48:45AM +0200, Ingo Molnar wrote: > > Fortunately, much of what objtool does against vmlinux.o can be > > parallelized in a rather straightforward fashion I believe, if we build > > with -ffunction-sections. > > So that FGKASLR is going to get us -ffunction-sections, but > parallelizing objtool isn't going to be trivial, it's data structures > aren't really build for that, esp. decode_instructions() which actively > generates data. > > Still, it's probably doable.
So AFAICS in the narrow code section I identified as the main overhead, only the instruction hash needs threading, i.e. this step:
hash_add(file->insn_hash, &insn->hash, insn->offset); list_add_tail(&insn->list, &file->insn_list);
Objtool can still be single-threaded before and after generating the instruction hash.
99% of the overhead within decode_instructions() is in arch_decode_instruction(), which is fully thread-safe AFAICS.
So the run time of objtool could be cut in ~third on most systems.
Thanks,
Ingo
| |