[llvm-dev] LLD performance w.r.t. local symbols (and --build-id)

Sean Silva via llvm-dev llvm-dev at lists.llvm.org
Tue Mar 15 18:03:54 PDT 2016


Hi,

Rafael took some measurements to try to investigate the effect of the local
symbols changes.
I've been taking a look at the measurements he got and there were some
interesting things we noticed.

For starters, in the range of revisions tested (r263214 through r263471),
we found that the commit for --build-id was the most noticeable, with
slowdowns from 7% to 23% (note: these were non-debug builds).

This is somewhat concerning because it appears that this option is passed
to the linker by default on Linux. Any performance comparisons with other
linkers before LLD started respecting --build-id must be taken with a grain
of salt unless they were controlled for --build-id.

Returning to the original motivation for the investigation (local symbols),
we see something interesting. Zooming in r263214 through r263237, we find
that the performance characteristics for linking ScyllaDB are substantially
different from the others. The reason for this is still unknown.

The following commits showed significant performance changes for ScyllaDB.

r263222  ~4% speedup for ScyllaDB
commit 1ffd121a07a3d67bf52d849c0cdef0f2fad889ba
Author: Rafael Espindola <rafael.espindola at gmail.com>
Date:   Fri Mar 11 12:06:30 2016 +0000

    Create a SymbolBody for locals.

    pr26878 shows a case where locals have to be in the got.

    git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@263222
91177308-0d34-0410-b5e6-96231b3b80d8

r263225 ~4% speedup for ScyllaDB
commit 34ca5194d5e5e28d760cc8a730a2e1f3b2b6a21f
Author: Rafael Espindola <rafael.espindola at gmail.com>
Date:   Fri Mar 11 12:19:05 2016 +0000

    Compute value of local symbol with getVA.

    git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@263225
91177308-0d34-0410-b5e6-96231b3b80d8

r263227 ~2-3% slowdown for ScyllaDB
commit 6b96b614d9e0232b106165255148af8909607ec1
Author: George Rimar <grimar at accesssoftek.com>
Date:   Fri Mar 11 12:57:52 2016 +0000

    [ELF] - Early continue in InputSectionBase<ELFT>::relocate(). NFC.

    git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@263227
91177308-0d34-0410-b5e6-96231b3b80d8

r263228 ~6-7% slowdown for ScyllaDB
commit e5aedbede69d60d90f16395af8d4fa6171a5c46a
Author: Rafael Espindola <rafael.espindola at gmail.com>
Date:   Fri Mar 11 13:04:28 2016 +0000

    Simplify now that local symbols can use getVA.

    It is really odd that Mips differentiates symbols that are born local
    and those that become local because of hidden visibility. I don't know
    enough mips to known if this is a bug or not.

    git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@263228
91177308-0d34-0410-b5e6-96231b3b80d8


My full notebook is here:
https://drive.google.com/file/d/0B8v10qJ6EXRxYlNTTUpiQjF5eGM/view?usp=sharing

-- Sean Silva
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160315/b9c702f0/attachment.html>


More information about the llvm-dev mailing list