1. 13 Jun, 2018 11 commits
  2. 12 Jun, 2018 25 commits
  3. 11 Jun, 2018 4 commits
    • Michael Fraenkel's avatar
      cmd/doc: continue to search when package import fails · d0d47bb9
      Michael Fraenkel authored
      Keep searching for a package that is both findable and importable. The
      current code would always guarantee that a package was findable but
      exited if it was not importable.
      
      Fixes #25478
      
      Change-Id: I237b7dfafb930cae02538c4a2e4d5ce0c1058478
      Reviewed-on: https://go-review.googlesource.com/114295Reviewed-by: 's avatarBryan C. Mills <bcmills@google.com>
      Reviewed-by: 's avatarRob Pike <r@golang.org>
      Run-TryBot: Bryan C. Mills <bcmills@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      d0d47bb9
    • Iskander Sharipov's avatar
      runtime: remove TODO notes suggesting jump tables · f864d89e
      Iskander Sharipov authored
      For memmove/memclr using jump tables only reduces overall
      function performance for both amd64 and 386.
      
      Benchmarks for 32-bit memclr:
      
      	name            old time/op    new time/op    delta
      	Memclr/5-8        8.01ns ± 0%    8.94ns ± 2%  +11.59%  (p=0.000 n=9+9)
      	Memclr/16-8       9.05ns ± 0%    9.49ns ± 0%   +4.81%  (p=0.000 n=8+8)
      	Memclr/64-8       9.15ns ± 0%    9.49ns ± 0%   +3.76%  (p=0.000 n=9+10)
      	Memclr/256-8      16.6ns ± 0%    16.6ns ± 0%     ~     (p=1.140 n=10+9)
      	Memclr/4096-8      179ns ± 0%     166ns ± 0%   -7.26%  (p=0.000 n=9+8)
      	Memclr/65536-8    3.36µs ± 1%    3.31µs ± 1%   -1.48%  (p=0.000 n=10+9)
      	Memclr/1M-8       59.5µs ± 3%    60.5µs ± 2%   +1.67%  (p=0.009 n=10+10)
      	Memclr/4M-8        239µs ± 3%     245µs ± 0%   +2.49%  (p=0.004 n=10+8)
      	Memclr/8M-8        618µs ± 2%     614µs ± 1%     ~     (p=0.315 n=10+8)
      	Memclr/16M-8      1.49ms ± 2%    1.47ms ± 1%   -1.11%  (p=0.029 n=10+10)
      	Memclr/64M-8      7.06ms ± 1%    7.05ms ± 0%     ~     (p=0.573 n=10+8)
      	[Geo mean]        3.36µs         3.39µs        +1.14%
      
      For less predictable data, like loop iteration dependant sizes,
      branch table still shows 2-5% worse results.
      It also makes code slightly more complicated.
      
      This CL removes TODO note that directly suggest trying this
      optimization out. That encourages people to spend their time
      in a quite hopeless endeavour.
      
      The code used to implement branch table used a 32/64-entry table
      with pointers to TEXT blocks that implemented every associated
      label work. Most last entries point to "loop" code that is
      a fallthrough for all other sizes that do not map into specialized
      routines. The only inefficiency is extra MOVL/MOVQ required
      to fetch table pointer itself as MOVL $sym<>(SB)(AX*4) is not valid
      in Go asm (it works in other assemblers):
      
      	TEXT ·memclrNew(SB), NOSPLIT, $0-8
              	MOVL    ptr+0(FP), DI
              	MOVL    n+4(FP), BX
              	// Handle 0 separately.
              	TESTL   BX, BX
              	JEQ     _0
              	LEAL    -1(BX), CX // n-1
              	BSRL    CX, CX
      		// AX or X0 zeroed inside every text block.
             		MOVL    $memclrTable<>(SB), AX
              	JMP     (AX)(CX*4)
      	_0:
              	RET
      
      Change-Id: I4f706931b8127f85a8439b95834d5c2485a5d1bf
      Reviewed-on: https://go-review.googlesource.com/115678
      Run-TryBot: Iskander Sharipov <iskander.sharipov@intel.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Reviewed-by: 's avatarKeith Randall <khr@golang.org>
      f864d89e
    • David du Colombier's avatar
      cmd/nm: fix TestGoExec on Plan 9 · 92f8acd1
      David du Colombier authored
      CL 115975 changed TestGoExec to check symbol types.
      However, this test is failing on Plan 9, because
      there is no read-only data segment symbol on Plan 9.
      
      This change fixes TestGoExec to replace the check
      of read-only data segment symbol (R) by data segment
      symbol (D) on Plan 9.
      
      Fixes #25820.
      
      Change-Id: I7164cd9056fa1dfcd1dc1b0f87653290c14c85fa
      Reviewed-on: https://go-review.googlesource.com/118035
      Run-TryBot: David du Colombier <0intro@gmail.com>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      92f8acd1
    • Paul Jolly's avatar
      cmd/go: set DepOnly on package when calling go list -deps · 131d7e0d
      Paul Jolly authored
      Currently .DepOnly is set when go list -test is invoked to help
      distinguish those packages that matched the command line spec from those
      which are dependencies (of test packages). This is also useful when
      calling go list -deps for the same reason.
      
      Change-Id: Ifc0e68dad0fd01355928793ef803691dee5f4f29
      Reviewed-on: https://go-review.googlesource.com/112755
      Run-TryBot: Paul Jolly <paul@myitcv.org.uk>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBryan C. Mills <bcmills@google.com>
      Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
      131d7e0d