DragonFly BSD
DragonFly commits List (threaded) for 2012-03
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

git: rtld: Support DT_GNU_HASH (startup performance increase)

From: John Marino <marino@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 11 Mar 2012 01:06:19 -0800 (PST)

commit 7629c6317998f850ebca23c296822ba08af09e5b
Author: John Marino <draco@marino.st>
Date:   Fri Mar 9 08:40:34 2012 +0100

    rtld: Support DT_GNU_HASH (startup performance increase)
    This is another "First BSD to get" feature that Linux and Solaris
    had years ago.  Essentially DT_GNU_HASH is a GNU extension to the ELF
    format that allows symbol searches much faster than the System V ABI
    standard hash does.  Both versions of our binutils have the capability
    of generating GNU hashes alongside of (or instead of) the SysV hash.
    The benefit comes at the real-time link stage when the rtld is
    searching the libraries for symbols.  For very large programs
    written in languages such as c++ that tend to link in many libraries
    with many symbols, the reduction in start-time can be dramatic.
    According to benchmarks done by binutils team in 2006, more than 90% of
    the symbol queries of OpenOffice Writer are rejected by the Bloom filter
    before the string comparison takes place:

Summary of changes:
 libexec/rtld-elf/i386/reloc.c   |    2 +-
 libexec/rtld-elf/rtld.c         |  347 ++++++++++++++++++++++++++-------------
 libexec/rtld-elf/rtld.h         |   20 ++-
 libexec/rtld-elf/x86_64/reloc.c |    2 +-
 4 files changed, 255 insertions(+), 116 deletions(-)


DragonFly BSD source repository

[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]