1. 20 Oct, 2017 12 commits
    • David Crawshaw's avatar
      cmd/link: move Iself global to ctxt · d05f82a1
      David Crawshaw authored
      For #22095
      
      Change-Id: Iba3dffc782cecc15ea0e90a971a2734729984945
      Reviewed-on: https://go-review.googlesource.com/70834
      Run-TryBot: David Crawshaw <crawshaw@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      d05f82a1
    • David Crawshaw's avatar
      cmd/link: move FlagLinkshared global to ctxt · 6738c494
      David Crawshaw authored
      For #22095
      
      Change-Id: Ica6b3391541fe5a0355620d7c4a5107cf53eee82
      Reviewed-on: https://go-review.googlesource.com/70833
      Run-TryBot: David Crawshaw <crawshaw@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarDaniel Martí <mvdan@mvdan.cc>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      6738c494
    • Joe Tsai's avatar
      encoding/csv: simplify and optimize Reader · 89ccfe49
      Joe Tsai authored
      The Reader implementation is slow because it operates on a rune-by-rune
      basis via bufio.Reader.ReadRune. We speed this up by operating on entire
      lines that we read from bufio.Reader.ReadSlice.
      
      In order to ensure that we read the full line, we augment ReadSlice
      in our Reader.readLine method to automatically expand the slice if
      bufio.ErrBufferFull is every hit.
      
      This change happens to fix #19410 because it no longer relies on
      rune-by-rune parsing and only searches for the relevant delimiter rune.
      
      In order to keep column accounting simple and consistent, this change
      reverts parts of CL 52830.
      
      This CL is an alternative to CL 36270 and builds on some of the ideas
      from that change by Diogo Pinela.
      
      name                                     old time/op    new time/op    delta
      Read-8                                   3.12µs ± 1%    2.54µs ± 2%  -18.76%   (p=0.000 n=10+9)
      ReadWithFieldsPerRecord-8                3.12µs ± 1%    2.53µs ± 1%  -18.91%    (p=0.000 n=9+9)
      ReadWithoutFieldsPerRecord-8             3.13µs ± 0%    2.57µs ± 3%  -18.07%  (p=0.000 n=10+10)
      ReadLargeFields-8                        52.3µs ± 1%     5.3µs ± 2%  -89.93%   (p=0.000 n=10+9)
      ReadReuseRecord-8                        2.05µs ± 1%    1.40µs ± 1%  -31.48%   (p=0.000 n=10+9)
      ReadReuseRecordWithFieldsPerRecord-8     2.05µs ± 1%    1.41µs ± 0%  -31.03%   (p=0.000 n=10+9)
      ReadReuseRecordWithoutFieldsPerRecord-8  2.06µs ± 1%    1.40µs ± 1%  -31.70%   (p=0.000 n=9+10)
      ReadReuseRecordLargeFields-8             50.9µs ± 0%     4.1µs ± 3%  -92.01%  (p=0.000 n=10+10)
      
      name                                     old alloc/op   new alloc/op
      Read-8                                       664B ± 0%      664B ± 0%
      ReadWithFieldsPerRecord-8                    664B ± 0%      664B ± 0%
      ReadWithoutFieldsPerRecord-8                 664B ± 0%      664B ± 0%
      ReadLargeFields-8                          3.94kB ± 0%    3.94kB ± 0%
      ReadReuseRecord-8                           24.0B ± 0%     24.0B ± 0%
      ReadReuseRecordWithFieldsPerRecord-8        24.0B ± 0%     24.0B ± 0%
      ReadReuseRecordWithoutFieldsPerRecord-8     24.0B ± 0%     24.0B ± 0%
      ReadReuseRecordLargeFields-8               2.98kB ± 0%    2.98kB ± 0%
      
      name                                     old allocs/op  new allocs/op
      Read-8                                       18.0 ± 0%      18.0 ± 0%
      ReadWithFieldsPerRecord-8                    18.0 ± 0%      18.0 ± 0%
      ReadWithoutFieldsPerRecord-8                 18.0 ± 0%      18.0 ± 0%
      ReadLargeFields-8                            24.0 ± 0%      24.0 ± 0%
      ReadReuseRecord-8                            8.00 ± 0%      8.00 ± 0%
      ReadReuseRecordWithFieldsPerRecord-8         8.00 ± 0%      8.00 ± 0%
      ReadReuseRecordWithoutFieldsPerRecord-8      8.00 ± 0%      8.00 ± 0%
      ReadReuseRecordLargeFields-8                 12.0 ± 0%      12.0 ± 0%
      
      Updates #22352
      Updates #19019
      Fixes #16791
      Fixes #19410
      
      Change-Id: I31c27cfcc56880e6abac262f36c947179b550bbf
      Reviewed-on: https://go-review.googlesource.com/72150Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      89ccfe49
    • Ian Lance Taylor's avatar
      runtime: for kqueue treat EVFILT_READ with EV_EOF as permitting a write · 23aad448
      Ian Lance Taylor authored
      On systems that use kqueue, we always register descriptors for both
      EVFILT_READ and EVFILT_WRITE. On at least FreeBSD and OpenBSD, when
      the write end of a pipe is registered for EVFILT_READ and EVFILT_WRITE
      events, and the read end of the pipe is closed, kqueue reports an
      EVFILT_READ event with EV_EOF set, but does not report an EVFILT_WRITE
      event. Since the write to the pipe is waiting for an EVFILT_WRITE
      event, closing the read end of a pipe can cause the write end to hang
      rather than attempt another write which will fail with EPIPE.
      
      Fix this by treating EVFILT_READ with EV_EOF set as making both reads
      and writes ready to proceed.
      
      The real test for this is in CL 71770, which tests using various
      timeouts with pipes.
      
      Updates #22114
      
      Change-Id: Ib23fbaaddbccd8eee77bdf18f27a7f0aa50e2742
      Reviewed-on: https://go-review.googlesource.com/71973Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
      23aad448
    • Matthew Dempsky's avatar
      cmd/compile: prevent inlining go:yeswritebarrierrec functions · 4e64ee42
      Matthew Dempsky authored
      Fixes #22342.
      
      Change-Id: Ic942162e98dce5749e381a31d58b0bf16c7d6f98
      Reviewed-on: https://go-review.googlesource.com/72132
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarAustin Clements <austin@google.com>
      4e64ee42
    • Cherry Zhang's avatar
      cmd/compile: skip runtime.nextFreeFast inlining test on MIPS64x · 5c18a3ca
      Cherry Zhang authored
      Since inlining budget calculation is fixed in CL 70151
      runtime.nextFreeFast is no longer inlineable on MIPS64x because
      it does not support Ctz64 as intrinsic. Skip the test.
      
      Updates #22239.
      
      Change-Id: Id00d55628ddb4b48d27aebfa10377a896765d569
      Reviewed-on: https://go-review.googlesource.com/72271
      Run-TryBot: Cherry Zhang <cherryyz@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
      5c18a3ca
    • Russ Cox's avatar
      cmd/go: delete ETXTBSY hack that is no longer needed · 7dcf406c
      Russ Cox authored
      This hack existed because cmd/go used to install (write) and then run
      cmd/cgo in the same invocation, and writing and then running a program
      is a no-no in modern multithreaded Unix programs (see #22315).
      
      As of CL 68338, cmd/go no longer installs any programs that it then
      tries to use. It never did this for any program other than cgo, and
      CL 68338 removed that special case for cgo.
      
      Now this special case, added for #3001 long ago, can be removed too.
      
      Change-Id: I338f1f8665e9aca823e33ef7dda9d19f665e4281
      Reviewed-on: https://go-review.googlesource.com/71571
      Run-TryBot: Russ Cox <rsc@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      7dcf406c
    • Russ Cox's avatar
      cmd/go/internal/work: factor build.go into multiple files · 08362246
      Russ Cox authored
      build.go - commands and misc helpers
      action.go - action graph construction
      exec.go - action graph execution
      gc.go - gc toolchain
      gccgo.go - gccgo toolchain
      
      Change-Id: I39b6e2490ac05334c2321e9ad88df694a6efa82f
      Reviewed-on: https://go-review.googlesource.com/70671
      Run-TryBot: Russ Cox <rsc@golang.org>
      Reviewed-by: 's avatarDavid Crawshaw <crawshaw@golang.org>
      08362246
    • Russ Cox's avatar
      cmd/go: move internal/load.PluginPath to internal/work · 1992ab7e
      Russ Cox authored
      It uses the build ID, which is soon to be internal to package work.
      Luckily it is also only called from package work.
      
      Change-Id: I5e6662cfe667bdc9190f086be733105ad65a3191
      Reviewed-on: https://go-review.googlesource.com/70670
      Run-TryBot: Russ Cox <rsc@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarDavid Crawshaw <crawshaw@golang.org>
      1992ab7e
    • Ian Lance Taylor's avatar
      cmd/go: look for "unknown" when checking supported compiler flags · a607b3b4
      Ian Lance Taylor authored
      Where GCC says "unrecognized command line option", clang says "unknown
      argument". This distinction usually doesn't matter because the
      compiler will also exit with a non-zero status, but clang 3.4
      reportedly exits with a zero status after reporting an unknown argument.
      
      Change-Id: Ieb69ea352a8de0cd4171a1c26708dfe523421cfa
      Reviewed-on: https://go-review.googlesource.com/72151
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarDamien Neil <dneil@google.com>
      a607b3b4
    • Hana Kim's avatar
      cmd/trace: fix a javascript bug in handling import error · 2f40dc79
      Hana Kim authored
      When traceviewer encounters a failure of json trace import
      due to data error, onImportFail tried to access an error variable
      which was not yet defined.
      
      Change-Id: I431be03f179aafacaf1fd3c62a6337e8b5bd18fb
      Reviewed-on: https://go-review.googlesource.com/71970Reviewed-by: 's avatarAustin Clements <austin@google.com>
      2f40dc79
    • Michael Munday's avatar
      cmd/go: skip gold-specific part of TestNoteReading if gold is unavailable · 916ad62d
      Michael Munday authored
      The test already contained logic to do this however it did not match
      the error "cannot find 'ld'" which appears to be how gcc fails when
      ld.gold is missing.
      
      Fixes #22340.
      
      Change-Id: I841248cc489b8fa72bc00a95000ad405f9ef8a4f
      Reviewed-on: https://go-review.googlesource.com/72111
      Run-TryBot: Michael Munday <mike.munday@ibm.com>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      916ad62d
  2. 19 Oct, 2017 12 commits
  3. 18 Oct, 2017 10 commits
  4. 17 Oct, 2017 6 commits