1. 23 Apr, 2018 6 commits
    • ludweeg's avatar
      crypto: make receiver name consistent · 0cd0dc96
      ludweeg authored
      Fixes go lint warning.
      
      Change-Id: I63950e7c70bf431e88a04f32befd50be9beacadf
      Reviewed-on: https://go-review.googlesource.com/108815Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      0cd0dc96
    • Matthew Dempsky's avatar
      cmd/compile: remove toolstash workaround in bexport.go · 545ef110
      Matthew Dempsky authored
      Change-Id: Ie4facdcab4b35cf7d350c4b8fa06a3c5a0c6caeb
      Reviewed-on: https://go-review.googlesource.com/108875
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      545ef110
    • Matthew Dempsky's avatar
      cmd/compile: replace Field.Nname.Pos with Field.Pos · 7759b32a
      Matthew Dempsky authored
      For struct fields and methods, Field.Nname was only used to store
      position information, which means we're allocating an entire ONAME
      Node+Name+Param structure just for one field. We can optimize away
      these ONAME allocations by instead adding a Field.Pos field.
      
      Unfortunately, we can't get rid of Field.Nname, because it's needed
      for function parameters, so Field grows a little bit and now has more
      redundant information in those cases. However, that was already the
      case (e.g., Field.Sym and Field.Nname.Sym), and it's still a net win
      for allocations as demonstrated by the benchmarks below.
      
      Additionally, by moving the ONAME allocation for function parameters
      to funcargs, we can avoid allocating them for function parameters that
      aren't used in corresponding function bodies (e.g., interface methods,
      function-typed variables, and imported functions/methods without
      inline bodies).
      
      name       old time/op       new time/op       delta
      Template         254ms ± 6%        251ms ± 6%  -1.04%  (p=0.000 n=487+488)
      Unicode          128ms ± 7%        128ms ± 7%    ~     (p=0.294 n=482+467)
      GoTypes          862ms ± 5%        860ms ± 4%    ~     (p=0.075 n=488+471)
      Compiler         3.91s ± 4%        3.90s ± 4%  -0.39%  (p=0.000 n=468+473)
      
      name       old user-time/op  new user-time/op  delta
      Template         339ms ±14%        336ms ±14%  -1.02%  (p=0.001 n=498+494)
      Unicode          176ms ±18%        176ms ±25%    ~     (p=0.940 n=491+499)
      GoTypes          1.13s ± 8%        1.13s ± 9%    ~     (p=0.157 n=496+493)
      Compiler         5.24s ± 6%        5.21s ± 6%  -0.57%  (p=0.000 n=485+489)
      
      name       old alloc/op      new alloc/op      delta
      Template        38.3MB ± 0%       37.3MB ± 0%  -2.58%  (p=0.000 n=499+497)
      Unicode         29.1MB ± 0%       29.1MB ± 0%  -0.03%  (p=0.000 n=500+493)
      GoTypes          116MB ± 0%        115MB ± 0%  -0.65%  (p=0.000 n=498+499)
      Compiler         492MB ± 0%        487MB ± 0%  -1.00%  (p=0.000 n=497+498)
      
      name       old allocs/op     new allocs/op     delta
      Template          364k ± 0%         360k ± 0%  -1.15%  (p=0.000 n=499+499)
      Unicode           336k ± 0%         336k ± 0%  -0.01%  (p=0.000 n=500+493)
      GoTypes          1.16M ± 0%        1.16M ± 0%  -0.30%  (p=0.000 n=499+499)
      Compiler         4.54M ± 0%        4.51M ± 0%  -0.58%  (p=0.000 n=494+495)
      
      Passes toolstash-check -gcflags=-dwarf=false. Changes DWARF output
      because position information is now tracked more precisely for
      function parameters.
      
      Change-Id: Ib8077d70d564cc448c5e4290baceab3a4396d712
      Reviewed-on: https://go-review.googlesource.com/108217
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarRobert Griesemer <gri@golang.org>
      7759b32a
    • Austin Clements's avatar
      cmd/compile: don't compact liveness maps in place · bdb65da0
      Austin Clements authored
      Currently Liveness.compact rewrites the Liveness.livevars slice in
      place. However, we're about to add register maps, which we'll want to
      track in livevars, but compact independently from the stack maps.
      Hence, this CL modifies Liveness.compact to consume Liveness.livevars
      and produce a new slice of deduplicated stack maps. This is somewhat
      clearer anyway because it avoids potential confusion over how
      Liveness.livevars is indexed.
      
      Passes toolstash -cmp.
      
      For #24543.
      
      Change-Id: I7093fbc71143f8a29e677aa30c96e501f953ca2b
      Reviewed-on: https://go-review.googlesource.com/108498
      Run-TryBot: Austin Clements <austin@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarDavid Chase <drchase@google.com>
      bdb65da0
    • Elias Naur's avatar
      cmd/link: remove R_ADDR relocation workaround for macho arm64 · 3363e983
      Elias Naur authored
      The workarounds doesn't seem necessary anymore, and blocks DWARF
      on darwin/arm64.
      
      Updates #24883.
      
      Change-Id: Ic917c767d3b4f6c51be25566956296f5dd4ead10
      Reviewed-on: https://go-review.googlesource.com/108655
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
      3363e983
    • ludweeg's avatar
      crypto/md5: make receiver name consistent · 1f718926
      ludweeg authored
      Fixes go lint warning.
      
      Change-Id: I2d73208c6841f35d7a21a1fb4cfafbbd4250228f
      Reviewed-on: https://go-review.googlesource.com/108659Reviewed-by: default avatarIskander Sharipov <iskander.sharipov@intel.com>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Iskander Sharipov <iskander.sharipov@intel.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      1f718926
  2. 22 Apr, 2018 2 commits
  3. 21 Apr, 2018 6 commits
  4. 20 Apr, 2018 18 commits
  5. 19 Apr, 2018 8 commits
    • Michael Fraenkel's avatar
      net: calling File leaves the socket in nonblocking mode · 60e3ebb9
      Michael Fraenkel authored
      On Unix systems, the underlying socket is no longer forced into blocking
      mode.
      
      Fixes #24942
      
      Change-Id: I3e0c503c72df0844e30a63af298691dedacd1f46
      Reviewed-on: https://go-review.googlesource.com/108297
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      60e3ebb9
    • Jason A. Donenfeld's avatar
      syscall: avoid extra syscall on send/recvmsg on Linux · 68c10286
      Jason A. Donenfeld authored
      By simply rearranging the logic, we avoid the overhead of a superfluous
      call to getsockopt. For, if p is already non empty, there's no point
      in having to check if we need to attach dummy payload. This has
      performance benefits when using send/recvmsg for high speed
      communications.
      
      Change-Id: Id85cff17328ecbf6d09dd52fbeeaa691dbe69b75
      Reviewed-on: https://go-review.googlesource.com/108338Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      68c10286
    • Matthew Dempsky's avatar
      cmd/compile: change exporter.pos to take src.XPos instead of *Node · 1c439e6e
      Matthew Dempsky authored
      This is to allow followup refactorings that will replace
      Field.Nname.Pos with Field.Pos.
      
      Passes toolstash-check.
      
      Change-Id: I1060b6a37c60273892f7af5369809057cff61881
      Reviewed-on: https://go-review.googlesource.com/108215
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarRobert Griesemer <gri@golang.org>
      1c439e6e
    • weeellz's avatar
      database/sql: remove unnecessary else conditions · da24c95c
      weeellz authored
      Fixes golint warning about "if block ends with a return statement,
      so drop this else and outdent its block".
      
      Change-Id: Iac4fd324e04e3e3fe3e3933f5e59095041d292c5
      Reviewed-on: https://go-review.googlesource.com/107115Reviewed-by: default avatarDaniel Martí <mvdan@mvdan.cc>
      Reviewed-by: default avatarDaniel Theophanes <kardianos@gmail.com>
      Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      da24c95c
    • Jakub Čajka's avatar
      cmd/go/internal/work: support pkgconf 1.4 and later · c63e047d
      Jakub Čajka authored
      Fixes #23373
      
      Fix interfacing with latest(1.4+) pkgconf versions, as they have change the
      output format, by extending parsing function splitPkgConfigOutput to accommodate
      more possible fragment escaping formats. Function is based on pkgconfigs own
      implementation at
      https://github.com/pkgconf/pkgconf/blob/master/libpkgconf/argvsplit.c. Along
      with this change test case TestSplitPkgConfigOutput have been expanded. Thanks
      to ignatenko for help on test cases and insights in to the pkgconfig.
      
      Change-Id: I55301bb564b07128d5564ec1454dd247f84a95c3
      Reviewed-on: https://go-review.googlesource.com/86541
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      c63e047d
    • Aditya Mukerjee's avatar
      runtime: specify behavior of SetMutexProfileFraction for negative values · 3d8940a9
      Aditya Mukerjee authored
      Change-Id: Ie4da1a515d5405140d742bdcd55f54a73a7f71fe
      Reviewed-on: https://go-review.googlesource.com/108175Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      3d8940a9
    • Ben Shi's avatar
      cmd/compile: optimize ARM64 with register indexed load/store · 34f5f8a5
      Ben Shi authored
      ARM64 supports load/store instructions with a memory operand that
      the address is calculated by base register + index register.
      
      In this CL,
      1. Some rules are added to the compile's ARM64 backend to emit
      such efficient instructions.
      2. A wrong rule of load combination is fixed.
      
      The go1 benchmark does show improvement.
      
      name                     old time/op    new time/op    delta
      BinaryTree17-4              44.5s ± 2%     44.1s ± 1%   -0.81%  (p=0.000 n=28+29)
      Fannkuch11-4                32.7s ± 3%     30.5s ± 0%   -6.79%  (p=0.000 n=30+26)
      FmtFprintfEmpty-4           499ns ± 0%     506ns ± 5%   +1.39%  (p=0.003 n=25+30)
      FmtFprintfString-4         1.07µs ± 0%    1.04µs ± 4%   -3.17%  (p=0.000 n=23+30)
      FmtFprintfInt-4            1.15µs ± 4%    1.13µs ± 0%   -1.55%  (p=0.000 n=30+23)
      FmtFprintfIntInt-4         1.77µs ± 4%    1.74µs ± 0%   -1.71%  (p=0.000 n=30+24)
      FmtFprintfPrefixedInt-4    2.37µs ± 5%    2.12µs ± 0%  -10.56%  (p=0.000 n=30+23)
      FmtFprintfFloat-4          3.03µs ± 1%    3.03µs ± 4%   -0.13%  (p=0.003 n=25+30)
      FmtManyArgs-4              7.38µs ± 1%    7.43µs ± 4%   +0.59%  (p=0.003 n=25+30)
      GobDecode-4                 101ms ± 6%      95ms ± 5%   -5.55%  (p=0.000 n=30+30)
      GobEncode-4                78.0ms ± 4%    78.8ms ± 6%   +1.05%  (p=0.000 n=30+30)
      Gzip-4                      4.25s ± 0%     4.27s ± 4%   +0.45%  (p=0.003 n=24+30)
      Gunzip-4                    428ms ± 1%     420ms ± 0%   -1.88%  (p=0.000 n=23+23)
      HTTPClientServer-4          549µs ± 1%     541µs ± 1%   -1.56%  (p=0.000 n=29+29)
      JSONEncode-4                194ms ± 0%     188ms ± 4%     ~     (p=0.417 n=23+30)
      JSONDecode-4                890ms ± 5%     831ms ± 0%   -6.55%  (p=0.000 n=30+23)
      Mandelbrot200-4            47.3ms ± 2%    46.5ms ± 0%     ~     (p=0.980 n=30+26)
      GoParse-4                  43.1ms ± 6%    43.8ms ± 6%   +1.65%  (p=0.000 n=30+30)
      RegexpMatchEasy0_32-4      1.06µs ± 0%    1.07µs ± 3%     ~     (p=0.092 n=23+30)
      RegexpMatchEasy0_1K-4      5.53µs ± 0%    5.51µs ± 0%   -0.24%  (p=0.000 n=25+25)
      RegexpMatchEasy1_32-4      1.02µs ± 3%    1.01µs ± 0%   -1.27%  (p=0.000 n=30+24)
      RegexpMatchEasy1_1K-4      7.26µs ± 0%    7.33µs ± 0%   +0.95%  (p=0.000 n=23+26)
      RegexpMatchMedium_32-4     1.84µs ± 7%    1.79µs ± 1%     ~     (p=0.333 n=30+23)
      RegexpMatchMedium_1K-4      553µs ± 0%     547µs ± 0%   -1.14%  (p=0.000 n=24+22)
      RegexpMatchHard_32-4       30.8µs ± 1%    30.3µs ± 0%   -1.40%  (p=0.000 n=24+24)
      RegexpMatchHard_1K-4        928µs ± 0%     929µs ± 5%   +0.12%  (p=0.013 n=23+30)
      Revcomp-4                   8.13s ± 4%     6.32s ± 1%  -22.23%  (p=0.000 n=30+23)
      Template-4                  899ms ± 6%     854ms ± 1%   -5.01%  (p=0.000 n=30+24)
      TimeParse-4                4.66µs ± 4%    4.59µs ± 1%   -1.57%  (p=0.000 n=30+23)
      TimeFormat-4               4.58µs ± 0%    4.61µs ± 0%   +0.57%  (p=0.000 n=26+24)
      [Geo mean]                  717µs          698µs        -2.55%
      
      name                     old speed      new speed      delta
      GobDecode-4              7.63MB/s ± 6%  8.08MB/s ± 5%   +5.88%  (p=0.000 n=30+30)
      GobEncode-4              9.85MB/s ± 4%  9.75MB/s ± 6%   -1.04%  (p=0.000 n=30+30)
      Gzip-4                   4.56MB/s ± 0%  4.55MB/s ± 4%   -0.36%  (p=0.003 n=24+30)
      Gunzip-4                 45.3MB/s ± 1%  46.2MB/s ± 0%   +1.92%  (p=0.000 n=23+23)
      JSONEncode-4             10.0MB/s ± 0%  10.4MB/s ± 4%     ~     (p=0.403 n=23+30)
      JSONDecode-4             2.18MB/s ± 5%  2.33MB/s ± 0%   +6.91%  (p=0.000 n=30+23)
      GoParse-4                1.34MB/s ± 5%  1.32MB/s ± 5%   -1.66%  (p=0.000 n=30+30)
      RegexpMatchEasy0_32-4    30.2MB/s ± 0%  29.8MB/s ± 3%     ~     (p=0.099 n=23+30)
      RegexpMatchEasy0_1K-4     185MB/s ± 0%   186MB/s ± 0%   +0.24%  (p=0.000 n=25+25)
      RegexpMatchEasy1_32-4    31.4MB/s ± 3%  31.8MB/s ± 0%   +1.24%  (p=0.000 n=30+24)
      RegexpMatchEasy1_1K-4     141MB/s ± 0%   140MB/s ± 0%   -0.94%  (p=0.000 n=23+26)
      RegexpMatchMedium_32-4    541kB/s ± 6%   560kB/s ± 0%   +3.45%  (p=0.000 n=30+23)
      RegexpMatchMedium_1K-4   1.85MB/s ± 0%  1.87MB/s ± 0%   +1.08%  (p=0.000 n=24+23)
      RegexpMatchHard_32-4     1.04MB/s ± 1%  1.06MB/s ± 1%   +1.48%  (p=0.000 n=24+24)
      RegexpMatchHard_1K-4     1.10MB/s ± 0%  1.10MB/s ± 5%   +0.15%  (p=0.004 n=23+30)
      Revcomp-4                31.3MB/s ± 4%  40.2MB/s ± 1%  +28.52%  (p=0.000 n=30+23)
      Template-4               2.16MB/s ± 6%  2.27MB/s ± 1%   +5.18%  (p=0.000 n=30+24)
      [Geo mean]               7.57MB/s       7.79MB/s        +2.98%
      
      fixes #24907
      
      Change-Id: I94afd0e3f53d62a1cf5e452f3dd6daf61be21785
      Reviewed-on: https://go-review.googlesource.com/107376
      Run-TryBot: Cherry Zhang <cherryyz@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
      34f5f8a5
    • Tobias Klauser's avatar
      internal/syscall/windows: convert CRLF line endings · d5a52e70
      Tobias Klauser authored
      CL 99337 introduced a file with CRLF line endings. Convert them to LF
      line endings as in all other Go files.
      
      Change-Id: I68b28fd443f05bebbbd9280d1821c4ccd33a4a8a
      Reviewed-on: https://go-review.googlesource.com/108075
      Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarAlex Brainman <alex.brainman@gmail.com>
      d5a52e70