1. 15 Aug, 2016 2 commits
  2. 10 Aug, 2016 1 commit
  3. 09 Aug, 2016 1 commit
  4. 08 Aug, 2016 1 commit
    • Brad Fitzpatrick's avatar
      net/http: make Transport use new connection if over HTTP/2 concurrency limit · 7a622740
      Brad Fitzpatrick authored
      The Go HTTP/1 client will make as many new TCP connections as the user requests.
      
      The HTTP/2 client tried to have that behavior, but the policy of
      whether a connection is re-usable didn't take into account the extra 1
      stream counting against SETTINGS_MAX_CONCURRENT_STREAMS so in practice
      users were getting errors.
      
      For example, if the server's advertised max concurrent streams is 100
      and 200 concurrrent Go HTTP requests ask for a connection at once, all
      200 will think they can reuse that TCP connection, but then 100 will
      fail later when the number of concurrent streams exceeds 100.
      
      Instead, recognize the "no cached connections" error value in the
      shouldRetryRequest method, so those 100 will retry a new connection.
      
      This is the conservative fix for Go 1.7 so users don't get errors, and
      to match the HTTP/1 behavior. Issues #13957 and #13774 are the more
      involved bugs for Go 1.8.
      
      Updates #16582
      Updates #13957
      
      Change-Id: I1f15a7ce60c07a4baebca87675836d6fe03993e8
      Reviewed-on: https://go-review.googlesource.com/25580
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      Reviewed-by: default avatarChris Broadfoot <cbro@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      7a622740
  5. 06 Aug, 2016 1 commit
  6. 05 Aug, 2016 4 commits
  7. 04 Aug, 2016 2 commits
    • Brad Fitzpatrick's avatar
      syscall: fix Gettimeofday on macOS Sierra · da070bed
      Brad Fitzpatrick authored
      Fixes #16606
      
      Change-Id: I57465061b90e901293cd8b6ef756d6aa84ebd4a3
      Reviewed-on: https://go-review.googlesource.com/25495Reviewed-by: default avatarQuentin Smith <quentin@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      Run-TryBot: Quentin Smith <quentin@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      da070bed
    • David Crawshaw's avatar
      runtime: initialize hash algs before typemap · f135c326
      David Crawshaw authored
      When compiling with -buildmode=shared, a map[int32]*_type is created for
      each extra module mapping duplicate types back to a canonical object.
      This is done in the function typelinksinit, which is called before the
      init function that sets up the hash functions for the map
      implementation. The result is typemap becomes unusable after
      runtime initialization.
      
      The fix in this CL is to move algorithm init before typelinksinit in
      the runtime setup process. (For 1.8, we may want to turn typemap into
      a sorted slice of types and use binary search.)
      
      Manually tested on GOOS=linux with:
      
      	GOHOSTARCH=386 GOARCH=386 ./make.bash && \
      		go install -buildmode=shared std && \
      		cd ../test && \
      		go run run.go -linkshared
      
      Fixes #16590
      
      Change-Id: Idc08c50cc70d20028276fbf564509d2cd5405210
      Reviewed-on: https://go-review.googlesource.com/25469
      Run-TryBot: David Crawshaw <crawshaw@golang.org>
      Reviewed-by: default avatarKeith Randall <khr@golang.org>
      f135c326
  8. 02 Aug, 2016 10 commits
  9. 29 Jul, 2016 1 commit
    • Cherry Zhang's avatar
      cmd/compile: fix possible spill of invalid pointer with DUFFZERO on AMD64 · 111d590f
      Cherry Zhang authored
      SSA compiler on AMD64 may spill Duff-adjusted address as scalar. If
      the object is on stack and the stack moves, the spilled address become
      invalid.
      
      Making the spill pointer-typed does not work. The Duff-adjusted address
      points to the memory before the area to be zeroed and may be invalid.
      This may cause stack scanning code panic.
      
      Fix it by doing Duff-adjustment in genValue, so the intermediate value
      is not seen by the reg allocator, and will not be spilled.
      
      Add a test to cover both cases. As it depends on allocation, it may
      be not always triggered.
      
      Fixes #16515.
      
      Change-Id: Ia81d60204782de7405b7046165ad063384ede0db
      Reviewed-on: https://go-review.googlesource.com/25309
      Run-TryBot: Cherry Zhang <cherryyz@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarDavid Chase <drchase@google.com>
      111d590f
  10. 28 Jul, 2016 1 commit
  11. 27 Jul, 2016 2 commits
    • Rhys Hiltner's avatar
      runtime: reduce GC assist extra credit · ccca9c9c
      Rhys Hiltner authored
      Mutator goroutines that allocate memory during the concurrent mark
      phase are required to spend some time assisting the garbage
      collector. The magnitude of this mandatory assistance is proportional
      to the goroutine's allocation debt and subject to the assistance
      ratio as calculated by the pacer.
      
      When assisting the garbage collector, a mutator goroutine will go
      beyond paying off its allocation debt. It will build up extra credit
      to amortize the overhead of the assist.
      
      In fast-allocating applications with high assist ratios, building up
      this credit can take the affected goroutine's entire time slice.
      Reduce the penalty on each goroutine being selected to assist the GC
      in two ways, to spread the responsibility more evenly.
      
      First, do a consistent amount of extra scan work without regard for
      the pacer's assistance ratio. Second, reduce the magnitude of the
      extra scan work so it can be completed within a few hundred
      microseconds.
      
      Commentary on gcOverAssistWork is by Austin Clements, originally in
      https://golang.org/cl/24704
      
      Updates #14812
      Fixes #16432
      
      Change-Id: I436f899e778c20daa314f3e9f0e2a1bbd53b43e1
      Reviewed-on: https://go-review.googlesource.com/25155
      Run-TryBot: Austin Clements <austin@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarAustin Clements <austin@google.com>
      Reviewed-by: default avatarRick Hudson <rlh@golang.org>
      Reviewed-by: default avatarChris Broadfoot <cbro@golang.org>
      ccca9c9c
    • Brad Fitzpatrick's avatar
      net/http: fix data race with concurrent use of Server.Serve · c80e0d37
      Brad Fitzpatrick authored
      Fixes #16505
      
      Change-Id: I0afabcc8b1be3a5dbee59946b0c44d4c00a28d71
      Reviewed-on: https://go-review.googlesource.com/25280
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarChris Broadfoot <cbro@golang.org>
      c80e0d37
  12. 26 Jul, 2016 7 commits
  13. 25 Jul, 2016 1 commit
  14. 22 Jul, 2016 1 commit
  15. 21 Jul, 2016 5 commits
    • Chris Broadfoot's avatar
      go1.7rc3 · 8707f31c
      Chris Broadfoot authored
      Change-Id: Iaef13003979c68926c260c415d6074a50ae137b2
      Reviewed-on: https://go-review.googlesource.com/25142
      Run-TryBot: Chris Broadfoot <cbro@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      8707f31c
    • Chris Broadfoot's avatar
      all: merge master into release-branch.go1.7 · 16a2af03
      Chris Broadfoot authored
      Change-Id: I2511c3f7583887b641c9b3694aae54789fbc5342
      16a2af03
    • Brad Fitzpatrick's avatar
      misc/trace: disable trace resolution warning · 243d51f0
      Brad Fitzpatrick authored
      It was removed in upstream Chrome https://codereview.chromium.org/2016863004
      
      Rather than update to the latest version, make the minimal change for Go 1.7 and
      change the "showToUser" boolean from true to false.
      
      Tested by hand that it goes away after this change.
      
      Updates #16247
      
      Change-Id: I051f49da878e554b1a34a88e9abc70ab50e18780
      Reviewed-on: https://go-review.googlesource.com/25117Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      243d51f0
    • David Chase's avatar
      cmd/compile: change phi location to be optimistic at backedges · 846bc6c5
      David Chase authored
      This is:
      
      (1) a simple trick that cuts the number of phi-nodes
      (temporarily) inserted into the ssa representation by a factor
      of 10, and can cut the user time to compile tricky inputs like
      gogo/protobuf tests from 13 user minutes to 9.5, and memory
      allocation from 3.4GB to 2.4GB.
      
      (2) a fix to sparse lookup, that does not rely on
      an assumption proven false by at least one pathological
      input "etldlen".
      
      These two changes fix unrelated compiler performance bugs,
      both necessary to obtain good performance compiling etldlen.
      Without them it takes 20 minutes or longer, with them it
      completes in 2 minutes, without a gigantic memory footprint.
      
      Updates #16407
      
      Change-Id: Iaa8aaa8c706858b3d49de1c4865a7fd79e6f4ff7
      Reviewed-on: https://go-review.googlesource.com/23136Reviewed-by: default avatarKeith Randall <khr@golang.org>
      Run-TryBot: David Chase <drchase@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      846bc6c5
    • Keith Randall's avatar
      cmd/compile: move phi args which are constants closer to the phi · 305a0ac1
      Keith Randall authored
      entry:
         x = MOVQconst [7]
         ...
      b1:
         goto b2
      b2:
         v = Phi(x, y, z)
      
      Transform that program to:
      
      entry:
         ...
      b1:
         x = MOVQconst [7]
         goto b2
      b2:
         v = Phi(x, y, z)
      
      This CL moves constant-generating instructions used by a phi to the
      appropriate immediate predecessor of the phi's block.
      
      We used to put all constants in the entry block.  Unfortunately, in
      large functions we have lots of constants at the start of the
      function, all of which are used by lots of phis throughout the
      function.  This leads to the constants being live through most of the
      function (especially if there is an outer loop).  That's an O(n^2)
      problem.
      
      Note that most of the non-phi uses of constants have already been
      folded into instructions (ADDQconst, MOVQstoreconst, etc.).
      
      This CL may be generally useful for other instances of compiler
      slowness, I'll have to check.  It may cause some programs to run
      slower, but probably not by much, as rematerializeable values like
      these constants are allocated late (not at their originally scheduled
      location) anyway.
      
      This CL is definitely a minimal change that can be considered for 1.7.
      We probably want to do a better job in the tighten pass generally, not
      just for phi args.  Leaving that for 1.8.
      
      Update #16407
      
      Change-Id: If112a8883b4ef172b2f37dea13e44bda9346c342
      Reviewed-on: https://go-review.googlesource.com/25046
      Run-TryBot: Keith Randall <khr@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarJosh Bleecher Snyder <josharian@gmail.com>
      305a0ac1