RFR: JDK-8217723 Switch ld from bfd to gold on gcc toolchain
Martin Buchholz
martinrb at google.com
Sat Jan 26 16:59:05 UTC 2019
Another, more productionized, version of my benchmark:
processors=12
g++ (Debian 7.3.0-5) 7.3.0
--- -fuse-ld=bfd ---
6.559 user 1.180 system 7.740 total
--- -fuse-ld=gold ---
4.575 user 0.600 system 5.176 total
--- -fuse-ld=gold -Wl,-threads ---
9.355 user 5.062 system 4.289 total
--- -fuse-ld=lld ---
2.700 user 1.058 system 1.157 total
--- -fuse-ld=lld -Wl,-threads ---
2.572 user 1.128 system 1.107 total
#!/bin/bash
set -eu
echo processors=$(nproc)
read -a CMDLINE < $(find . -name BUILD_LIBJVM_link.cmdline -print)
readonly DRIVER="${CMDLINE[0]}"
"$DRIVER" --version | head -1
benchmark() {
echo --- "$@" ---
local -r TIMEFORMAT="%U user %S system %R total"
time "$DRIVER" "$@" "${CMDLINE[@]:1}"
}
benchmark -fuse-ld=bfd
benchmark -fuse-ld=gold
benchmark -fuse-ld=gold -Wl,-threads
benchmark -fuse-ld=lld
benchmark -fuse-ld=lld -Wl,-threads
More information about the build-dev
mailing list