1. 25 May, 2019 2 commits
  2. 24 May, 2019 10 commits
    • Russ Cox's avatar
      cmd/go: respect default proxy setting, add direct fallback · 385b2e0c
      Russ Cox authored
      Getenv("GOPROXY") says what the environment variable is
      (including looking in the go env file), but it doesn't include
      the default setting. This code needs to use cfg.GOPROXY
      to get the actual default. Fix and test that.
      
      Also, we forgot to include the fallback to direct for when
      the proxy serves a 404. Add and test that too.
      
      Also add HTTP fetch information to -x build flag output.
      (It does not belong in the -v output, despite the GOPATH go get
      command doing this.)
      
      Change-Id: Ieab7ef13cda3e1ad041dbe04921af206e2232c9c
      Reviewed-on: https://go-review.googlesource.com/c/go/+/178720
      Run-TryBot: Russ Cox <rsc@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBryan C. Mills <bcmills@google.com>
      Reviewed-by: default avatarHyang-Ah Hana Kim <hyangah@gmail.com>
      385b2e0c
    • Bryan C. Mills's avatar
      cmd/go: when resolving packages, try all module paths before falling back to the next proxy · c7385e27
      Bryan C. Mills authored
      Since we're mucking with error-propagation in modload.Query* anyway,
      simplify the classification logic. Ensure that “module not found”
      errors are reported as such in various places, since non-“not found”
      errors terminate the module search.
      
      Fixes #31785
      
      Change-Id: Ie3ca5f4eec10a5f2a6037ec7e1c2cf47bd37a232
      Reviewed-on: https://go-review.googlesource.com/c/go/+/177958
      Run-TryBot: Russ Cox <rsc@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarRuss Cox <rsc@golang.org>
      c7385e27
    • Cherry Zhang's avatar
      cmd, runtime: remove PC_F & PC_B globals on Wasm · 496b8dbb
      Cherry Zhang authored
      Following the previous CL, this removes more global variables on
      Wasm.
      
      PC_B is used mostly for intra-function jumps, and for a function
      telling its callee where to start or resume. This usage can be
      served by a parameter. The top level loop (wasm_pc_f_loop) uses
      PC_B for resuming a function. This value is either set by gogo,
      or loaded from the Go stack at function return. Instead of
      loading PC_B at each function return, we could make gogo stores
      PC_B at the same stack location, and let the top level loop do
      the load. This way, we don't need to use global PC_B to
      communicate with the top level loop, and we can replace global
      PC_B with a parameter.
      
      PC_F is similar. It is even more so in that the only reader is
      the top level loop. Let the top level loop read it from the stack,
      and we can get rid of PC_F entirely.
      
      PC_F and PC_B are used less entensively as SP, so this CL has
      smaller performance gain.
      
      Running on Chrome 74.0.3729.108 on Linux/AMD64,
      
      name                   old time/op    new time/op    delta
      BinaryTree17              16.6s ± 0%     16.2s ± 1%   -2.59%  (p=0.016 n=4+5)
      Fannkuch11                11.1s ± 1%     10.8s ± 0%   -2.65%  (p=0.008 n=5+5)
      FmtFprintfEmpty           231ns ± 1%     217ns ± 0%   -6.06%  (p=0.008 n=5+5)
      FmtFprintfString          407ns ± 3%     375ns ± 2%   -7.81%  (p=0.008 n=5+5)
      FmtFprintfInt             466ns ± 2%     430ns ± 0%   -7.79%  (p=0.016 n=5+4)
      FmtFprintfIntInt          719ns ± 2%     673ns ± 2%   -6.37%  (p=0.008 n=5+5)
      FmtFprintfPrefixedInt     706ns ± 1%     676ns ± 3%   -4.31%  (p=0.008 n=5+5)
      FmtFprintfFloat          1.01µs ± 1%    0.97µs ± 1%   -4.30%  (p=0.008 n=5+5)
      FmtManyArgs              2.67µs ± 1%    2.51µs ± 1%   -5.95%  (p=0.008 n=5+5)
      GobDecode                30.7ms ± 9%    31.3ms ±34%     ~     (p=0.222 n=5+5)
      GobEncode                24.2ms ±23%    20.2ms ± 0%  -16.36%  (p=0.016 n=5+4)
      Gzip                      852ms ± 0%     823ms ± 0%   -3.38%  (p=0.016 n=4+5)
      Gunzip                    160ms ± 1%     151ms ± 1%   -5.37%  (p=0.008 n=5+5)
      JSONEncode               35.7ms ± 1%    34.3ms ± 1%   -3.81%  (p=0.008 n=5+5)
      JSONDecode                247ms ± 8%     254ms ± 7%     ~     (p=0.548 n=5+5)
      Mandelbrot200            5.39ms ± 0%    5.41ms ± 0%   +0.42%  (p=0.008 n=5+5)
      GoParse                  18.5ms ± 1%    18.3ms ± 2%     ~     (p=0.343 n=4+4)
      RegexpMatchEasy0_32       424ns ± 2%     397ns ± 0%   -6.23%  (p=0.008 n=5+5)
      RegexpMatchEasy0_1K      2.88µs ± 0%    2.86µs ± 1%     ~     (p=0.079 n=5+5)
      RegexpMatchEasy1_32       395ns ± 2%     370ns ± 1%   -6.23%  (p=0.008 n=5+5)
      RegexpMatchEasy1_1K      3.26µs ± 0%    3.19µs ± 1%   -2.06%  (p=0.008 n=5+5)
      RegexpMatchMedium_32      564ns ± 1%     532ns ± 0%   -5.71%  (p=0.008 n=5+5)
      RegexpMatchMedium_1K      146µs ± 2%     140µs ± 1%   -4.62%  (p=0.008 n=5+5)
      RegexpMatchHard_32       8.47µs ± 1%    7.91µs ± 1%   -6.65%  (p=0.008 n=5+5)
      RegexpMatchHard_1K        253µs ± 1%     236µs ± 2%   -6.66%  (p=0.008 n=5+5)
      Revcomp                   1.78s ± 4%     1.76s ± 5%     ~     (p=1.000 n=5+5)
      Template                  292ms ±29%     269ms ± 5%     ~     (p=0.690 n=5+5)
      TimeParse                1.61µs ± 4%    1.54µs ± 1%   -4.42%  (p=0.008 n=5+5)
      TimeFormat               1.66µs ± 3%    1.58µs ± 1%   -5.22%  (p=0.008 n=5+5)
      [Geo mean]                232µs          221µs        -4.54%
      
      name                   old speed      new speed      delta
      GobDecode              25.0MB/s ± 8%  25.1MB/s ±27%     ~     (p=0.222 n=5+5)
      GobEncode              32.8MB/s ±21%  38.0MB/s ± 0%  +15.84%  (p=0.016 n=5+4)
      Gzip                   22.8MB/s ± 0%  23.6MB/s ± 0%   +3.49%  (p=0.016 n=4+5)
      Gunzip                  121MB/s ± 1%   128MB/s ± 1%   +5.68%  (p=0.008 n=5+5)
      JSONEncode             54.4MB/s ± 1%  56.5MB/s ± 1%   +3.97%  (p=0.008 n=5+5)
      JSONDecode             7.88MB/s ± 8%  7.65MB/s ± 8%     ~     (p=0.548 n=5+5)
      GoParse                3.07MB/s ± 8%  3.00MB/s ±22%     ~     (p=0.579 n=5+5)
      RegexpMatchEasy0_32    75.6MB/s ± 2%  80.5MB/s ± 0%   +6.58%  (p=0.008 n=5+5)
      RegexpMatchEasy0_1K     356MB/s ± 0%   358MB/s ± 1%     ~     (p=0.095 n=5+5)
      RegexpMatchEasy1_32    81.1MB/s ± 2%  86.5MB/s ± 1%   +6.69%  (p=0.008 n=5+5)
      RegexpMatchEasy1_1K     314MB/s ± 0%   320MB/s ± 0%   +2.10%  (p=0.008 n=5+5)
      RegexpMatchMedium_32   1.77MB/s ± 1%  1.88MB/s ± 0%   +6.09%  (p=0.016 n=5+4)
      RegexpMatchMedium_1K   6.99MB/s ± 2%  7.33MB/s ± 1%   +4.83%  (p=0.008 n=5+5)
      RegexpMatchHard_32     3.78MB/s ± 1%  4.04MB/s ± 1%   +7.04%  (p=0.008 n=5+5)
      RegexpMatchHard_1K     4.04MB/s ± 1%  4.33MB/s ± 2%   +7.17%  (p=0.008 n=5+5)
      Revcomp                 143MB/s ± 4%   145MB/s ± 5%     ~     (p=1.000 n=5+5)
      Template               6.77MB/s ±24%  7.22MB/s ± 5%     ~     (p=0.690 n=5+5)
      [Geo mean]             24.4MB/s       25.4MB/s        +4.18%
      
      Change-Id: Ib80716e62992aec28b2c4a96af280c278f83aa49
      Reviewed-on: https://go-review.googlesource.com/c/go/+/173980
      Run-TryBot: Cherry Zhang <cherryyz@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarRichard Musiol <neelance@gmail.com>
      496b8dbb
    • Michael Anthony Knyszek's avatar
      runtime: ensure mheap lock stack growth invariant is maintained · 7ed7669c
      Michael Anthony Knyszek authored
      Currently there's an invariant in the runtime wherein the heap lock
      can only be acquired on the system stack, otherwise a self-deadlock
      could occur if the stack grows while the lock is held.
      
      This invariant is upheld and documented in a number of situations (e.g.
      allocManual, freeManual) but there are other places where the invariant
      is either not maintained at all which risks self-deadlock (e.g.
      setGCPercent, gcResetMarkState, allocmcache) or is maintained but
      undocumented (e.g. gcSweep, readGCStats_m).
      
      This change adds go:systemstack to any function that acquires the heap
      lock or adds a systemstack(func() { ... }) around the critical section,
      where appropriate. It also documents the invariant on (*mheap).lock
      directly and updates repetitive documentation to refer to that comment.
      
      Fixes #32105.
      
      Change-Id: I702b1290709c118b837389c78efde25c51a2cafb
      Reviewed-on: https://go-review.googlesource.com/c/go/+/177857
      Run-TryBot: Michael Knyszek <mknyszek@google.com>
      Reviewed-by: default avatarAustin Clements <austin@google.com>
      7ed7669c
    • Martin Sucha's avatar
      strings: clarify example of ContainsAny · db325553
      Martin Sucha authored
      I have seen code that literally copied the example like this:
      
          if strings.ContainsAny(s, "1 & 2 & 3") {
      
      The developer apparently thought that this is the way to
      specify multiple characters and I noticed this pattern
      being used in the example. Let's update the example so
      that it's clear how multiple Unicode code points should
      be specified.
      
      Change-Id: Id4d780555e521af62fb787a7950be1e60848cd95
      Reviewed-on: https://go-review.googlesource.com/c/go/+/178737Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      db325553
    • Leon Klingele's avatar
      image/draw: change argument type to be consistent with other args · cd0f5f39
      Leon Klingele authored
      Change-Id: Ic5b01c0a6912d87e812331d6525939df8f525cca
      GitHub-Last-Rev: b6ffefcf8f2ec1ed7ee13f36e8fef6af965ba332
      GitHub-Pull-Request: golang/go#29993
      Reviewed-on: https://go-review.googlesource.com/c/go/+/160417Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      cd0f5f39
    • Hana (Hyang-Ah) Kim's avatar
      cmd/vendor: sync github.com/google/pprof@v0.0.0-20190515194954-54271f7e092f · 46fd6770
      Hana (Hyang-Ah) Kim authored
      Change-Id: If001d8f7e657e01711653827a170904932839e34
      Reviewed-on: https://go-review.googlesource.com/c/go/+/178721
      Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      46fd6770
    • Leon Klingele's avatar
      compress/gzip: add missing error check in test · fc58acbe
      Leon Klingele authored
      Change-Id: Ib7be503a46f3609ea29464569e57e1f620e97a53
      GitHub-Last-Rev: a43cffe45f3b9d208028f7682088cbe537d6deca
      GitHub-Pull-Request: golang/go#30007
      Reviewed-on: https://go-review.googlesource.com/c/go/+/160431
      Run-TryBot: Leon Klingele <git@leonklingele.de>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      fc58acbe
    • Richard Musiol's avatar
      syscall/js: replace TypedArrayOf with CopyBytesToGo/CopyBytesToJS · c468ad04
      Richard Musiol authored
      The typed arrays returned by TypedArrayOf were backed by WebAssembly
      memory. They became invalid each time we grow the WebAssembly memory.
      This made them very error prone and hard to use correctly.
      
      This change removes TypedArrayOf completely and instead introduces
      CopyBytesToGo and CopyBytesToJS for copying bytes between a byte
      slice and an Uint8Array. This breaking change is still allowed for
      the syscall/js package.
      
      Fixes #31980.
      Fixes #31812.
      
      Change-Id: I14c76fdd60b48dd517c1593972a56d04965cb272
      Reviewed-on: https://go-review.googlesource.com/c/go/+/177537
      Run-TryBot: Richard Musiol <neelance@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      c468ad04
    • bill_ofarrell's avatar
      crypto/ecdsa: implement ecdsa on s390x for P256/P384/P521 using KDSA instruction · 7e5bc477
      bill_ofarrell authored
      Utilize KDSA when available. This guarantees constant time operation on all three curves mentioned,
      and is faster than conventional assembly. The IBM Z model(s) that support KDSA as used in this CL
      are not yet publicly available, and so we are unable to release performance data at this time.
      
      Change-Id: I85360dcf90fe42d2bf32afe3f638e282de10a518
      Reviewed-on: https://go-review.googlesource.com/c/go/+/174437
      Run-TryBot: Michael Munday <mike.munday@ibm.com>
      Reviewed-by: default avatarMichael Munday <mike.munday@ibm.com>
      7e5bc477
  3. 23 May, 2019 13 commits
  4. 22 May, 2019 12 commits
  5. 21 May, 2019 3 commits