1. 27 Mar, 2018 16 commits
    • 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: 's 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: 's 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: 's 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: 's 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: 's 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: 's 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: 's avatarYasuhiro MATSUMOTO <mattn.jp@gmail.com>
      Reviewed-by: 's 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: 's 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: 's 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: 's avatarLynn Boger <laboger@linux.vnet.ibm.com>
      a44c7282
    • HaraldNordgren's avatar
      cmd/go: print each import error only once · a42ea51a
      HaraldNordgren authored
      This change prevents import errors from being printed multiple times.
      Creating a bare-bones package 'p' with only one file importing itself
      and running 'go build p', the current implementation gives this error
      message:
      
      	can't load package: import cycle not allowed
      	package p
      		imports p
      	import cycle not allowed
      	package p
      		imports p
      
      With this change we will show the message only once.
      
      Updates #23295
      
      Change-Id: I653b34c1c06c279f3df514f12ec0b89745a7e64a
      Reviewed-on: https://go-review.googlesource.com/86535Reviewed-by: 's avatarHarald Nordgren <haraldnordgren@gmail.com>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      a42ea51a
    • Meng Zhuo's avatar
      runtime: use vDSO for clock_gettime on linux/arm64 · ea59ebd3
      Meng Zhuo authored
      Use the __vdso_clock_gettime fast path via the vDSO on linux/arm64 to
      speed up nanotime and walltime. This results in the following
      performance improvement for time.Now on Cavium ThunderX:
      
      name     old time/op  new time/op  delta
      TimeNow   442ns ± 0%   163ns ± 0%  -63.16%  (p=0.000 n=10+10)
      
      And benchmarks on VDSO
      
      BenchmarkClockVDSOAndFallbackPaths/vDSO         10000000 166 ns/op
      BenchmarkClockVDSOAndFallbackPaths/Fallback     3000000 456 ns/op
      
      Change-Id: I326118c6dff865eaa0569fc45d1fc1ff95cb74f6
      Reviewed-on: https://go-review.googlesource.com/99855
      Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      ea59ebd3
    • Alberto Donizetti's avatar
      cmd/compile: allocate less in regalloc's liveValues · b63b0f2b
      Alberto Donizetti authored
      Instrumenting the compiler shows that, at the end of liveValues, the
      values of the workList's cap are distributed as:
      
        cap	 freq
        1  	 0.006
        2  	 0.002
        4  	 0.237
        8  	 0.272
        16	 0.254
        32	 0.141
        64	 0.062
        128	 0.02
        256	 0.005
        512	 0.001
        1024	 0.0
      
      Since the initial workList slice allocation is always on the stack
      (as the variable does not escape), we can aggressively pre-allocate a
      big backing array at (almost) no cost. This will save several
      allocations in liveValues calls that end up having a large workList,
      with no performance penalties for calls that have a small workList.
      
      name      old time/op       new time/op       delta
      Template        284ms ± 3%        282ms ± 3%    ~     (p=0.201 n=20+20)
      Unicode         138ms ± 7%        138ms ± 7%    ~     (p=0.718 n=20+20)
      GoTypes         905ms ± 2%        895ms ± 1%  -1.10%  (p=0.003 n=19+18)
      Compiler        4.26s ± 1%        4.25s ± 1%  -0.38%  (p=0.038 n=20+19)
      SSA             9.85s ± 2%        9.80s ± 1%    ~     (p=0.061 n=20+19)
      Flate           187ms ± 6%        186ms ± 5%    ~     (p=0.289 n=20+20)
      GoParser        227ms ± 3%        225ms ± 3%    ~     (p=0.072 n=20+20)
      Reflect         578ms ± 2%        575ms ± 2%    ~     (p=0.059 n=18+20)
      Tar             263ms ± 2%        265ms ± 3%    ~     (p=0.224 n=19+20)
      XML             323ms ± 3%        325ms ± 2%    ~     (p=0.127 n=20+20)
      
      name      old user-time/op  new user-time/op  delta
      Template        406ms ± 6%        404ms ± 4%    ~     (p=0.314 n=20+20)
      Unicode         220ms ± 6%        215ms ±11%    ~     (p=0.077 n=18+20)
      GoTypes         1.25s ± 3%        1.24s ± 4%    ~     (p=0.461 n=20+20)
      Compiler        5.95s ± 2%        5.84s ± 5%  -1.93%  (p=0.007 n=20+20)
      SSA             14.4s ± 4%        14.2s ± 4%    ~     (p=0.108 n=20+20)
      Flate           257ms ± 6%        252ms ± 9%    ~     (p=0.063 n=20+20)
      GoParser        317ms ± 5%        312ms ± 6%  -1.85%  (p=0.049 n=20+20)
      Reflect         779ms ± 2%        774ms ± 3%    ~     (p=0.253 n=20+20)
      Tar             371ms ± 4%        374ms ± 4%    ~     (p=0.327 n=20+20)
      XML             440ms ± 5%        442ms ± 5%    ~     (p=0.678 n=20+20)
      
      name      old alloc/op      new alloc/op      delta
      Template       39.4MB ± 0%       39.0MB ± 0%  -0.96%  (p=0.000 n=20+20)
      Unicode        29.1MB ± 0%       29.0MB ± 0%  -0.13%  (p=0.000 n=20+20)
      GoTypes         117MB ± 0%        116MB ± 0%  -0.88%  (p=0.000 n=20+20)
      Compiler        502MB ± 0%        498MB ± 0%  -0.77%  (p=0.000 n=19+20)
      SSA            1.42GB ± 0%       1.40GB ± 0%  -0.80%  (p=0.000 n=20+20)
      Flate          25.3MB ± 0%       25.0MB ± 0%  -1.10%  (p=0.000 n=20+19)
      GoParser       31.3MB ± 0%       31.0MB ± 0%  -1.05%  (p=0.000 n=20+20)
      Reflect        77.9MB ± 0%       77.1MB ± 0%  -1.03%  (p=0.000 n=20+20)
      Tar            40.0MB ± 0%       39.7MB ± 0%  -0.80%  (p=0.000 n=20+20)
      XML            45.2MB ± 0%       44.9MB ± 0%  -0.72%  (p=0.000 n=20+20)
      
      name      old allocs/op     new allocs/op     delta
      Template         392k ± 0%         386k ± 0%  -1.44%  (p=0.000 n=20+20)
      Unicode          337k ± 0%         337k ± 0%  -0.22%  (p=0.000 n=20+20)
      GoTypes         1.22M ± 0%        1.20M ± 0%  -1.33%  (p=0.000 n=20+20)
      Compiler        4.76M ± 0%        4.71M ± 0%  -1.12%  (p=0.000 n=20+20)
      SSA             11.8M ± 0%        11.7M ± 0%  -1.00%  (p=0.000 n=20+20)
      Flate            241k ± 0%         238k ± 0%  -1.49%  (p=0.000 n=20+20)
      GoParser         324k ± 0%         320k ± 0%  -1.17%  (p=0.000 n=20+20)
      Reflect          981k ± 0%         961k ± 0%  -2.11%  (p=0.000 n=20+20)
      Tar              402k ± 0%         397k ± 0%  -1.29%  (p=0.000 n=20+20)
      XML              424k ± 0%         419k ± 0%  -1.10%  (p=0.000 n=19+20)
      
      Change-Id: If46667ae98eee2d47a615cad05e18df0629d8388
      Reviewed-on: https://go-review.googlesource.com/102495
      Run-TryBot: Alberto Donizetti <alb.donizetti@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarKeith Randall <khr@golang.org>
      b63b0f2b
    • Alberto Donizetti's avatar
      cmd/compile: use more ORs in generic.rules · fdee46ee
      Alberto Donizetti authored
      No changes in the actual generated compiler code.
      
      Change-Id: I206a7bf7b60f70a73640119fc92974f79ed95a6b
      Reviewed-on: https://go-review.googlesource.com/102416
      Run-TryBot: Alberto Donizetti <alb.donizetti@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarDaniel Martí <mvdan@mvdan.cc>
      fdee46ee
    • David du Colombier's avatar
      os: fix TestDevNullFile on Plan 9 · 49325dc1
      David du Colombier authored
      CL 102457 added TestDevNullFile. However, this
      test is failing on Plan 9, because it checks
      that /dev/null is a character device while there
      are no special files on Plan 9.
      
      We fix this issue by changing Stat to consider
      all files served by the console device (#c)
      as character devices.
      
      Fixes #24534.
      
      Change-Id: I1c60cdf25770358b908790b3fb71910fa914dec0
      Reviewed-on: https://go-review.googlesource.com/102424
      Run-TryBot: David du Colombier <0intro@gmail.com>
      Reviewed-by: 's avatarAlex Brainman <alex.brainman@gmail.com>
      Reviewed-by: 's avatarRob Pike <r@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      49325dc1
    • Tim Wright's avatar
      cmd/go, cmd/link, runtime: enable PIE build mode, cgo race tests on FreeBSD · 131901e8
      Tim Wright authored
      Fixes #24546
      
      Change-Id: I99ebd5bc18e5c5e42eee4689644a7a8b02405f31
      Reviewed-on: https://go-review.googlesource.com/102616
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      131901e8
  2. 26 Mar, 2018 17 commits
    • Andrew Bonventre's avatar
      database/sql: fix docs to correctly refer to time.RFC3339Nano · 165ebe65
      Andrew Bonventre authored
      It mentions time.Format3339Nano, which isn’t defined. The
      underlying code uses time.RFC3339Nano.
      
      Updates golang/go#24542
      
      Change-Id: Ia34ae8b66427139d9005f902c2eb60aac4bfa8c6
      Reviewed-on: https://go-review.googlesource.com/102607Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      165ebe65
    • Brad Fitzpatrick's avatar
      all: use strings.Builder instead of bytes.Buffer where appropriate · 48db2c01
      Brad Fitzpatrick authored
      I grepped for "bytes.Buffer" and "buf.String" and mostly ignored test
      files. I skipped a few on purpose and probably missed a few others,
      but otherwise I think this should be most of them.
      
      Updates #18990
      
      Change-Id: I5a6ae4296b87b416d8da02d7bfaf981d8cc14774
      Reviewed-on: https://go-review.googlesource.com/102479
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      48db2c01
    • Hana Kim's avatar
      cmd/trace: add /userspans, /userspan pages · f0eca373
      Hana Kim authored
      Change-Id: Ifbefb659a8df3b079d69679871af444b179deaeb
      Reviewed-on: https://go-review.googlesource.com/102599
      Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarHeschi Kreinick <heschi@google.com>
      f0eca373
    • Adam Langley's avatar
      crypto/x509: matching any requested EKU should be sufficient. · dc3a92ed
      Adam Langley authored
      The documentation was unclear here and I misremembered the behaviour and
      changed it in 1.10: it used to be that matching any EKU was enough but
      1.10 requires that all EKUs match.
      
      Restore 1.9 behaviour and clarify the documentation to make it official.
      
      Fixes #24162.
      
      Change-Id: Ic9466cd0799cb27ec3a3a7e6c96f10c2aacc7020
      Reviewed-on: https://go-review.googlesource.com/97720
      Run-TryBot: Adam Langley <agl@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarFilippo Valsorda <filippo@golang.org>
      dc3a92ed
    • Austin Clements's avatar
      cmd/compile: clarify unsigned interpretation of AuxInt · 2d8181e7
      Austin Clements authored
      The way Value.AuxInt represents unsigned numbers is currently
      documented in genericOps.go, which is not the most obvious place for
      it. Move that documentation to Value.AuxInt. Furthermore, to make it
      harder to use incorrectly, introduce a Value.AuxUnsigned accessor that
      returns the zero-extended value of Value.AuxInt.
      
      Change-Id: I85030c3c68761404058a430e0b1c7464591b2f42
      Reviewed-on: https://go-review.googlesource.com/102597
      Run-TryBot: Austin Clements <austin@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarCherry Zhang <cherryyz@google.com>
      2d8181e7
    • Tobias Klauser's avatar
      cmd/cgo: add support for GOARCH=sparc64 · a29e25b8
      Tobias Klauser authored
      Even though GOARCH=sparc64 is not supported by gc (yet), it is easy to
      make cgo already support it.
      
      This e.g. allows to generate Go type definitions for linux/sparc64 in
      the golang.org/x/sys/unix package without using gccgo.
      
      Change-Id: I8886c81e7c895a0d93e350d81ed653fb59d95dd8
      Reviewed-on: https://go-review.googlesource.com/102555
      Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      a29e25b8
    • David Chase's avatar
      cmd/compile: invoke gdb more carefully in ssa/debug_test.go · a934e34e
      David Chase authored
      Gdb can be sensitive to contents of .gdbinit, and to run
      this test properly needs to have runtime/runtime-gdb.py
      on the auto load safe path.  Therefore, turn off .gdbinit
      loading and explicitly add $GOROOT/runtime to the safe
      load path.
      
      This should make ssa/debug_test.go run more consistently.
      
      Updates #24464.
      
      Change-Id: I63ed17c032cb3773048713ce51fca3a3f86e79b6
      Reviewed-on: https://go-review.googlesource.com/102598
      Run-TryBot: David Chase <drchase@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      a934e34e
    • Ilya Tocar's avatar
      cmd/internal/obj/x86: use PutOpBytesLit in more places · 3db3826a
      Ilya Tocar authored
      We already replaced most loops with PutOpBytesLit where possible,
      do this in a last few places.
      
      Change-Id: I8c90de017810145a12394fa6b887755e9111b22a
      Reviewed-on: https://go-review.googlesource.com/102276
      Run-TryBot: Ilya Tocar <ilya.tocar@intel.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarCherry Zhang <cherryyz@google.com>
      3db3826a
    • David Chase's avatar
      cmd/compile: finish GOEXPERIMENT=preemptibleloops repair · f7404974
      David Chase authored
      A newish check for branch-likely on single-successor blocks
      caught a case where the preemption-check inserter was
      setting "likely" on an unconditional branch.
      
      Fixed by checking for that case before setting likely.
      
      Also removed an overconservative restriction on parallel
      compilation for GOEXPERIMENT=preemptibleloops; it works
      fine, it is just another control-flow transformation.
      
      Change-Id: I8e786e6281e0631cac8d80cff67bfb6402b4d225
      Reviewed-on: https://go-review.googlesource.com/102317
      Run-TryBot: David Chase <drchase@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarAustin Clements <austin@google.com>
      f7404974
    • Michael Munday's avatar
      cmd/compile: use 32-bit comparisons where possible on s390x · 8afa8a33
      Michael Munday authored
      We use 32-bit operations for 8- and 16-bit arithmetic, so use them
      for comparisons too. This won't change performance but it is more
      consistent and makes testing 8- and 16-bit comparison codegen
      slightly more straightforward (for follow up CL).
      
      Also fix a typo and add some additional double sign and zero
      extension rules to remove the operations inserted by the comparison
      rules.
      
      Change-Id: I89ec1b0e09cb8be8090cf007be283ad88bba75a4
      Reviewed-on: https://go-review.googlesource.com/102556
      Run-TryBot: Michael Munday <mike.munday@ibm.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      8afa8a33
    • Zhou Peng's avatar
      runtime: fix comment typo · 3412baaa
      Zhou Peng authored
      This was a typo mistake according to if cond and runtime/mheap.go:323
      
      Change-Id: Id046d4afbfe0ea43cb29e1a9f400e1f130de221d
      Reviewed-on: https://go-review.googlesource.com/102575Reviewed-by: 's avatarAustin Clements <austin@google.com>
      3412baaa
    • Erwin Oegema's avatar
      path/filepath: change example to print the correct path on failure · 683e2fd5
      Erwin Oegema authored
      This change makes errors in the example code a bit better, as it's no use to show the root dir when an error occurs walking a subdirectory or file.
      
      Change-Id: I546276e9b151fabba5357258f03bfbd47a508201
      GitHub-Last-Rev: 398c1eeb6164a7edc6fdee8cb8c17c3bd0b649ef
      GitHub-Pull-Request: golang/go#24536
      Reviewed-on: https://go-review.googlesource.com/102535Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      683e2fd5
    • Agniva De Sarker's avatar
      io: document that ReadAtLeast and ReadFull can drop errors · 665af046
      Agniva De Sarker authored
      Add a note that if an error is returned after having read
      at least the minimum no. of bytes, the error is set to nil.
      
      Fixes #20477
      
      Change-Id: I75ba5ee967be3ff80249e40d459da4afeeb53463
      Reviewed-on: https://go-review.googlesource.com/102459Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      665af046
    • Hana Kim's avatar
      internal/trace: compute span stats as computing goroutine stats · 68a1c9c4
      Hana Kim authored
      Move part of UserSpan event processing from cmd/trace.analyzeAnnotations
      to internal/trace.GoroutineStats that returns analyzed per-goroutine
      execution information. Now the execution information includes list of
      spans and their execution information.
      
      cmd/trace.analyzeAnnotations utilizes the span execution information
      from internal/trace.GoroutineStats and connects them with task
      information.
      
      Change-Id: Ib7f79a3ba652a4ae55cd81ea17565bcc7e241c5c
      Reviewed-on: https://go-review.googlesource.com/101917
      Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarHeschi Kreinick <heschi@google.com>
      Reviewed-by: 's avatarPeter Weinberger <pjw@google.com>
      68a1c9c4
    • Ilya Tocar's avatar
      cmd/compile/internal/ssa: optimize away double NEG on amd64 · 24cd1120
      Ilya Tocar authored
      When lowering some ops on amd64 we generate additional NEGQ.
      This may result in code like this:
      
      NEGQ R12
      NEGQ R12
      
      Optimize it away. Gain is not significant, about ~0.5% gain in geomean
      in compress/flate and 200 bytes codesize reduction in go tool.
      
      Full results below:
      
      name                             old time/op    new time/op    delta
      Encode/Digits/Huffman/1e4-6        65.8µs ± 0%    65.7µs ± 0%  -0.21%  (p=0.010 n=10+9)
      Encode/Digits/Huffman/1e5-6         633µs ± 0%     632µs ± 0%    ~     (p=0.370 n=8+9)
      Encode/Digits/Huffman/1e6-6        6.30ms ± 1%    6.29ms ± 1%    ~     (p=0.796 n=10+10)
      Encode/Digits/Speed/1e4-6           281µs ± 0%     280µs ± 1%  -0.34%  (p=0.043 n=8+10)
      Encode/Digits/Speed/1e5-6          2.66ms ± 0%    2.66ms ± 0%  -0.09%  (p=0.043 n=10+10)
      Encode/Digits/Speed/1e6-6          26.3ms ± 0%    26.3ms ± 0%    ~     (p=0.190 n=10+10)
      Encode/Digits/Default/1e4-6         554µs ± 0%     557µs ± 0%  +0.46%  (p=0.001 n=9+10)
      Encode/Digits/Default/1e5-6        8.63ms ± 1%    8.62ms ± 1%    ~     (p=0.912 n=10+10)
      Encode/Digits/Default/1e6-6        92.7ms ± 1%    92.2ms ± 1%    ~     (p=0.052 n=10+10)
      Encode/Digits/Compression/1e4-6     558µs ± 1%     557µs ± 1%    ~     (p=0.481 n=10+10)
      Encode/Digits/Compression/1e5-6    8.58ms ± 0%    8.61ms ± 1%    ~     (p=0.315 n=8+10)
      Encode/Digits/Compression/1e6-6    92.3ms ± 1%    92.4ms ± 1%    ~     (p=0.971 n=10+10)
      Encode/Twain/Huffman/1e4-6         89.5µs ± 0%    89.0µs ± 1%  -0.48%  (p=0.001 n=9+9)
      Encode/Twain/Huffman/1e5-6          727µs ± 1%     728µs ± 0%    ~     (p=0.604 n=10+9)
      Encode/Twain/Huffman/1e6-6         7.21ms ± 0%    7.19ms ± 1%    ~     (p=0.696 n=8+10)
      Encode/Twain/Speed/1e4-6            320µs ± 1%     321µs ± 1%    ~     (p=0.353 n=10+10)
      Encode/Twain/Speed/1e5-6           2.63ms ± 0%    2.62ms ± 1%  -0.33%  (p=0.016 n=8+10)
      Encode/Twain/Speed/1e6-6           25.8ms ± 0%    25.8ms ± 0%    ~     (p=0.360 n=10+8)
      Encode/Twain/Default/1e4-6          677µs ± 1%     671µs ± 1%  -0.88%  (p=0.000 n=10+10)
      Encode/Twain/Default/1e5-6         10.5ms ± 1%    10.3ms ± 0%  -2.06%  (p=0.000 n=10+10)
      Encode/Twain/Default/1e6-6          113ms ± 1%     111ms ± 1%  -1.96%  (p=0.000 n=10+9)
      Encode/Twain/Compression/1e4-6      688µs ± 0%     679µs ± 1%  -1.30%  (p=0.000 n=7+10)
      Encode/Twain/Compression/1e5-6     11.6ms ± 1%    11.3ms ± 1%  -2.10%  (p=0.000 n=10+10)
      Encode/Twain/Compression/1e6-6      126ms ± 1%     124ms ± 0%  -1.57%  (p=0.000 n=10+10)
      [Geo mean]                         3.45ms         3.44ms       -0.46%
      
      name                             old speed      new speed      delta
      Encode/Digits/Huffman/1e4-6       152MB/s ± 0%   152MB/s ± 0%  +0.21%  (p=0.009 n=10+9)
      Encode/Digits/Huffman/1e5-6       158MB/s ± 0%   158MB/s ± 0%    ~     (p=0.336 n=8+9)
      Encode/Digits/Huffman/1e6-6       159MB/s ± 1%   159MB/s ± 1%    ~     (p=0.781 n=10+10)
      Encode/Digits/Speed/1e4-6        35.6MB/s ± 0%  35.7MB/s ± 1%  +0.34%  (p=0.020 n=8+10)
      Encode/Digits/Speed/1e5-6        37.6MB/s ± 0%  37.7MB/s ± 0%  +0.09%  (p=0.049 n=10+10)
      Encode/Digits/Speed/1e6-6        38.0MB/s ± 0%  38.0MB/s ± 0%    ~     (p=0.146 n=10+10)
      Encode/Digits/Default/1e4-6      18.0MB/s ± 0%  18.0MB/s ± 0%  -0.45%  (p=0.002 n=9+10)
      Encode/Digits/Default/1e5-6      11.6MB/s ± 1%  11.6MB/s ± 1%    ~     (p=0.644 n=10+10)
      Encode/Digits/Default/1e6-6      10.8MB/s ± 1%  10.8MB/s ± 1%  +0.51%  (p=0.044 n=10+10)
      Encode/Digits/Compression/1e4-6  17.9MB/s ± 1%  17.9MB/s ± 1%    ~     (p=0.468 n=10+10)
      Encode/Digits/Compression/1e5-6  11.7MB/s ± 0%  11.6MB/s ± 1%    ~     (p=0.322 n=8+10)
      Encode/Digits/Compression/1e6-6  10.8MB/s ± 1%  10.8MB/s ± 1%    ~     (p=0.983 n=10+10)
      Encode/Twain/Huffman/1e4-6        112MB/s ± 0%   112MB/s ± 1%  +0.42%  (p=0.002 n=8+9)
      Encode/Twain/Huffman/1e5-6        138MB/s ± 1%   137MB/s ± 0%    ~     (p=0.616 n=10+9)
      Encode/Twain/Huffman/1e6-6        139MB/s ± 0%   139MB/s ± 1%    ~     (p=0.652 n=8+10)
      Encode/Twain/Speed/1e4-6         31.3MB/s ± 1%  31.2MB/s ± 1%    ~     (p=0.342 n=10+10)
      Encode/Twain/Speed/1e5-6         38.0MB/s ± 0%  38.1MB/s ± 1%  +0.33%  (p=0.011 n=8+10)
      Encode/Twain/Speed/1e6-6         38.8MB/s ± 0%  38.7MB/s ± 0%    ~     (p=0.325 n=10+8)
      Encode/Twain/Default/1e4-6       14.8MB/s ± 1%  14.9MB/s ± 1%  +0.88%  (p=0.000 n=10+10)
      Encode/Twain/Default/1e5-6       9.48MB/s ± 1%  9.68MB/s ± 0%  +2.11%  (p=0.000 n=10+10)
      Encode/Twain/Default/1e6-6       8.86MB/s ± 1%  9.03MB/s ± 1%  +1.97%  (p=0.000 n=10+9)
      Encode/Twain/Compression/1e4-6   14.5MB/s ± 0%  14.7MB/s ± 1%  +1.31%  (p=0.000 n=7+10)
      Encode/Twain/Compression/1e5-6   8.63MB/s ± 1%  8.82MB/s ± 1%  +2.17%  (p=0.000 n=10+10)
      Encode/Twain/Compression/1e6-6   7.92MB/s ± 1%  8.05MB/s ± 1%  +1.59%  (p=0.000 n=10+10)
      [Geo mean]                       29.0MB/s       29.1MB/s       +0.47%
      
      // symSizeComp `which go` go_old:
      
      section differences:
      global text (code) = 203 bytes (0.005131%)
      read-only data = 1 bytes (0.000057%)
      Total difference 204 bytes (0.003297%)
      
      Change-Id: Ie2cdfa1216472d78694fff44d215b3b8e71cf7bf
      Reviewed-on: https://go-review.googlesource.com/102277
      Run-TryBot: Ilya Tocar <ilya.tocar@intel.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarKeith Randall <khr@golang.org>
      24cd1120
    • Hana (Hyang-Ah) Kim's avatar
      cmd/trace: beautify goroutine page · ea1f4832
      Hana (Hyang-Ah) Kim authored
      - Summary: also includes links to pprof data.
      - Sortable table: sorting is done on server-side. The intention is
        that later, I want to add pagination feature and limit the page
        size the browser has to handle.
      - Stacked horizontal bar graph to present total time breakdown.
      - Human-friendly time representation.
      - No dependency on external fancy javascript libraries to allow
        it to function without an internet connection.
      
      Change-Id: I91e5c26746e59ad0329dfb61e096e11f768c7b73
      Reviewed-on: https://go-review.googlesource.com/102156
      Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarAndrew Bonventre <andybons@golang.org>
      Reviewed-by: 's avatarHeschi Kreinick <heschi@google.com>
      ea1f4832
    • Alex Brainman's avatar
      os: do not test Lstat in TestDevNullFile · d2dd2e15
      Alex Brainman authored
      CL 102456 added Lstat check to TestDevNullFile.
      But some systems have /dev/null as a symlink,
      so Lstat test is wrong. Remove the test.
      
      Fixes #24521
      
      Change-Id: I149110b08dd05db6495ec4eccbcf943e444332f9
      Reviewed-on: https://go-review.googlesource.com/102461
      Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
      Reviewed-by: 's avatarTobias Klauser <tobias.klauser@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      d2dd2e15
  3. 25 Mar, 2018 6 commits
    • Alberto Donizetti's avatar
      cmd/compile: avoid some allocations in regalloc · 2ba98f1a
      Alberto Donizetti authored
      Compilebench:
      name      old time/op       new time/op       delta
      Template        283ms ± 3%        281ms ± 4%    ~     (p=0.242 n=20+20)
      Unicode         137ms ± 6%        135ms ± 6%    ~     (p=0.194 n=20+19)
      GoTypes         890ms ± 2%        883ms ± 1%  -0.74%  (p=0.001 n=19+19)
      Compiler        4.21s ± 2%        4.20s ± 2%  -0.40%  (p=0.033 n=20+19)
      SSA             9.86s ± 2%        9.68s ± 1%  -1.80%  (p=0.000 n=20+19)
      Flate           185ms ± 5%        185ms ± 7%    ~     (p=0.429 n=20+20)
      GoParser        222ms ± 3%        222ms ± 4%    ~     (p=0.588 n=19+20)
      Reflect         572ms ± 2%        570ms ± 3%    ~     (p=0.113 n=19+20)
      Tar             263ms ± 4%        259ms ± 2%  -1.41%  (p=0.013 n=20+20)
      XML             321ms ± 2%        321ms ± 4%    ~     (p=0.835 n=20+19)
      
      name      old user-time/op  new user-time/op  delta
      Template        400ms ± 5%        405ms ± 5%    ~     (p=0.096 n=20+20)
      Unicode         217ms ± 8%        213ms ± 8%    ~     (p=0.242 n=20+20)
      GoTypes         1.23s ± 3%        1.22s ± 3%    ~     (p=0.923 n=19+20)
      Compiler        5.76s ± 6%        5.81s ± 2%    ~     (p=0.687 n=20+19)
      SSA             14.2s ± 4%        14.0s ± 4%    ~     (p=0.121 n=20+20)
      Flate           248ms ± 7%        251ms ±10%    ~     (p=0.369 n=20+20)
      GoParser        308ms ± 5%        305ms ± 6%    ~     (p=0.336 n=19+20)
      Reflect         771ms ± 2%        766ms ± 2%    ~     (p=0.113 n=20+19)
      Tar             370ms ± 5%        362ms ± 7%  -2.06%  (p=0.036 n=19+20)
      XML             435ms ± 4%        432ms ± 5%    ~     (p=0.369 n=20+20)
      
      name      old alloc/op      new alloc/op      delta
      Template       39.5MB ± 0%       39.4MB ± 0%  -0.20%  (p=0.000 n=20+20)
      Unicode        29.1MB ± 0%       29.1MB ± 0%    ~     (p=0.064 n=20+20)
      GoTypes         117MB ± 0%        117MB ± 0%  -0.17%  (p=0.000 n=20+20)
      Compiler        503MB ± 0%        502MB ± 0%  -0.15%  (p=0.000 n=19+19)
      SSA            1.42GB ± 0%       1.42GB ± 0%  -0.16%  (p=0.000 n=20+20)
      Flate          25.3MB ± 0%       25.3MB ± 0%  -0.19%  (p=0.000 n=20+20)
      GoParser       31.4MB ± 0%       31.3MB ± 0%  -0.14%  (p=0.000 n=20+18)
      Reflect        78.1MB ± 0%       77.9MB ± 0%  -0.34%  (p=0.000 n=20+19)
      Tar            40.1MB ± 0%       40.0MB ± 0%  -0.17%  (p=0.000 n=20+20)
      XML            45.3MB ± 0%       45.2MB ± 0%  -0.13%  (p=0.000 n=20+20)
      
      name      old allocs/op     new allocs/op     delta
      Template         393k ± 0%         392k ± 0%  -0.21%  (p=0.000 n=20+19)
      Unicode          337k ± 0%         337k ± 0%  -0.02%  (p=0.000 n=20+20)
      GoTypes         1.22M ± 0%        1.22M ± 0%  -0.21%  (p=0.000 n=20+20)
      Compiler        4.77M ± 0%        4.76M ± 0%  -0.16%  (p=0.000 n=20+20)
      SSA             11.8M ± 0%        11.8M ± 0%  -0.12%  (p=0.000 n=20+20)
      Flate            242k ± 0%         241k ± 0%  -0.20%  (p=0.000 n=20+20)
      GoParser         324k ± 0%         324k ± 0%  -0.14%  (p=0.000 n=20+20)
      Reflect          985k ± 0%         981k ± 0%  -0.38%  (p=0.000 n=20+20)
      Tar              403k ± 0%         402k ± 0%  -0.19%  (p=0.000 n=20+20)
      XML              424k ± 0%         424k ± 0%  -0.16%  (p=0.000 n=19+20)
      
      Change-Id: I131e382b64cd6db11a9263a477d45d80c180c499
      Reviewed-on: https://go-review.googlesource.com/102421
      Run-TryBot: Alberto Donizetti <alb.donizetti@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      2ba98f1a
    • Agniva De Sarker's avatar
      net/http: use top-level font media type · c0ce2925
      Agniva De Sarker authored
      RFC 8081 declares a top level font media type for all types of fonts.
      Updating the mime types in sniffer to reflect the new changes.
      
      Fixes #24524
      
      Change-Id: Iba6cef4c5974e9930e14705720d42550ee87ba56
      Reviewed-on: https://go-review.googlesource.com/102458
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      c0ce2925
    • Alex Brainman's avatar
      os: treat "nul" as DevNull file on windows · 48c4eeee
      Alex Brainman authored
      Also add more tests to test both nul and NUL on windows.
      
      Fixes #24482
      
      Change-Id: I3dfe68ec8de7f90ca869c1096dde0054df3c5cf6
      Reviewed-on: https://go-review.googlesource.com/102457Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      48c4eeee
    • Josh Bleecher Snyder's avatar
      net: deflake lookup tests · 5ce92d03
      Josh Bleecher Snyder authored
      The build dashboard is dotted with net test failures.
      We cannot declare all builders to have flaky networks,
      although all fundamentally do.
      
      Instead, add a simple retry/backoff loop to the ones that
      show up most commonly on the dashboard at this moment.
      
      If this approach works well in practice, we can
      incrementally apply it to other flaky net tests.
      
      Change-Id: I69c1ca6ce5b347ad549c7eb18d0438373f6e2489
      Reviewed-on: https://go-review.googlesource.com/102397
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      5ce92d03
    • Kevin Burke's avatar
      database/sql: add more examples · 6f08b9fa
      Kevin Burke authored
      This aims to expand the coverage of examples showing how the sql
      package works, as well as to address a number of issues I've observed
      while explaining how the database package works:
      
      - The best way to issue UPDATE or INSERT queries, that don't need
      to scan anything in return. (Previously, we had no examples for any
      Execute statement).
      
      - How to use prepared statements and transactions.
      
      - How to aggregate arguments from a Query/QueryContext query into
      a slice.
      
      Furthermore just having examples in more places should help, as users
      click on e.g. the "Rows" return parameter and are treated with the
      lack of any example about how Rows is used.
      
      Switch package examples to use QueryContext/QueryRowContext; I think
      it is a good practice to prepare users to issue queries with a timeout
      attached, even if they are not using it immediately.
      
      Change-Id: I4e63af91c7e4fff88b25f820906104ecefde4cc3
      Reviewed-on: https://go-review.googlesource.com/91015Reviewed-by: 's avatarDaniel Theophanes <kardianos@gmail.com>
      Run-TryBot: Daniel Theophanes <kardianos@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      6f08b9fa
    • Alex Brainman's avatar
      os: document DevNull on windows · 782f9ce5
      Alex Brainman authored
      DevNull is documented on darwin, dragonfly, freebsd, linux,
      nacl, netbsd, openbsd, solaris and plan9, but not on windows.
      Add missing documentation.
      
      Change-Id: Icdbded0dd5e322ed4360cbce6bee4cdca5cfbe72
      Reviewed-on: https://go-review.googlesource.com/102456
      Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      782f9ce5
  4. 24 Mar, 2018 1 commit