1. 06 Jun, 2015 3 commits
  2. 05 Jun, 2015 28 commits
  3. 04 Jun, 2015 9 commits
    • Robert Griesemer's avatar
      cmd/go: fix fmt.Errorf call sites (latent bug) · 09a3a092
      Robert Griesemer authored
      Change-Id: I4ff42113c5dda553d6f3d58f0e4836dce7c84710
      Reviewed-on: https://go-review.googlesource.com/10730Reviewed-by: default avatarRob Pike <r@golang.org>
      09a3a092
    • Rob Pike's avatar
      cmd/doc: do not show unexported constants · ea92f42c
      Rob Pike authored
      The go/doc package doesn't remove unexported entries from const
      and var blocks, so we must trim them ourselves.
      
      Fixes #11008
      
      Change-Id: Ibd60d87e09333964e2588340a2ca2b8804bbaa28
      Reviewed-on: https://go-review.googlesource.com/10643Reviewed-by: default avatarRuss Cox <rsc@golang.org>
      ea92f42c
    • Robert Griesemer's avatar
      cmd/vet: adjust vet to use go/types and friends from std repo · a7d2d483
      Robert Griesemer authored
      - s|"golang.org/x/tools/go/exact"|"go/constant"|
      - s|"golang.org/x/tools/go/types"|"go/types"|
      - removed import of gcimporter
      - import "go/importer" instead
      - trivial adjustments to make use of go/importer
      - adjusted import paths for whitelist.go
      
      Change-Id: I43488ff44c329cd869c92dcc31193fb31bebfd29
      Reviewed-on: https://go-review.googlesource.com/10695Reviewed-by: default avatarRob Pike <r@golang.org>
      a7d2d483
    • Robert Griesemer's avatar
      cmd/vet: move cmd/vet into std repo · 1b8b2c15
      Robert Griesemer authored
      cp -r x/tools/cmd/vet cmd/vet without any changes.
      The next change will adjust the source to use std
      repo go/types and friends.
      
      This may (temporarily) break the build; the next
      commit (immediately following) will fix it. We do
      it in two commits so that we can see the manual
      changes.
      
      Change-Id: Ic45dab7066f13923e21f8c61200c8c3fd447b171
      Reviewed-on: https://go-review.googlesource.com/10694Reviewed-by: default avatarRob Pike <r@golang.org>
      1b8b2c15
    • David Crawshaw's avatar
      cmd/dist: use -tags=lldb for iOS tests · ebcc7ec1
      David Crawshaw authored
      As of golang.org/cl/9154, running go test will override a previous
      go install -a -tags=lldb std with the tag-less version of stdlib. So
      we pass -tags=lldb into the relevant go test commands.
      
      Change-Id: I1c718289d7212373a9383eff53a643f06598f5ed
      Reviewed-on: https://go-review.googlesource.com/10701Reviewed-by: default avatarJosh Bleecher Snyder <josharian@gmail.com>
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      ebcc7ec1
    • Brad Fitzpatrick's avatar
      net/http: the Set-Cookie Expiration time zone should be GMT, not UTC · d751be9f
      Brad Fitzpatrick authored
      Per RFC 6265.
      
      Change-Id: I2b6b145f5d057f96509332509d722602ed9e2bbd
      Reviewed-on: https://go-review.googlesource.com/10711Reviewed-by: default avatarBrett Slatkin <bslatkin@google.com>
      Reviewed-by: default avatarAndrew Gerrand <adg@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      d751be9f
    • Brad Fitzpatrick's avatar
      test: make test/run.go support sharding · ec745fc4
      Brad Fitzpatrick authored
      Also modifies 'dist test' to use that sharding, and removes some old
      temporary stuff from dist test which are no longer required.
      
      'dist test' now also supports running a list of tests given in
      arguments, mutually exclusive with the existing -run=REGEXP flag. The
      hacky fast paths for avoiding the 1 second "go list" latency are now
      removed and only apply to the case where partial tests are run via
      args, instead of regex.  The build coordinator will use both styles
      for awhile. (the statically-sharded ARM builders on scaleway will
      continue to use regexps, but the dynamically-shared builders on GCE
      will use the list of tests)
      
      Updates #10029
      
      Change-Id: I557800a54dfa6f3b5100ef4c26fe397ba5189813
      Reviewed-on: https://go-review.googlesource.com/10688Reviewed-by: default avatarAndrew Gerrand <adg@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      ec745fc4
    • Josh Bleecher Snyder's avatar
      cmd/internal/obj/arm64: make function prologue more predictable · 54789eff
      Josh Bleecher Snyder authored
      Static branch prediction guesses that forward branches aren't taken.
      Since stacks are rarely grown, make the forward branch mean grow.
      
      While we're here, remove the debug-only instruction
      saving the frame size in the temp register.
      
      Sample disassembly for
      
      func f() {
      	_ = [128]byte{}
      }
      
      Before:
      
      0x4008248         ldr        x1, [x28, #0x10]
      0x400824c         sub        x2, sp, #0x90
      0x4008250         cmp        x2, x1
      0x4008254         b.hi       0x4008268
      0x4008258         mov        x3, x30
      0x400825c         movz       x27, #0x90
      0x4008260         bl         runtime.morestack_noctxt
      0x4008264         b          main.f
      0x4008268         sub        sp, sp, #0x90
      0x400826c         add        x16, sp, #0x10
      0x4008270         str        xzr, [x16]
      0x4008274         str        xzr, [x16, #0x8]
      0x4008278         str        xzr, [x16, #0x10]
      0x400827c         str        xzr, [x16, #0x18]
      0x4008280         str        xzr, [x16, #0x20]
      0x4008284         str        xzr, [x16, #0x28]
      0x4008288         str        xzr, [x16, #0x30]
      0x400828c         str        xzr, [x16, #0x38]
      0x4008290         str        xzr, [x16, #0x40]
      0x4008294         str        xzr, [x16, #0x48]
      0x4008298         str        xzr, [x16, #0x50]
      0x400829c         str        xzr, [x16, #0x58]
      0x40082a0         str        xzr, [x16, #0x60]
      0x40082a4         str        xzr, [x16, #0x68]
      0x40082a8         str        xzr, [x16, #0x70]
      0x40082ac         str        xzr, [x16, #0x78]
      0x40082b0         add        sp, sp, #0x90
      0x40082b4         ret
      
      After:
      
      0x4004bc8         ldr        x1, [x28, #0x10]
      0x4004bcc         sub        x2, sp, #0x90
      0x4004bd0         cmp        x2, x1
      0x4004bd4         b.ls       0x4004c28
      0x4004bd8         sub        sp, sp, #0x90
      0x4004bdc         add        x16, sp, #0x10
      0x4004be0         str        xzr, [x16]
      0x4004be4         str        xzr, [x16, #0x8]
      0x4004be8         str        xzr, [x16, #0x10]
      0x4004bec         str        xzr, [x16, #0x18]
      0x4004bf0         str        xzr, [x16, #0x20]
      0x4004bf4         str        xzr, [x16, #0x28]
      0x4004bf8         str        xzr, [x16, #0x30]
      0x4004bfc         str        xzr, [x16, #0x38]
      0x4004c00         str        xzr, [x16, #0x40]
      0x4004c04         str        xzr, [x16, #0x48]
      0x4004c08         str        xzr, [x16, #0x50]
      0x4004c0c         str        xzr, [x16, #0x58]
      0x4004c10         str        xzr, [x16, #0x60]
      0x4004c14         str        xzr, [x16, #0x68]
      0x4004c18         str        xzr, [x16, #0x70]
      0x4004c1c         str        xzr, [x16, #0x78]
      0x4004c20         add        sp, sp, #0x90
      0x4004c24         ret
      0x4004c28         mov        x3, x30
      0x4004c2c         bl         runtime.morestack_noctxt
      0x4004c30         b          main.f
      
      Updates #10587.
      
      Package sort benchmarks using an iPhone 6:
      
      name            old time/op  new time/op  delta
      SearchWrappers   355ns ± 1%   328ns ± 1%  -7.57%  (p=0.000 n=25+19)
      SortString1K     580µs ± 1%   577µs ± 1%  -0.48%  (p=0.000 n=25+25)
      StableString1K  1.04ms ± 0%  1.04ms ± 0%    ~     (p=0.851 n=24+25)
      SortInt1K        251µs ± 1%   247µs ± 1%  -1.52%  (p=0.000 n=23+25)
      StableInt1K      267µs ± 2%   261µs ± 2%  -2.02%  (p=0.000 n=25+25)
      SortInt64K      23.8ms ± 1%  23.6ms ± 0%  -0.97%  (p=0.000 n=25+23)
      StableInt64K    22.8ms ± 0%  22.4ms ± 1%  -1.76%  (p=0.000 n=24+25)
      Sort1e2          123µs ± 1%   124µs ± 1%    ~     (p=0.256 n=23+23)
      Stable1e2        248µs ± 1%   247µs ± 1%  -0.69%  (p=0.000 n=23+25)
      Sort1e4         24.3ms ± 2%  24.6ms ± 5%  +1.36%  (p=0.017 n=22+25)
      Stable1e4       77.2ms ± 6%  76.2ms ± 5%  -1.36%  (p=0.020 n=25+25)
      Sort1e6          3.95s ± 8%   3.95s ± 8%    ~     (p=0.863 n=25+25)
      Stable1e6        15.7s ± 1%   15.5s ± 1%  -1.11%  (p=0.000 n=22+23)
      
      Change-Id: I377b3817af2ed27ddeecf24edef97fad91fc1afc
      Reviewed-on: https://go-review.googlesource.com/10500Reviewed-by: default avatarRuss Cox <rsc@golang.org>
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      Reviewed-by: default avatarDave Cheney <dave@cheney.net>
      54789eff
    • Josh Bleecher Snyder's avatar
      runtime, cmd/internal/obj/arm: improve arm function prologue · 5353cde0
      Josh Bleecher Snyder authored
      When stack growth is not needed, as it usually is not,
      execute only a single conditional branch
      rather than three conditional instructions.
      This adds 4 bytes to every function,
      but might speed up execution in the common case.
      
      Sample disassembly for
      
      func f() {
      	_ = [128]byte{}
      }
      
      Before:
      
      TEXT main.f(SB) x.go
      	x.go:3	0x2000	e59a1008	MOVW 0x8(R10), R1
      	x.go:3	0x2004	e59fb028	MOVW 0x28(R15), R11
      	x.go:3	0x2008	e08d200b	ADD R11, R13, R2
      	x.go:3	0x200c	e1520001	CMP R1, R2
      	x.go:3	0x2010	91a0300e	MOVW.LS R14, R3
      	x.go:3	0x2014	9b0118a9	BL.LS runtime.morestack_noctxt(SB)
      	x.go:3	0x2018	9afffff8	B.LS main.f(SB)
      	x.go:3	0x201c	e52de084	MOVW.W R14, -0x84(R13)
      	x.go:4	0x2020	e28d1004	ADD $4, R13, R1
      	x.go:4	0x2024	e3a00000	MOVW $0, R0
      	x.go:4	0x2028	eb012255	BL 0x4a984
      	x.go:5	0x202c	e49df084	RET #132
      	x.go:5	0x2030	eafffffe	B 0x2030
      	x.go:5	0x2034	ffffff7c	?
      
      After:
      
      TEXT main.f(SB) x.go
      	x.go:3	0x2000	e59a1008	MOVW 0x8(R10), R1
      	x.go:3	0x2004	e59fb02c	MOVW 0x2c(R15), R11
      	x.go:3	0x2008	e08d200b	ADD R11, R13, R2
      	x.go:3	0x200c	e1520001	CMP R1, R2
      	x.go:3	0x2010	9a000004	B.LS 0x2028
      	x.go:3	0x2014	e52de084	MOVW.W R14, -0x84(R13)
      	x.go:4	0x2018	e28d1004	ADD $4, R13, R1
      	x.go:4	0x201c	e3a00000	MOVW $0, R0
      	x.go:4	0x2020	eb0124dc	BL 0x4b398
      	x.go:5	0x2024	e49df084	RET #132
      	x.go:5	0x2028	e1a0300e	MOVW R14, R3
      	x.go:5	0x202c	eb011b0d	BL runtime.morestack_noctxt(SB)
      	x.go:5	0x2030	eafffff2	B main.f(SB)
      	x.go:5	0x2034	eafffffe	B 0x2034
      	x.go:5	0x2038	ffffff7c	?
      
      Updates #10587.
      
      package sort benchmarks on an iPhone 6:
      
      name            old time/op  new time/op  delta
      SortString1K     569µs ± 0%   565µs ± 1%  -0.75%  (p=0.000 n=23+24)
      StableString1K   872µs ± 1%   870µs ± 1%  -0.16%  (p=0.009 n=23+24)
      SortInt1K        317µs ± 2%   316µs ± 2%    ~     (p=0.410 n=26+26)
      StableInt1K      343µs ± 1%   339µs ± 1%  -1.07%  (p=0.000 n=22+23)
      SortInt64K      30.0ms ± 1%  30.0ms ± 1%    ~     (p=0.091 n=25+24)
      StableInt64K    30.2ms ± 0%  30.0ms ± 0%  -0.69%  (p=0.000 n=22+22)
      Sort1e2          147µs ± 1%   146µs ± 0%  -0.48%  (p=0.000 n=25+24)
      Stable1e2        290µs ± 1%   286µs ± 1%  -1.30%  (p=0.000 n=23+24)
      Sort1e4         29.5ms ± 2%  29.7ms ± 1%  +0.71%  (p=0.000 n=23+23)
      Stable1e4       88.7ms ± 4%  88.6ms ± 8%  -0.07%  (p=0.022 n=26+26)
      Sort1e6          4.81s ± 7%   4.83s ± 7%    ~     (p=0.192 n=26+26)
      Stable1e6        18.3s ± 1%   18.1s ± 1%  -0.76%  (p=0.000 n=25+23)
      SearchWrappers   318ns ± 1%   344ns ± 1%  +8.14%  (p=0.000 n=23+26)
      
      package sort benchmarks on a first generation rpi:
      
      name            old time/op  new time/op  delta
      SearchWrappers  4.13µs ± 0%  3.95µs ± 0%   -4.42%  (p=0.000 n=15+13)
      SortString1K    5.81ms ± 1%  5.82ms ± 2%     ~     (p=0.400 n=14+15)
      StableString1K  9.69ms ± 1%  9.73ms ± 0%     ~     (p=0.121 n=15+11)
      SortInt1K       3.30ms ± 2%  3.66ms ±19%  +10.82%  (p=0.000 n=15+14)
      StableInt1K     5.97ms ±15%  4.17ms ± 8%  -30.05%  (p=0.000 n=15+15)
      SortInt64K       319ms ± 1%   295ms ± 1%   -7.65%  (p=0.000 n=15+15)
      StableInt64K     343ms ± 0%   332ms ± 0%   -3.26%  (p=0.000 n=12+13)
      Sort1e2         3.36ms ± 2%  3.22ms ± 4%   -4.10%  (p=0.000 n=15+15)
      Stable1e2       6.74ms ± 1%  6.43ms ± 2%   -4.67%  (p=0.000 n=15+15)
      Sort1e4          247ms ± 1%   247ms ± 1%     ~     (p=0.331 n=15+14)
      Stable1e4        864ms ± 0%   820ms ± 0%   -5.15%  (p=0.000 n=14+15)
      Sort1e6          41.2s ± 0%   41.2s ± 0%   +0.15%  (p=0.000 n=13+14)
      Stable1e6         192s ± 0%    182s ± 0%   -5.07%  (p=0.000 n=14+14)
      
      Change-Id: I8a9db77e1d4ea1956575895893bc9d04bd81204b
      Reviewed-on: https://go-review.googlesource.com/10497Reviewed-by: default avatarRuss Cox <rsc@golang.org>
      5353cde0