1. 20 Oct, 2016 14 commits
    • Robert Griesemer's avatar
      cmd/compile: a couple of minor comment fixes · 7ea58297
      Robert Griesemer authored
      Change-Id: If1d08a84c9295816489b1cfdd031ba12892ae963
      Reviewed-on: https://go-review.googlesource.com/31598Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
      7ea58297
    • Nigel Tao's avatar
      image/color: tweak the formula for converting to gray. · 584e3ea2
      Nigel Tao authored
      This makes grayModel and gray16Model in color.go use the exact same
      formula as RGBToYCbCr in ycbcr.go. They were the same formula in theory,
      but in practice the color.go versions used a divide by 1000 and the
      ycbcr.go versions used a (presumably faster) shift by 16.
      
      This implies the nice property that converting an image.RGBA to an
      image.YCbCr and then taking only the Y channel is equivalent to
      converting an image.RGBA directly to an image.Gray.
      
      The difference between the two formulae is non-zero, but small:
      https://play.golang.org/p/qG7oe-eqHI
      
      Updates #16251
      
      Change-Id: I288ecb957fd6eceb9626410bd1a8084d2e4f8198
      Reviewed-on: https://go-review.googlesource.com/31538Reviewed-by: default avatarRob Pike <r@golang.org>
      584e3ea2
    • David Chase's avatar
      cmd/compile: enable flag-specified dump of specific phase+function · a190f3c8
      David Chase authored
      For very large input files, use of GOSSAFUNC to obtain a dump
      after compilation steps can lead to both unwieldy large output
      files and unwieldy larger processes (because the output is
      buffered in a string).  This flag
      
        -d=ssa/<phase>/dump:<function name>
      
      provides finer control of what is dumped, into a smaller
      file, and with less memory overhead in the running compiler.
      The special phase name "build" is added to allow printing
      of the just-built ssa before any transformations are applied.
      
      This was helpful in making sense of the gogo/protobuf
      problems.
      
      The output format was tweaked to remove gratuitous spaces,
      and a crude -d=ssa/help help text was added.
      
      Change-Id: If7516e22203420eb6ed3614f7cee44cb9260f43e
      Reviewed-on: https://go-review.googlesource.com/23044
      Run-TryBot: David Chase <drchase@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarKeith Randall <khr@golang.org>
      a190f3c8
    • Alberto Donizetti's avatar
      runtime/debug: avoid overflow in SetMaxThreads · 10560afb
      Alberto Donizetti authored
      Fixes #16076
      
      Change-Id: I91fa87b642592ee4604537dd8c3197cd61ec8b31
      Reviewed-on: https://go-review.googlesource.com/31516
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      10560afb
    • Michael Munday's avatar
      go/build: reserve GOOS=zos for IBM z/OS · f6f3aef5
      Michael Munday authored
      Closes #17528.
      
      Change-Id: I2ba55ad4e41077808f882ed67a0549f0a00e25d0
      Reviewed-on: https://go-review.googlesource.com/31596
      Run-TryBot: Michael Munday <munday@ca.ibm.com>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      Reviewed-by: default avatarMinux Ma <minux@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      f6f3aef5
    • Ian Lance Taylor's avatar
      cmd/cgo: correct comment on Package.rewriteCall · ca8dd033
      Ian Lance Taylor authored
      Account for changes in https://golang.org/cl/31233.
      
      Change-Id: I3311c6850a3c714d18209fdff500dd817e9dfcb2
      Reviewed-on: https://go-review.googlesource.com/31594Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
      ca8dd033
    • Adam Langley's avatar
      vendor/golang_org/x/crypto/poly1305: update to 3ded668c5379f6951fb0de06174442072e5447d3 · abcf8457
      Adam Langley authored
      This change updates the vendored copy of x/crypto/poly1305, specifically
      to include the following changes:
        3ded668 poly1305: enable assembly for ARM in Go 1.6.
        dec8741 poly1305: fix stack handling in sum_arm.s
      
      Fixes #17499.
      
      Change-Id: I8f152da9599bd15bb976f630b0ef602be05143d3
      Reviewed-on: https://go-review.googlesource.com/31592
      Run-TryBot: Adam Langley <agl@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      abcf8457
    • David Chase's avatar
      cmd/compile: add patterns to improve PPC64 FP comparisons · 33b71dfa
      David Chase authored
      Uncommented 4 comparison rules of this form:
      (NE (CMPWconst [0] (FLessThan cc)) yes no) -> (FLT cc yes no)
      
      Fixes #17507.
      
      Change-Id: I74f34f13526aeee619711c8281a66652d90a962a
      Reviewed-on: https://go-review.googlesource.com/31612
      Run-TryBot: David Chase <drchase@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
      33b71dfa
    • David du Colombier's avatar
      net/http: remove workaround in TestTransportClosesBodyOnError on Plan 9 · f9bbfe4a
      David du Colombier authored
      This issue has been fixed in CL 31390.
      
      Fixes #9554.
      
      Change-Id: Ib8ff4cb1ffcb7cdbf117510b98b4a7e13e4efd2b
      Reviewed-on: https://go-review.googlesource.com/31520
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Run-TryBot: David du Colombier <0intro@gmail.com>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      f9bbfe4a
    • Ilya Tocar's avatar
      cmd/compile/internal/amd64: break dependency for CVTS[LQ]2S[DS] · 8589049d
      Ilya Tocar authored
      CVTSL2SS, CVTSQ2SS, CVTSL2SD, CVTSQ2SD preserve upper part of xmm register,
      introducing false dependency on a previous value.
      Break it by xoring destination with itself.
      Increases size of go executable by 320 bytes, but shows nice improvement on go1.
      Also fixes performance degradation introduced by 1.7.
      
      name                     old time/op    new time/op    delta
      BinaryTree17-4              2.20s ± 1%     2.19s ± 0%  -0.36%        (p=0.000 n=18+16)
      Fannkuch11-4                2.44s ± 1%     2.45s ± 2%  +0.47%        (p=0.030 n=20+20)
      FmtFprintfEmpty-4          40.9ns ± 7%    40.5ns ± 1%    ~           (p=0.531 n=20+16)
      FmtFprintfString-4          111ns ± 2%     111ns ± 1%    ~           (p=0.510 n=18+19)
      FmtFprintfInt-4            98.3ns ± 3%    99.3ns ± 1%  +1.01%        (p=0.003 n=20+18)
      FmtFprintfIntInt-4          148ns ± 3%     147ns ± 1%    ~           (p=0.919 n=20+17)
      FmtFprintfPrefixedInt-4     149ns ± 1%     152ns ± 0%  +1.73%        (p=0.000 n=19+17)
      FmtFprintfFloat-4           231ns ± 0%     231ns ± 1%    ~           (p=0.678 n=18+19)
      FmtManyArgs-4               667ns ± 1%     672ns ± 1%  +0.73%        (p=0.005 n=20+20)
      GobDecode-4                5.60ms ± 0%    5.61ms ± 0%  +0.24%        (p=0.000 n=20+20)
      GobEncode-4                4.74ms ± 0%    4.73ms ± 1%  -0.20%        (p=0.002 n=20+20)
      Gzip-4                      199ms ± 0%     199ms ± 1%  +0.35%        (p=0.000 n=19+20)
      Gunzip-4                   31.8ms ± 1%    31.5ms ± 1%  -0.89%        (p=0.000 n=20+20)
      HTTPClientServer-4         38.1µs ± 1%    38.0µs ± 1%    ~           (p=0.117 n=19+18)
      JSONEncode-4               14.2ms ± 1%    13.4ms ± 0%  -5.73%        (p=0.000 n=20+20)
      JSONDecode-4               42.7ms ± 0%    42.7ms ± 1%  +0.18%        (p=0.019 n=18+19)
      Mandelbrot200-4            3.26ms ± 0%    2.99ms ± 0%  -8.38%        (p=0.000 n=19+19)
      GoParse-4                  2.76ms ± 1%    2.76ms ± 1%    ~           (p=0.583 n=20+20)
      RegexpMatchEasy0_32-4      69.5ns ± 0%    69.6ns ± 0%  +0.10%        (p=0.017 n=16+17)
      RegexpMatchEasy0_1K-4       703ns ± 0%     708ns ± 3%  +0.65%        (p=0.000 n=17+18)
      RegexpMatchEasy1_32-4      68.2ns ± 1%    68.2ns ± 2%    ~           (p=0.094 n=18+20)
      RegexpMatchEasy1_1K-4       288ns ± 1%     288ns ± 0%    ~           (p=0.403 n=17+18)
      RegexpMatchMedium_32-4      104ns ± 2%     103ns ± 1%    ~           (p=0.110 n=20+16)
      RegexpMatchMedium_1K-4     31.7µs ± 3%    31.7µs ± 3%    ~           (p=0.091 n=19+20)
      RegexpMatchHard_32-4       1.59µs ± 2%    1.58µs ± 2%    ~           (p=0.083 n=20+20)
      RegexpMatchHard_1K-4       48.1µs ± 3%    47.9µs ± 2%    ~           (p=0.461 n=20+19)
      Revcomp-4                   344ms ± 0%     345ms ± 0%  +0.08%        (p=0.009 n=18+17)
      Template-4                 44.8ms ± 1%    44.7ms ± 1%    ~           (p=0.277 n=20+20)
      TimeParse-4                 258ns ± 0%     258ns ± 0%    ~     (all samples are equal)
      TimeFormat-4                275ns ± 0%     273ns ± 0%  -0.64%        (p=0.000 n=20+18)
      
      name                     old speed      new speed      delta
      GobDecode-4               137MB/s ± 0%   137MB/s ± 0%  -0.24%        (p=0.000 n=20+20)
      GobEncode-4               162MB/s ± 0%   162MB/s ± 0%  +0.20%        (p=0.002 n=20+20)
      Gzip-4                   97.6MB/s ± 0%  97.3MB/s ± 1%  -0.35%        (p=0.000 n=19+20)
      Gunzip-4                  610MB/s ± 1%   615MB/s ± 1%  +0.89%        (p=0.000 n=20+20)
      JSONEncode-4              136MB/s ± 1%   145MB/s ± 0%  +6.08%        (p=0.000 n=20+20)
      JSONDecode-4             45.5MB/s ± 0%  45.4MB/s ± 1%  -0.17%        (p=0.017 n=18+19)
      GoParse-4                21.0MB/s ± 1%  21.0MB/s ± 1%    ~           (p=0.578 n=20+20)
      RegexpMatchEasy0_32-4     460MB/s ± 0%   460MB/s ± 0%  -0.09%        (p=0.031 n=16+17)
      RegexpMatchEasy0_1K-4    1.46GB/s ± 0%  1.45GB/s ± 3%  -0.64%        (p=0.000 n=17+18)
      RegexpMatchEasy1_32-4     469MB/s ± 0%   469MB/s ± 2%  +0.06%        (p=0.043 n=18+20)
      RegexpMatchEasy1_1K-4    3.55GB/s ± 1%  3.55GB/s ± 0%    ~           (p=0.057 n=17+18)
      RegexpMatchMedium_32-4   9.61MB/s ± 2%  9.64MB/s ± 2%    ~           (p=0.856 n=20+20)
      RegexpMatchMedium_1K-4   32.3MB/s ± 3%  32.3MB/s ± 3%    ~           (p=0.085 n=19+20)
      RegexpMatchHard_32-4     20.1MB/s ± 2%  20.2MB/s ± 2%    ~           (p=0.086 n=20+20)
      RegexpMatchHard_1K-4     21.3MB/s ± 3%  21.4MB/s ± 2%    ~           (p=0.578 n=20+20)
      Revcomp-4                 738MB/s ± 0%   737MB/s ± 0%  -0.08%        (p=0.009 n=18+17)
      Template-4               43.3MB/s ± 1%  43.4MB/s ± 1%    ~           (p=0.274 n=20+20)
      
      Fixes #16982
      
      Change-Id: If574d66f39f4183a9b1d5ffff0339909cc73f59d
      Reviewed-on: https://go-review.googlesource.com/31490
      Run-TryBot: Ilya Tocar <ilya.tocar@intel.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarKeith Randall <khr@golang.org>
      8589049d
    • Ilya Tocar's avatar
      cmd/internal/obj/x86: add some missing AMD64 instructions · 5ce715fd
      Ilya Tocar authored
      Add VBROADCASTSD, BROADCASTSS, MOVDDUP, MOVSHDUP, MOVSLDUP,
      VMOVDDUP, VMOVSHDUP, VMOVSLDUP.
      
      Fixes #16007
      
      Change-Id: I9614e58eed6c1b6f299d9b4f0b1a7750aa7c1725
      Reviewed-on: https://go-review.googlesource.com/31491
      Run-TryBot: Ilya Tocar <ilya.tocar@intel.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarDavid Chase <drchase@google.com>
      5ce715fd
    • Daniel Theophanes's avatar
      database/sql: add missing unlock when context is expired · 692df217
      Daniel Theophanes authored
      Missing the DB mutex unlock on an early return after checking
      if the context has expired.
      
      Fixes #17518
      
      Change-Id: I247cafcef62623d813f534a941f3d5a3744f0738
      Reviewed-on: https://go-review.googlesource.com/31494Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      692df217
    • Alberto Donizetti's avatar
      lib/time: update to IANA release 2016g (September 2016) · 9cefbe9d
      Alberto Donizetti authored
      Change-Id: Ie6258602554c5bb6685c9de42ccda84d297af1e2
      Reviewed-on: https://go-review.googlesource.com/31515
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      9cefbe9d
    • Joe Tsai's avatar
      archive/tar: fix parsePAXTime · ef8e85e8
      Joe Tsai authored
      Issues fixed:
      * Could not handle quantity of seconds greater than 1<<31 on
      32bit machines since strconv.ParseInt did not treat integers as 64b.
      * Did not handle negative timestamps properly if nanoseconds were used.
      Note that "-123.456" should result in a call to time.Unix(-123, -456000000).
      * Incorrectly allowed a '-' right after the '.' (e.g., -123.-456)
      * Did not detect invalid input after the truncation point (e.g., 123.123456789badbadbad).
      
      Note that negative timestamps are allowed by PAX, but are not guaranteed
      to be portable. See the relevant specification:
      <<<
      If pax encounters a file with a negative timestamp in copy or write mode,
      it can reject the file, substitute a non-negative timestamp, or generate
      a non-portable timestamp with a leading '-'.
      >>>
      
      Since the previous behavior already partially supported negative timestamps,
      we are bound by Go's compatibility rules to keep support for them.
      However, we should at least make sure we handle them properly.
      
      Change-Id: I5686997708bfb59110ea7981175427290be737d1
      Reviewed-on: https://go-review.googlesource.com/31441
      Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      ef8e85e8
  2. 19 Oct, 2016 26 commits