1. 29 Mar, 2018 10 commits
  2. 28 Mar, 2018 16 commits
  3. 27 Mar, 2018 14 commits
    • Ian Lance Taylor's avatar
      cmd/go: if -race, don't run coverage on runtime packages · 976a852d
      Ian Lance Taylor authored
      Don't compile the runtime packages with coverage when using the race
      detector. The user can, perhaps accidentally, request coverage for the
      runtime by using -coverpkg=all. If using the race detector, the
      runtime package coverage will call into the race detector before it
      has been initialized. This will cause the program to crash
      mysteriously on startup.
      
      Fixes #23882
      
      Change-Id: I9a63867a9138797d8b8afb0856ae21079accdb27
      Reviewed-on: https://go-review.googlesource.com/94898
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarAndrew Bonventre <andybons@golang.org>
      976a852d
    • Filippo Valsorda's avatar
      crypto/tls: parse certificate first in X509KeyPair to get better errors · bd18c090
      Filippo Valsorda authored
      parsePrivateKey can't return useful error messages because it does trial
      decoding of multiple formats.  Try ParseCertificate first in case it
      offers a useful error message.
      
      Fixes #23591
      
      Change-Id: I380490a5850bee593a7d2f584a27b2a14153d768
      Reviewed-on: https://go-review.googlesource.com/90435
      Run-TryBot: Filippo Valsorda <filippo@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarAdam Langley <agl@golang.org>
      bd18c090
    • Filippo Valsorda's avatar
      crypto/x509: cache the result of SystemCertPool · a25d0d8f
      Filippo Valsorda authored
      Fixes #24540
      
      Change-Id: I65e9f2f99403e22d25ea64cc26701bf62a31d070
      Reviewed-on: https://go-review.googlesource.com/102699
      Run-TryBot: Filippo Valsorda <filippo@golang.org>
      Reviewed-by: default avatarAdam Langley <agl@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      a25d0d8f
    • Ian Lance Taylor's avatar
      cmd/go: with -x, don't report removing a non-existent objdir · ad0ebc39
      Ian Lance Taylor authored
      Fixes #24389
      Fixes #24396
      
      Change-Id: I37399528700e2a39d9523d7c41bdc929618eb095
      Reviewed-on: https://go-review.googlesource.com/102619Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      ad0ebc39
    • erifan01's avatar
      math: optimize Exp and Exp2 on arm64 · 711a373c
      erifan01 authored
      This CL implements Exp and Exp2 with arm64 assembly. By inlining Ldexp and
      using fused instructions(fmadd, fmsub, fnmsub), this CL helps to improve
      the performance of functions Exp, Exp2, Sinh, Cosh and Tanh.
      
      Benchmarks:
      name                   old time/op  new time/op  delta
      Cosh-8                  138ns ± 0%    96ns ± 0%  -30.72%  (p=0.008 n=5+5)
      Exp-8                   105ns ± 0%    58ns ± 0%  -45.24%  (p=0.000 n=5+4)
      Exp2-8                  100ns ± 0%    57ns ± 0%  -43.21%  (p=0.008 n=5+5)
      Sinh-8                  139ns ± 0%   102ns ± 0%  -26.62%  (p=0.008 n=5+5)
      Tanh-8                  134ns ± 0%   100ns ± 0%  -25.67%  (p=0.008 n=5+5)
      
      Change-Id: I7483a3333062a1d3525cedf3de56db78d79031c6
      Reviewed-on: https://go-review.googlesource.com/86615
      Run-TryBot: Cherry Zhang <cherryyz@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
      711a373c
    • Yuval Pavel Zholkover's avatar
      cmd/internal/obj/arm: add DMB instruction · 0a5be12f
      Yuval Pavel Zholkover authored
      Change-Id: Ib67a61d5b37af210ff15d60d72bd5238b9c2d0ca
      Reviewed-on: https://go-review.googlesource.com/94815
      Run-TryBot: Cherry Zhang <cherryyz@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
      0a5be12f
    • Ben Shi's avatar
      cmd/internal/obj/arm64: add LDPW/LDPSW/STPW to arm64 assembler · fc7a7259
      Ben Shi authored
      1. STPW stores the lower 32-bit words of a pair of registers to memory.
      2. LDPW loads two 32-bit words from memory, zero extends them to 64-bit,
      and then copies to a pair of registers.
      3. LDPSW does the same as LDPW, except a sign extension.
      
      This CL implements those 3 instructions and adds test cases.
      
      Change-Id: Ied9834d8240240d23ce00e086b4ea456e1611f1a
      Reviewed-on: https://go-review.googlesource.com/99956
      Run-TryBot: Cherry Zhang <cherryyz@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
      fc7a7259
    • Hana Kim's avatar
      cmd/trace: assign a unique span id for slice representation · aaeaad68
      Hana Kim authored
      Spans are represented using Async Event types of chrome trace viewer.
      According to the doc, the 'id' should be unique within category, scope.
      
      https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview#heading=h.jh64i9l3vwa1
      
      Use the index in the task's span slice as the slice id, so it
      can be unique within the task. The scope is the task id which
      is unique.
      
      This fixes a visualization bug that caused incorrect or missing
      presentation of nested spans.
      
      Change-Id: If1537ee00247f71fa967abfe45569a9e7dbcdce7
      Reviewed-on: https://go-review.googlesource.com/102697Reviewed-by: default avatarHeschi Kreinick <heschi@google.com>
      aaeaad68
    • Michael Munday's avatar
      cmd/compile: simplify Neg lowering on s390x · 331c187b
      Michael Munday authored
      No need to sign extend input to Neg8 and Neg16.
      
      Change-Id: I7896c83c9cdf84a34098582351a4aabf61cd6fdd
      Reviewed-on: https://go-review.googlesource.com/102675
      Run-TryBot: Michael Munday <mike.munday@ibm.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      331c187b
    • Matthew Dempsky's avatar
      cmd/compile: fix method set computation for shadowed methods · 7b177b1a
      Matthew Dempsky authored
      In expandmeth, we call expand1/expand0 to build a list of all
      candidate methods to promote, and then we use dotpath to prune down
      which names actually resolve to a promoted method and how.
      
      However, previously we still computed "followsptr" based on the
      expand1/expand0 traversal (which is depth-first), rather than
      dotpath (which is breadth-first). The result is that we could
      sometimes end up miscomputing whether a particular promoted method
      involves a pointer traversal, which could result in bad code
      generation for method trampolines.
      
      Fixes #24547.
      
      Change-Id: I57dc014466d81c165b05d78b98610dc3765b7a90
      Reviewed-on: https://go-review.googlesource.com/102618Reviewed-by: default avatarRobert Griesemer <gri@golang.org>
      7b177b1a
    • Daniel Theophanes's avatar
      database/sql: check to see if ctx is cancelable before await · 6e59c73a
      Daniel Theophanes authored
      Prevent queries from starting a goroutine if the context is
      not able to be canceled.
      
      Fixes #23879
      
      Change-Id: I392047bd53d7f796219dd12ee11b07303658fdaf
      Reviewed-on: https://go-review.googlesource.com/102478
      Run-TryBot: Daniel Theophanes <kardianos@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarYasuhiro MATSUMOTO <mattn.jp@gmail.com>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      6e59c73a
    • Alberto Donizetti's avatar
      cmd/compile: reduce allocations in regAllocState.regalloc · 377a2cb2
      Alberto Donizetti authored
      name      old time/op       new time/op       delta
      Template        281ms ± 2%        282ms ± 3%    ~     (p=0.428 n=19+20)
      Unicode         138ms ± 6%        138ms ± 7%    ~     (p=0.813 n=19+20)
      GoTypes         901ms ± 2%        895ms ± 2%    ~     (p=0.050 n=19+20)
      Compiler        4.25s ± 1%        4.23s ± 1%  -0.31%  (p=0.031 n=19+18)
      SSA             9.77s ± 1%        9.78s ± 1%    ~     (p=0.512 n=20+20)
      Flate           187ms ± 3%        187ms ± 4%    ~     (p=0.687 n=20+19)
      GoParser        224ms ± 4%        222ms ± 3%    ~     (p=0.301 n=20+20)
      Reflect         576ms ± 2%        576ms ± 2%    ~     (p=0.620 n=20+20)
      Tar             262ms ± 3%        263ms ± 3%    ~     (p=0.599 n=19+18)
      XML             322ms ± 4%        322ms ± 2%    ~     (p=0.512 n=20+20)
      
      name      old user-time/op  new user-time/op  delta
      Template        403ms ± 3%        399ms ± 5%    ~     (p=0.149 n=17+20)
      Unicode         217ms ±12%        217ms ± 9%    ~     (p=0.883 n=20+20)
      GoTypes         1.24s ± 3%        1.24s ± 3%    ~     (p=0.718 n=20+20)
      Compiler        5.90s ± 3%        5.84s ± 5%    ~     (p=0.217 n=18+20)
      SSA             14.0s ± 6%        14.1s ± 5%    ~     (p=0.235 n=19+20)
      Flate           253ms ± 6%        254ms ± 5%    ~     (p=0.749 n=20+19)
      GoParser        309ms ± 7%        307ms ± 5%    ~     (p=0.398 n=20+20)
      Reflect         772ms ± 3%        771ms ± 3%    ~     (p=0.901 n=20+19)
      Tar             368ms ± 5%        369ms ± 8%    ~     (p=0.429 n=20+20)
      XML             435ms ± 5%        434ms ± 5%    ~     (p=0.841 n=20+20)
      
      name      old alloc/op      new alloc/op      delta
      Template       39.0MB ± 0%       38.9MB ± 0%  -0.21%  (p=0.000 n=20+19)
      Unicode        29.0MB ± 0%       29.0MB ± 0%  -0.03%  (p=0.000 n=20+20)
      GoTypes         116MB ± 0%        115MB ± 0%  -0.33%  (p=0.000 n=20+20)
      Compiler        498MB ± 0%        496MB ± 0%  -0.37%  (p=0.000 n=19+20)
      SSA            1.41GB ± 0%       1.40GB ± 0%  -0.24%  (p=0.000 n=20+20)
      Flate          25.0MB ± 0%       25.0MB ± 0%  -0.22%  (p=0.000 n=20+19)
      GoParser       31.0MB ± 0%       30.9MB ± 0%  -0.23%  (p=0.000 n=20+17)
      Reflect        77.1MB ± 0%       77.0MB ± 0%  -0.12%  (p=0.000 n=20+20)
      Tar            39.7MB ± 0%       39.6MB ± 0%  -0.17%  (p=0.000 n=20+20)
      XML            44.9MB ± 0%       44.8MB ± 0%  -0.29%  (p=0.000 n=20+20)
      
      name      old allocs/op     new allocs/op     delta
      Template         386k ± 0%         385k ± 0%  -0.28%  (p=0.000 n=20+20)
      Unicode          337k ± 0%         336k ± 0%  -0.07%  (p=0.000 n=20+20)
      GoTypes         1.20M ± 0%        1.20M ± 0%  -0.41%  (p=0.000 n=20+20)
      Compiler        4.71M ± 0%        4.68M ± 0%  -0.52%  (p=0.000 n=20+20)
      SSA             11.7M ± 0%        11.6M ± 0%  -0.31%  (p=0.000 n=20+19)
      Flate            238k ± 0%         237k ± 0%  -0.28%  (p=0.000 n=18+20)
      GoParser         320k ± 0%         319k ± 0%  -0.34%  (p=0.000 n=20+19)
      Reflect          961k ± 0%         959k ± 0%  -0.12%  (p=0.000 n=20+20)
      Tar              397k ± 0%         396k ± 0%  -0.23%  (p=0.000 n=20+20)
      XML              419k ± 0%         417k ± 0%  -0.39%  (p=0.000 n=20+19)
      
      Change-Id: Ic7ec3614808d9892c1cab3991b996b7a3b8eff21
      Reviewed-on: https://go-review.googlesource.com/102676
      Run-TryBot: Alberto Donizetti <alb.donizetti@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarKeith Randall <khr@golang.org>
      377a2cb2
    • Tobias Klauser's avatar
      runtime: parse auxv for page size on netbsd · 4ff4e507
      Tobias Klauser authored
      Decode AT_PAGESZ to determine physPageSize on netbsd.
      
      Also rename vdso_none.go to auxv_none.go which matches its purpose more
      closely.
      
      Akin to CL 99780 which did the same for freebsd.
      
      Change-Id: Iea4322f861ff0f3515e9051585dbb442f024326b
      Reviewed-on: https://go-review.googlesource.com/102677
      Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      4ff4e507
    • Carlos Eduardo Seo's avatar
      math/big: improve performance of addVW/subVW for ppc64x · a44c7282
      Carlos Eduardo Seo authored
      This change adds a better implementation in asm for addVW/subVW for
      ppc64x, with speedups up to 3.11x.
      
      benchmark                    old ns/op     new ns/op     delta
      BenchmarkAddVW/1-16          6.87          5.71          -16.89%
      BenchmarkAddVW/2-16          7.72          5.94          -23.06%
      BenchmarkAddVW/3-16          8.74          6.56          -24.94%
      BenchmarkAddVW/4-16          9.66          7.26          -24.84%
      BenchmarkAddVW/5-16          10.8          7.26          -32.78%
      BenchmarkAddVW/10-16         17.4          9.97          -42.70%
      BenchmarkAddVW/100-16        164           56.0          -65.85%
      BenchmarkAddVW/1000-16       1638          524           -68.01%
      BenchmarkAddVW/10000-16      16421         5201          -68.33%
      BenchmarkAddVW/100000-16     165762        53324         -67.83%
      BenchmarkSubVW/1-16          6.76          5.62          -16.86%
      BenchmarkSubVW/2-16          7.69          6.02          -21.72%
      BenchmarkSubVW/3-16          8.85          6.61          -25.31%
      BenchmarkSubVW/4-16          10.0          7.34          -26.60%
      BenchmarkSubVW/5-16          11.3          7.33          -35.13%
      BenchmarkSubVW/10-16         19.5          18.7          -4.10%
      BenchmarkSubVW/100-16        153           55.9          -63.46%
      BenchmarkSubVW/1000-16       1502          519           -65.45%
      BenchmarkSubVW/10000-16      15005         5165          -65.58%
      BenchmarkSubVW/100000-16     150620        53124         -64.73%
      
      benchmark                    old MB/s     new MB/s     speedup
      BenchmarkAddVW/1-16          1165.12      1400.76      1.20x
      BenchmarkAddVW/2-16          2071.39      2693.25      1.30x
      BenchmarkAddVW/3-16          2744.72      3656.92      1.33x
      BenchmarkAddVW/4-16          3311.63      4407.34      1.33x
      BenchmarkAddVW/5-16          3700.52      5512.48      1.49x
      BenchmarkAddVW/10-16         4605.63      8026.37      1.74x
      BenchmarkAddVW/100-16        4856.15      14296.76     2.94x
      BenchmarkAddVW/1000-16       4883.96      15264.21     3.13x
      BenchmarkAddVW/10000-16      4871.52      15380.78     3.16x
      BenchmarkAddVW/100000-16     4826.17      15002.48     3.11x
      BenchmarkSubVW/1-16          1183.20      1423.03      1.20x
      BenchmarkSubVW/2-16          2081.92      2657.44      1.28x
      BenchmarkSubVW/3-16          2711.52      3632.30      1.34x
      BenchmarkSubVW/4-16          3198.30      4360.30      1.36x
      BenchmarkSubVW/5-16          3534.43      5460.40      1.54x
      BenchmarkSubVW/10-16         4106.34      4273.51      1.04x
      BenchmarkSubVW/100-16        5213.48      14306.32     2.74x
      BenchmarkSubVW/1000-16       5324.27      15391.21     2.89x
      BenchmarkSubVW/10000-16      5331.33      15486.57     2.90x
      BenchmarkSubVW/100000-16     5311.35      15059.01     2.84x
      
      Change-Id: Ibaa5b9b38d63fba8e01a9c327eb8bef1e6e908c1
      Reviewed-on: https://go-review.googlesource.com/101975Reviewed-by: default avatarLynn Boger <laboger@linux.vnet.ibm.com>
      a44c7282