1. 18 May, 2016 27 commits
  2. 17 May, 2016 6 commits
  3. 16 May, 2016 7 commits
    • Scott Bell's avatar
      crypto/tls: document certificate chains in LoadX509KeyPair · 5ccd571f
      Scott Bell authored
      Fixes #15348
      
      Change-Id: I9e0e1e3a26fa4cd697d2c613e6b4952188b7c7e1
      Reviewed-on: https://go-review.googlesource.com/23150Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      5ccd571f
    • andrew werner's avatar
      io: make chained multiReader Read more efficient · ccdca832
      andrew werner authored
      before this change, when io.MultiReader was called many times but contain few
      underlying readers, calls to Read were unnecessarily expensive.
      
      Fixes #13558
      
      Change-Id: I3ec4e88c7b50c075b148331fb1b7348a5840adbe
      Reviewed-on: https://go-review.googlesource.com/17873Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      ccdca832
    • Simon Thulbourn's avatar
      mime/multipart: sort header keys to ensure reproducible output · 28c20186
      Simon Thulbourn authored
      Adds a transparent sort to the mime/multipart package, which is
      only used in the CreatePart func. This will ensure the ordering
      of the MIMEHeader.
      
      The point of this change was to ensure the output would be consistent
      and something that could be depended on.
      
      Fixes #13522
      
      Change-Id: I9584ef9dbe98ce97d536d897326914653f8d9ddf
      Reviewed-on: https://go-review.googlesource.com/17497Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      28c20186
    • Brad Fitzpatrick's avatar
      A+C: add Andrew Werner (corporate CLA for Upthere, Inc) · 99ef42fe
      Brad Fitzpatrick authored
      Change-Id: I7627e480d5d2366cba223fd81635c4115649f752
      Reviewed-on: https://go-review.googlesource.com/23154Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      99ef42fe
    • Ian Lance Taylor's avatar
      runtime: yield after raising signal that should kill process · c1b32ace
      Ian Lance Taylor authored
      Issue #15613 points out that the darwin builders have been getting
      regular failures in which a process that should exit with a SIGPIPE
      signal is instead exiting with exit status 2. The code calls
      runtime.raise. On most systems runtime.raise is the equivalent of
      pthread_kill(gettid(), sig); that is, it kills the thread with the
      signal, which should ensure that the program does not keep going. On
      darwin, however, runtime.raise is actually kill(getpid(), sig); that is,
      it sends a signal to the entire process. If the process decides to
      deliver the signal to a different thread, then it is possible that in
      some cases the thread that calls raise is able to execute the next
      system call before the signal is actually delivered. That would cause
      the observed error.
      
      I have not been able to recreate the problem myself, so I don't know
      whether this actually fixes it. But, optimistically:
      
      Fixed #15613.
      
      Change-Id: I60c0a9912aae2f46143ca1388fd85e9c3fa9df1f
      Reviewed-on: https://go-review.googlesource.com/23152
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      c1b32ace
    • Scott Bell's avatar
      doc: fix broken link to the vet command documentation · 1b86862d
      Scott Bell authored
      Fixes #15188
      
      Change-Id: I0ab7791f7db499cef6bc52292d3d93ff4da7caff
      Reviewed-on: https://go-review.googlesource.com/23151Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      1b86862d
    • David Chase's avatar
      cmd/compile: use sparse algorithm for phis in large program · 6b99fb5b
      David Chase authored
      This adds a sparse method for locating nearest ancestors
      in a dominator tree, and checks blocks with more than one
      predecessor for differences and inserts phi functions where
      there are.
      
      Uses reversed post order to cut number of passes, running
      it from first def to last use ("last use" for paramout and
      mem is end-of-program; last use for a phi input from a
      backedge is the source of the back edge)
      
      Includes a cutover from old algorithm to new to avoid paying
      large constant factor for small programs.  This keeps normal
      builds running at about the same time, while not running
      over-long on large machine-generated inputs.
      
      Add "phase" flags for ssa/build -- ssa/build/stats prints
      number of blocks, values (before and after linking references
      and inserting phis, so expansion can be measured), and their
      product; the product governs the cutover, where a good value
      seems to be somewhere between 1 and 5 million.
      
      Among the files compiled by make.bash, this is the shape of
      the tail of the distribution for #blocks, #vars, and their
      product:
      
      	 #blocks	#vars	    product
       max	6171	28180	173,898,780
      99.9%	1641	 6548	 10,401,878
        99%	 463	 1909	    873,721
        95%	 152	  639	     95,235
        90%	  84	  359	     30,021
      
      The old algorithm is indeed usually fastest, for 99%ile
      values of usually.
      
      The fix to LookupVarOutgoing
      ( https://go-review.googlesource.com/#/c/22790/ )
      deals with some of the same problems addressed by this CL,
      but on at least one bug ( #15537 ) this change is still
      a significant help.
      
      With this CL:
      /tmp/gopath$ rm -rf pkg bin
      /tmp/gopath$ time go get -v -gcflags -memprofile=y.mprof \
         github.com/gogo/protobuf/test/theproto3/combos/...
      ...
      real	4m35.200s
      user	13m16.644s
      sys	0m36.712s
      and pprof reports 3.4GB allocated in one of the larger profiles
      
      With tip:
      /tmp/gopath$ rm -rf pkg bin
      /tmp/gopath$ time go get -v -gcflags -memprofile=y.mprof \
         github.com/gogo/protobuf/test/theproto3/combos/...
      ...
      real	10m36.569s
      user	25m52.286s
      sys	4m3.696s
      and pprof reports 8.3GB allocated in the same larger profile
      
      With this CL, most of the compilation time on the benchmarked
      input is spent in register/stack allocation (cumulative 53%)
      and in the sparse lookup algorithm itself (cumulative 20%).
      
      Fixes #15537.
      
      Change-Id: Ia0299dda6a291534d8b08e5f9883216ded677a00
      Reviewed-on: https://go-review.googlesource.com/22342Reviewed-by: 's avatarKeith Randall <khr@golang.org>
      Run-TryBot: David Chase <drchase@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      6b99fb5b