go/src
Alessandro Arzilli eca41af012 cmd/link: fix up debug_range for dsymutil (revert CL 72371)
Dsymutil, an utility used on macOS when externally linking executables,
does not support base address selector entries in debug_ranges.

CL 73271 worked around this problem by removing base address selectors
and emitting CU-relative relocations for each list entry.

This commit, as an optimization, reintroduces the base address
selectors and changes the linker to remove them again, but only when it
knows that it will have to invoke the external linker on macOS.

Compilecmp comparing master with a branch that has scope tracking
always enabled:

completed   15 of   15, estimated time remaining 0s (eta 2:43PM)
name        old time/op       new time/op       delta
Template          272ms ± 8%        257ms ± 5%  -5.33%  (p=0.000 n=15+14)
Unicode           124ms ± 7%        122ms ± 5%    ~     (p=0.210 n=14+14)
GoTypes           873ms ± 3%        870ms ± 5%    ~     (p=0.856 n=15+13)
Compiler          4.49s ± 2%        4.49s ± 5%    ~     (p=0.982 n=14+14)
SSA               11.8s ± 4%        11.8s ± 3%    ~     (p=0.653 n=15+15)
Flate             163ms ± 6%        164ms ± 9%    ~     (p=0.914 n=14+15)
GoParser          203ms ± 6%        202ms ±10%    ~     (p=0.571 n=14+14)
Reflect           547ms ± 7%        542ms ± 4%    ~     (p=0.914 n=15+14)
Tar               244ms ± 7%        237ms ± 3%  -2.80%  (p=0.002 n=14+13)
XML               289ms ± 6%        289ms ± 5%    ~     (p=0.839 n=14+14)
[Geo mean]        537ms             531ms       -1.10%

name        old user-time/op  new user-time/op  delta
Template          360ms ± 4%        341ms ± 7%  -5.16%  (p=0.000 n=14+14)
Unicode           189ms ±11%        190ms ± 8%    ~     (p=0.844 n=15+15)
GoTypes           1.13s ± 4%        1.14s ± 7%    ~     (p=0.582 n=15+14)
Compiler          5.34s ± 2%        5.40s ± 4%  +1.19%  (p=0.036 n=11+13)
SSA               14.7s ± 2%        14.7s ± 3%    ~     (p=0.602 n=15+15)
Flate             211ms ± 7%        214ms ± 8%    ~     (p=0.252 n=14+14)
GoParser          267ms ±12%        266ms ± 2%    ~     (p=0.837 n=15+11)
Reflect           706ms ± 4%        701ms ± 3%    ~     (p=0.213 n=14+12)
Tar               331ms ± 9%        320ms ± 5%  -3.30%  (p=0.025 n=15+14)
XML               378ms ± 4%        373ms ± 6%    ~     (p=0.253 n=14+15)
[Geo mean]        704ms             700ms       -0.58%

name        old alloc/op      new alloc/op      delta
Template         38.0MB ± 0%       38.4MB ± 0%  +1.12%  (p=0.000 n=15+15)
Unicode          28.8MB ± 0%       28.8MB ± 0%  +0.17%  (p=0.000 n=15+15)
GoTypes           112MB ± 0%        114MB ± 0%  +1.47%  (p=0.000 n=15+15)
Compiler          465MB ± 0%        473MB ± 0%  +1.71%  (p=0.000 n=15+15)
SSA              1.48GB ± 0%       1.53GB ± 0%  +3.07%  (p=0.000 n=15+15)
Flate            24.3MB ± 0%       24.7MB ± 0%  +1.67%  (p=0.000 n=15+15)
GoParser         30.7MB ± 0%       31.0MB ± 0%  +1.15%  (p=0.000 n=12+15)
Reflect          76.3MB ± 0%       77.1MB ± 0%  +0.97%  (p=0.000 n=15+15)
Tar              39.2MB ± 0%       39.6MB ± 0%  +0.91%  (p=0.000 n=15+15)
XML              41.5MB ± 0%       42.0MB ± 0%  +1.29%  (p=0.000 n=15+15)
[Geo mean]       77.5MB            78.6MB       +1.35%

name        old allocs/op     new allocs/op     delta
Template           385k ± 0%         387k ± 0%  +0.51%  (p=0.000 n=15+15)
Unicode            342k ± 0%         343k ± 0%  +0.10%  (p=0.000 n=14+15)
GoTypes           1.19M ± 0%        1.19M ± 0%  +0.62%  (p=0.000 n=15+15)
Compiler          4.51M ± 0%        4.54M ± 0%  +0.50%  (p=0.000 n=14+15)
SSA               12.2M ± 0%        12.4M ± 0%  +1.12%  (p=0.000 n=14+15)
Flate              234k ± 0%         236k ± 0%  +0.60%  (p=0.000 n=15+15)
GoParser           318k ± 0%         320k ± 0%  +0.60%  (p=0.000 n=15+15)
Reflect            974k ± 0%         977k ± 0%  +0.27%  (p=0.000 n=15+15)
Tar                395k ± 0%         397k ± 0%  +0.37%  (p=0.000 n=14+15)
XML                404k ± 0%         407k ± 0%  +0.53%  (p=0.000 n=15+15)
[Geo mean]         794k              798k       +0.52%

name        old text-bytes    new text-bytes    delta
HelloSize         680kB ± 0%        680kB ± 0%    ~     (all equal)

name        old data-bytes    new data-bytes    delta
HelloSize        9.62kB ± 0%       9.62kB ± 0%    ~     (all equal)

name        old bss-bytes     new bss-bytes     delta
HelloSize         125kB ± 0%        125kB ± 0%    ~     (all equal)

name        old exe-bytes     new exe-bytes     delta
HelloSize        1.11MB ± 0%       1.13MB ± 0%  +1.85%  (p=0.000 n=15+15)

Change-Id: I61c98ba0340cb798034b2bb55e3ab3a58ac1cf23
Reviewed-on: https://go-review.googlesource.com/98075
Reviewed-by: Heschi Kreinick <heschi@google.com>
2018-03-02 19:33:44 +00:00
..
archive archive/zip: improve Writer.Create documentation on how to add directories 2018-02-26 19:58:48 +00:00
bufio
builtin
bytes bytes: add asm version of Index for short strings on arm64 2018-03-01 15:24:33 +00:00
cmd cmd/link: fix up debug_range for dsymutil (revert CL 72371) 2018-03-02 19:33:44 +00:00
compress compress/bzip2: use sort.Slice in huffman.go 2018-02-17 00:34:26 +00:00
container container/list: document nil values more 2018-01-08 18:06:27 +00:00
context
crypto crypto: remove hand encoded amd64 instructions 2018-03-01 19:20:53 +00:00
database/sql database/sql: add String method to IsolationLevel 2018-02-22 15:17:52 +00:00
debug all: add more uses of stringer 2018-02-19 21:33:14 +00:00
encoding encoding/json: read ahead after value consumption 2018-03-01 19:03:04 +00:00
errors
expvar
flag
fmt fmt: change some unexported method names to camel case 2018-02-27 20:12:04 +00:00
go go/types: fix empty interface optimization (minor performance bug) 2018-02-28 18:22:21 +00:00
hash crypto: remove hand encoded amd64 instructions 2018-03-01 19:20:53 +00:00
html all: fix misspellings 2018-02-20 21:02:58 +00:00
image all: fix misspellings 2018-02-20 21:02:58 +00:00
index/suffixarray
internal net, internal/poll, net/internal/socktest: use SOCK_{CLOEXEC,NONBLOCK} accept4/socket flags on OpenBSD 2018-02-26 16:59:38 +00:00
io
log
math math: remove unused variable 2018-03-01 18:51:44 +00:00
mime
net net, internal/poll, net/internal/socktest: use SOCK_{CLOEXEC,NONBLOCK} accept4/socket flags on OpenBSD 2018-02-26 16:59:38 +00:00
os os, syscall: use pipe2 instead of pipe syscall on OpenBSD 2018-02-27 18:37:36 +00:00
path path/filepath: fix escaped chars in Glob on non-Windows 2018-02-14 11:47:59 +00:00
plugin
reflect reflect: avoid calling common if type is known to be *rtype 2018-02-22 07:18:15 +00:00
regexp regexp: Regexp shouldn't keep references to inputs 2018-02-23 16:58:48 +00:00
runtime runtime: fix typo, func comments should start with function name 2018-03-02 12:03:30 +00:00
sort
strconv strconv: detect invalid UTF-8 in the Unquote fast path 2018-02-13 18:33:44 +00:00
strings strings: add Builder benchmarks comparing bytes.Buffer and strings.Builder 2018-02-26 18:00:12 +00:00
sync sync: enable profiling of RWMutex 2018-02-14 15:38:42 +00:00
syscall syscall: fix nil pointer dereference in Select on linux/{arm64,mips64x} 2018-03-02 08:18:31 +00:00
testing testing: gracefully handle subtest failing parent’s T 2018-03-01 10:17:22 +00:00
text text/template: fix the documentation of the block action 2018-02-21 20:57:47 +00:00
time time: avoid unnecessary type conversions 2018-02-26 16:14:51 +00:00
unicode
unsafe unsafe: fix reference to string header 2018-02-26 18:35:46 +00:00
vendor/golang_org/x
Make.dist
all.bash
all.bat
all.rc
androidtest.bash misc,src: add support for specifying adb flags to the android harness 2018-01-20 21:13:30 +00:00
bootstrap.bash bootstrap.bash: only fetch git revision if we need it 2018-01-30 15:11:56 +00:00
buildall.bash
clean.bash
clean.bat
clean.rc
cmp.bash
iostest.bash
make.bash
make.bat build: small cleanup in error message in make.bat 2018-02-26 10:27:14 +00:00
make.rc
naclmake.bash nacl*.bash: pass flags to make.bash 2018-02-14 17:09:31 +00:00
nacltest.bash nacl*.bash: pass flags to make.bash 2018-02-14 17:09:31 +00:00
race.bash
race.bat
run.bash
run.bat
run.rc