1. Feb 05, 2017
  2. Feb 04, 2017
  3. Feb 03, 2017
    • Keith Randall's avatar
      cmd/compile: make sure output params are live if there is a defer · 8179b9b4
      Keith Randall authored
      If there is a defer, and that defer recovers, then the caller
      can see all of the output parameters.  That means that we must
      mark all the output parameters live at any point which might panic.
      
      If there is no defer then this is not necessary.  This is implemented.
      
      We could also detect whether there is a recover in any of the defers.
      If not, we would need to mark only output params that the defer
      actually references (and the closure mechanism already does that).
      This is not implemented.
      
      Fixes #18860.
      
      Change-Id: If984fe6686eddce9408bf25e725dd17fc16b8578
      Reviewed-on: https://go-review.googlesource.com/36030
      
      
      Reviewed-by: default avatarAustin Clements <austin@google.com>
      Reviewed-by: default avatarRuss Cox <rsc@golang.org>
      8179b9b4
    • Josh Bleecher Snyder's avatar
      cmd/compile: optimize (ZeroExt (Const [c])) · 12c58bbf
      Josh Bleecher Snyder authored
      These rules trigger 116 times while running make.bash.
      And at least for the sample code at
      https://github.com/golang/go/issues/18906#issuecomment-277174241
      they are providing optimizations not already present
      in amd64.
      
      Updates #18906
      
      Change-Id: I410a480f566f5ab176fc573fb5ac74f9cffec225
      Reviewed-on: https://go-review.googlesource.com/36217
      
      
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      Reviewed-by: default avatarKeith Randall <khr@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      12c58bbf
    • Josh Bleecher Snyder's avatar
      cmd/compile: speed up hot phi insertion code · 61fb2f6d
      Josh Bleecher Snyder authored
      This speeds up compilation of the code in #8225 by 25%-30%.
      The complexity of the algorithm is unchanged,
      but this shrinks the constant factor so much that it doesn't matter,
      even the size of the giant type switch gets scaled up dramatically.
      
      name       old time/op      new time/op      delta
      Template        218ms ± 5%       217ms ±10%    ~           (p=0.163 n=27+30)
      Unicode        98.2ms ± 6%      97.7ms ±10%    ~           (p=0.150 n=27+29)
      GoTypes         654ms ± 5%       650ms ± 5%    ~           (p=0.350 n=30+30)
      Compiler        2.70s ± 4%       2.68s ± 3%    ~           (p=0.128 n=30+29)
      
      name       old user-ns/op   new user-ns/op   delta
      Template   276user-ms ± 6%  271user-ms ± 7%  -1.83%        (p=0.003 n=29+28)
      Unicode    138user-ms ± 5%  137user-ms ± 4%    ~           (p=0.071 n=27+27)
      GoTypes    881user-ms ± 4%  877user-ms ± 4%    ~           (p=0.423 n=30+30)
      Compiler   3.76user-s ± 4%  3.72user-s ± 2%  -0.84%        (p=0.028 n=30+29)
      
      name       old alloc/op     new alloc/op     delta
      Template       40.7MB ± 0%      40.7MB ± 0%    ~           (p=0.936 n=30+30)
      Unicode        30.8MB ± 0%      30.8MB ± 0%    ~           (p=0.859 n=28+30)
      GoTypes         123MB ± 0%       123MB ± 0%    ~           (p=0.273 n=30+30)
      Compiler        472MB ± 0%       472MB ± 0%    ~           (p=0.432 n=30+30)
      
      name       old allocs/op    new allocs/op    delta
      Template         401k ± 1%        401k ± 1%    ~           (p=0.859 n=30+30)
      Unicode          331k ± 0%        331k ± 1%    ~           (p=0.823 n=28+30)
      GoTypes         1.24M ± 0%       1.24M ± 0%    ~           (p=0.286 n=30+30)
      Compiler        4.26M ± 0%       4.26M ± 0%    ~           (p=0.359 n=30+30)
      
      Change-Id: Ia850065a9a84c07a5b0b4e23c1758b5679498da7
      Reviewed-on: https://go-review.googlesource.com/36112
      
      
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarKeith Randall <khr@golang.org>
      61fb2f6d
    • Keith Randall's avatar
      runtime: darwin/amd64, don't depend on outarg slots being unmodified · 69e16349
      Keith Randall authored
      sigtramp was calling sigtrampgo and depending on the fact that
      the 3rd argument slot will not be modified on return.  Our calling
      convention doesn't guarantee that.  Avoid that assumption.
      
      There's no actual bug here, as sigtrampgo does not in fact modify its
      argument slots.  But I found this while working on the dead stack slot
      clobbering tool.  https://go-review.googlesource.com/c/23924/
      
      Change-Id: Ia7e791a2b4c1c74fff24cba8169e7840b4b06ffc
      Reviewed-on: https://go-review.googlesource.com/36216
      
      
      Run-TryBot: Keith Randall <khr@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      69e16349
    • Russ Cox's avatar
      net/http: fix dns hijacking test · 64c52808
      Russ Cox authored
      The name lookups are unrooted; the test should be unrooted too.
      Correctly skips the tests if the DNS config specifies a domain
      suffix that has a wildcard entry causing all unrooted names to resolve.
      
      Change-Id: I80470326a5d332f3b8d64663f765fd304c5e0811
      Reviewed-on: https://go-review.googlesource.com/36253
      
      
      Run-TryBot: Russ Cox <rsc@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      64c52808
    • Josh Bleecher Snyder's avatar
      cmd/compile: add reusable []Location to ssa.Config · 57546d67
      Josh Bleecher Snyder authored
      name       old time/op      new time/op      delta
      Template        218ms ± 3%       214ms ± 3%  -1.70%  (p=0.000 n=30+30)
      Unicode         100ms ± 3%       100ms ± 4%    ~     (p=0.614 n=29+30)
      GoTypes         657ms ± 1%       660ms ± 3%  +0.46%  (p=0.046 n=29+30)
      Compiler        2.80s ± 2%       2.80s ± 1%    ~     (p=0.451 n=28+29)
      Flate           131ms ± 2%       132ms ± 4%    ~     (p=1.000 n=29+29)
      GoParser        159ms ± 3%       160ms ± 5%    ~     (p=0.341 n=28+30)
      Reflect         406ms ± 3%       408ms ± 4%    ~     (p=0.511 n=28+30)
      Tar             118ms ± 4%       118ms ± 4%    ~     (p=0.827 n=29+30)
      XML             222ms ± 6%       222ms ± 3%    ~     (p=0.532 n=30+30)
      
      name       old user-ns/op   new user-ns/op   delta
      Template   274user-ms ± 3%  272user-ms ± 3%  -0.87%  (p=0.015 n=29+30)
      Unicode    140user-ms ± 4%  140user-ms ± 3%    ~     (p=0.735 n=29+30)
      GoTypes    890user-ms ± 1%  897user-ms ± 2%  +0.88%  (p=0.002 n=29+30)
      Compiler   3.88user-s ± 2%  3.89user-s ± 1%    ~     (p=0.132 n=30+29)
      Flate      168user-ms ± 2%  157user-ms ± 4%  -6.21%  (p=0.000 n=25+28)
      GoParser   211user-ms ± 2%  213user-ms ± 5%    ~     (p=0.086 n=28+30)
      Reflect    539user-ms ± 2%  541user-ms ± 3%    ~     (p=0.267 n=27+29)
      Tar        156user-ms ± 7%  155user-ms ± 5%    ~     (p=0.708 n=30+30)
      XML        291user-ms ± 5%  294user-ms ± 3%  +0.83%  (p=0.029 n=29+30)
      
      name       old alloc/op     new alloc/op     delta
      Template       40.7MB ± 0%      39.4MB ± 0%  -3.26%  (p=0.000 n=29+26)
      Unicode        30.8MB ± 0%      30.7MB ± 0%  -0.40%  (p=0.000 n=28+30)
      GoTypes         123MB ± 0%       119MB ± 0%  -3.47%  (p=0.000 n=30+29)
      Compiler        472MB ± 0%       455MB ± 0%  -3.60%  (p=0.000 n=30+30)
      Flate          26.5MB ± 0%      25.6MB ± 0%  -3.21%  (p=0.000 n=28+30)
      GoParser       32.3MB ± 0%      31.4MB ± 0%  -2.98%  (p=0.000 n=29+30)
      Reflect        84.4MB ± 0%      82.1MB ± 0%  -2.83%  (p=0.000 n=30+30)
      Tar            27.3MB ± 0%      26.5MB ± 0%  -2.70%  (p=0.000 n=29+29)
      XML            44.6MB ± 0%      43.1MB ± 0%  -3.49%  (p=0.000 n=30+30)
      
      name       old allocs/op    new allocs/op    delta
      Template         401k ± 1%        399k ± 0%  -0.35%  (p=0.000 n=30+28)
      Unicode          331k ± 0%        331k ± 1%    ~     (p=0.907 n=28+30)
      GoTypes         1.24M ± 0%       1.23M ± 0%  -0.43%  (p=0.000 n=30+30)
      Compiler        4.26M ± 0%       4.25M ± 0%  -0.34%  (p=0.000 n=29+30)
      Flate            252k ± 1%        251k ± 1%  -0.41%  (p=0.000 n=30+30)
      GoParser         325k ± 1%        324k ± 1%  -0.31%  (p=0.000 n=27+30)
      Reflect         1.06M ± 0%       1.05M ± 0%  -0.69%  (p=0.000 n=30+30)
      Tar              266k ± 1%        265k ± 1%  -0.51%  (p=0.000 n=29+30)
      XML              416k ± 1%        415k ± 1%  -0.36%  (p=0.002 n=30+30)
      
      Change-Id: I8f784001324df83b2764c44f0e83a540e5beab34
      Reviewed-on: https://go-review.googlesource.com/36212
      
      
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      Reviewed-by: default avatarKeith Randall <khr@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      57546d67
    • Cherry Zhang's avatar
      runtime: skip flaky TestGdbPythonCgo on MIPS · f69a6def
      Cherry Zhang authored
      It seems the problem is on gdb and the dynamic linker. Skip the
      test for now until we figure out what's going on with the system.
      
      Updates #18784.
      
      Change-Id: Ic9320ffd463f6c231b2c4192652263b1cf7f4231
      Reviewed-on: https://go-review.googlesource.com/36250
      
      
      Run-TryBot: Cherry Zhang <cherryyz@google.com>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      f69a6def
    • Jaana Burcu Dogan's avatar
      doc: consistently link to the SettingGOPATH page · ecbf9084
      Jaana Burcu Dogan authored
      Change-Id: I4fdd81aa7c9b180cb72ec4af3e7d9d803c99ecac
      Reviewed-on: https://go-review.googlesource.com/36033
      
      
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      ecbf9084