1. 02 Feb, 2017 9 commits
  2. 01 Feb, 2017 31 commits
    • Kale Blankenship's avatar
      net/http: detect Comcast et al DNS and auto-skip DNS tests · 4aa7b142
      Kale Blankenship authored
      Adds helper function to auto-skip tests when DNS returns
      a successful response for a domain known not to exist.
      
      The error from `net.LookupHost` is intentionally ignored
      because the DNS tests will fail anyway if there are issues
      unrelated to NXDOMAIN responses.
      
      Fixes #17884
      
      Change-Id: I729391bd702218507561818668f791331295299e
      Reviewed-on: https://go-review.googlesource.com/34516Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      4aa7b142
    • Matthew Dempsky's avatar
      cmd/compile/internal/gc: inline typedcl0 and typedcl1 · a27b7814
      Matthew Dempsky authored
      It's easier to understand what's happening after inlining these into
      noder.typeDecl.
      
      Change-Id: I7beed5a1e18047bf09f2d4ddf64b9646c324d8d6
      Reviewed-on: https://go-review.googlesource.com/36111
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarJosh Bleecher Snyder <josharian@gmail.com>
      a27b7814
    • Michael Fraenkel's avatar
      net/http: make Server validate HTTP method · bb41b4d5
      Michael Fraenkel authored
      Fixes #18319
      
      Change-Id: If88e60a86828f60d8d93fc291932c19bab19e8dc
      Reviewed-on: https://go-review.googlesource.com/34470Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      bb41b4d5
    • Elias Naur's avatar
      misc/ios: use the default go test timeout · 90de5e81
      Elias Naur authored
      If -test.timeout is not specified to go test, it will time out after
      a default 10 minutes.
      
      The iOS exec wrapper also contains a fail safe timeout mechanism for
      a stuck device. However, if no explicit -test.timeout is specified,
      it will use a timeout of 0, plus some constant amount.
      
      Use the same default timeout in the exec wrapper as for go test,
      10 minutes.
      
      Change-Id: I6465ccd9f7b9ce08fa302e6697f7938a0ea9af34
      Reviewed-on: https://go-review.googlesource.com/36062Reviewed-by: 's avatarDavid Crawshaw <crawshaw@golang.org>
      Run-TryBot: Elias Naur <elias.naur@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      90de5e81
    • Elias Naur's avatar
      syscall: regenerate zsyscall_darwin_arm64.go with mksyscall.pl · 7ef74696
      Elias Naur authored
      Notably, this change fixes the TestTCPReadWriteAllocs test because
      the errnoErr wrapper is now used, elimitating the allocation for
      common errnos.
      
      The change to Dup is caused by a CL 8095 that changed the Dup* calls
      to use Syscall instead of RawSyscall.
      
      Found while working on the new iOS builders.
      
      Change-Id: I44ab9dcad27db190e175aa149865b33944f48674
      Reviewed-on: https://go-review.googlesource.com/36061Reviewed-by: 's avatarDavid Crawshaw <crawshaw@golang.org>
      Run-TryBot: Elias Naur <elias.naur@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      7ef74696
    • Elias Naur's avatar
      misc/ios: include the bundle id in the GOIOS_APP_ID env variable · 7d889af2
      Elias Naur authored
      The iOS exec wrapper use the constant bundle id "golang.gotest" for
      running Go programs on iOS. However, that only happens to work on
      the old iOS builders where their provisioning profile covers
      that bundle id.
      
      Expand the detection script to list all available provisioning
      profiles for the attached device and include the bundle id in the
      GOIOS_APP_ID environment variable.
      
      To allow the old builders to continue, the "golang.gotest" bundle
      id is used as a fallback if only the app id prefix is specified in
      GOIOS_APP_ID.
      
      For the new builders.
      
      Change-Id: I8baa1d4d57f845de851c3fad3f178e05e9a01b17
      Reviewed-on: https://go-review.googlesource.com/36060Reviewed-by: 's avatarDavid Crawshaw <crawshaw@golang.org>
      Run-TryBot: Elias Naur <elias.naur@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      7d889af2
    • Elias Naur's avatar
      misc/ios: ignore stderr from iOS tools · ade6bcf1
      Elias Naur authored
      On (at least) macOS 10.12, the `security cms` subcommand used by the
      iOS detection script will output an error to stderr. The command
      otherwise succeeds, but the extra line confuses a later parsing step.
      
      To fix it, use only stdout and ignore stderr from every command run
      by detect.go.
      
      For the new iOS builders.
      
      Change-Id: Iee426da7926d7f987ba1be061fa92ebb853ef53d
      Reviewed-on: https://go-review.googlesource.com/36059Reviewed-by: 's avatarDavid Crawshaw <crawshaw@golang.org>
      Run-TryBot: Elias Naur <elias.naur@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      ade6bcf1
    • Adam Langley's avatar
      crypto/tls: reject SNI values with a trailing dot. · 3f459164
      Adam Langley authored
      SNI values may not include a trailing dot according to
      https://tools.ietf.org/html/rfc6066#section-3. Although crypto/tls
      handled this correctly as a client, it didn't reject this as a server.
      
      This change makes sending an SNI value with a trailing dot a fatal
      error.
      
      Updates #18114.
      
      Change-Id: Ib7897ab40e98d4a7a4646ff8469a55233621f631
      Reviewed-on: https://go-review.googlesource.com/33904
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      3f459164
    • Adam Langley's avatar
      crypto/x509: add test for v1 intermediates. · e56be943
      Adam Langley authored
      X.509v1 certificates are ancient and should be dead. (They are even
      prohibited by the Baseline requirements, section 7.1.1.)
      
      However, there are a number of v1 roots from the 1990's that are still
      in operation. Thus crypto/x509.Certificate.CheckSignatureFrom allows
      X.509v1 certificates to sign other certificates.
      
      The chain building code, however, only allows v1 certificates to sign
      others if they're a root. This change adds a test to check that.
      
      Change-Id: Ib8d81e522f30d41932b89bdf3b19ef3782d8ec12
      Reviewed-on: https://go-review.googlesource.com/34383
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      e56be943
    • Anmol Sethi's avatar
      crypto/tls: document ConnectionState.NegotiatedProtocol more clearly · c67f0d94
      Anmol Sethi authored
      ConnectionState.NegotiatedProtocol's documentation implies that it will
      always be from Config.NextProtos. This commit clarifies that there is no
      guarantee.
      
      This commit also adds a note to
      ConnectionState.NegotiatedProtocolIsMutual, making it clear that it is
      client side only.
      
      Fixes #18841
      
      Change-Id: Icd028af8042f31e45575f1080c5e9bd3012e03d7
      Reviewed-on: https://go-review.googlesource.com/35917Reviewed-by: 's avatarFilippo Valsorda <hi@filippo.io>
      Reviewed-by: 's avatarAdam Langley <agl@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Adam Langley <agl@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      c67f0d94
    • Blake Mizerany's avatar
      net/http/httputil: eliminate duplicate alloc/copy in ReverseProxy · b48c419c
      Blake Mizerany authored
      This commit elimates the request allocation and shallow copy duplication
      already done by req.WithContext.
      
      name         old time/op    new time/op    delta
      ServeHTTP-4     216µs ±36%     212µs ±15%     ~     (p=0.853 n=10+10)
      
      name         old alloc/op   new alloc/op   delta
      ServeHTTP-4     917kB ±36%    1137kB ± 0%     ~     (p=0.352 n=10+10)
      
      name         old allocs/op  new allocs/op  delta
      ServeHTTP-4      5.00 ± 0%      4.00 ± 0%  -20.00%  (p=0.000 n=10+10)
      
      Change-Id: I514a59c30b037c7a65c355b06fd82c2d6ff17bb0
      Reviewed-on: https://go-review.googlesource.com/35569Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      b48c419c
    • Thomas Bonfort's avatar
      image/jpeg: improve performance when encoding *image.YCbCr · 435450bf
      Thomas Bonfort authored
      The existing implementation falls back to using image.At()
      for each pixel when encoding an *image.YCbCr which is
      inefficient and causes many memory allocations.
      
      This change makes the jpeg encoder directly read Y, Cb, and Cr
      pixel values.
      
      benchmark                  old ns/op     new ns/op     delta
      BenchmarkEncodeYCbCr-4     43990846      24201148      -44.99%
      
      benchmark                  old MB/s     new MB/s     speedup
      BenchmarkEncodeYCbCr-4     20.95        38.08        1.82x
      
      Fixes #18487
      
      Change-Id: Iaf2ebc646997e3e1fffa5335f1b0d642e15bd453
      Reviewed-on: https://go-review.googlesource.com/34773
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarNigel Tao <nigeltao@golang.org>
      435450bf
    • Filippo Valsorda's avatar
      doc: mention SHA-256 CBC suites are off by default · de479267
      Filippo Valsorda authored
      Change-Id: I82c41bd1d82adda457ddb5dd08caf0647905da22
      Reviewed-on: https://go-review.googlesource.com/36091Reviewed-by: 's avatarMatt Layher <mdlayher@gmail.com>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      de479267
    • Brad Fitzpatrick's avatar
      Revert "testing: delete unused stopAlarm()" · 99fb0dc1
      Brad Fitzpatrick authored
      This reverts commit ed8c62b7.
      
      Turns out it was needed in later commits.
      
      Change-Id: I07a7bc2429976d8a5a89f915a11625c118b85500
      Reviewed-on: https://go-review.googlesource.com/36113
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      Reviewed-by: 's avatarJoe Tsai <thebrokentoaster@gmail.com>
      99fb0dc1
    • Alberto Donizetti's avatar
      cmd/compile: never report "truncated to real" for toint calls · 87130030
      Alberto Donizetti authored
      Whoever called toint() is expecting the {Mpint, Mpflt, Mpcplx} arg to
      be converted to an integer expression, so it never makes sense to
      report an error as "constant X truncated to real".
      
      Fixes #11580
      
      Change-Id: Iadcb105f0802358a7f77188c2b1e63fe80c5580c
      Reviewed-on: https://go-review.googlesource.com/34638
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarRobert Griesemer <gri@golang.org>
      Run-TryBot: Robert Griesemer <gri@golang.org>
      87130030
    • Anmol Sethi's avatar
      net/http: remove check for null bytes in Dir.Open() · 8b11e0b4
      Anmol Sethi authored
      The syscall package checks for null bytes now.
      This was added in https://codereview.appspot.com/6458050
      
      Change-Id: I59a2fed3757a25b85e2668905ff5cf2ec8c3a0d3
      Reviewed-on: https://go-review.googlesource.com/34978Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      8b11e0b4
    • Jeff Johnson's avatar
      time: defer loading ZONEINFO until first time.LoadLocation call · 6d636064
      Jeff Johnson authored
      A user application can now use os.Setenv("ZONEINFO", ..) becase the
      value is no longer read on init of the time package.
      
      Fixes #18619
      
      Change-Id: Id8e303d67e6fb9c5d6ea9f969d8c94f6fff1bee3
      Reviewed-on: https://go-review.googlesource.com/35639Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      6d636064
    • Kyrylo Silin's avatar
      testing: delete unused stopAlarm() · ed8c62b7
      Kyrylo Silin authored
      The function call was removed in:
      ead08e91
      
      Change-Id: I78fe563c9ea4554811c74130533d2186a65d3033
      Reviewed-on: https://go-review.googlesource.com/35532Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      ed8c62b7
    • Ibrahim AshShohail's avatar
      archive/zip: update the ZIP spec link · 0ce3ce01
      Ibrahim AshShohail authored
      Update the link to PKWARE "Application Notes on the .ZIP file format" document.
      Now uses the permanent link according to 1.5 in version 6.3.3 (https://pkware.cachefly.net/webdocs/APPNOTE/APPNOTE-6.3.3.TXT):
      http://www.pkware.com/appnote
      
      Fixes #18738
      
      Change-Id: If252a5fca1dd666e70c2591a83d8714672d02932
      Reviewed-on: https://go-review.googlesource.com/35500Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      0ce3ce01
    • Ibrahim AshShohail's avatar
      cmd/pprof: remove redundant URLs from error messages in fetch.FetchURL · 5b1c6efb
      Ibrahim AshShohail authored
      Errors from http.Client already includes the URL in the message.
      
      Fixes #18754
      
      Change-Id: I65fc25a8f3aa6a2d4627aac3fb47eed8d3c4151a
      Reviewed-on: https://go-review.googlesource.com/35650Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      5b1c6efb
    • Patrick Pelletier's avatar
      mime/multipart: allow boundary len <= 70 · 1ef3a77e
      Patrick Pelletier authored
      As per RFC 2046, the boundary for multipart MIME is allowed up to 70
      characters. The old SetBoundary implementation only allowed up to 69 so
      this bumps it to the correct value of 70.
      
      The relevant RFC is at https://www.ietf.org/rfc/rfc2046.txt and section
      5.1.1 defines the boundary specification.
      
      Fixes #18793
      
      Change-Id: I91d2ed4549c3d27d6049cb473bac680a750fb520
      Reviewed-on: https://go-review.googlesource.com/35830Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      1ef3a77e
    • Kevin Burke's avatar
      database/sql: fix spelling mistake · ec4062f8
      Kevin Burke authored
      Change-Id: I67db3b342929a7bd11f01bf3b9afb49f4da69a0a
      Reviewed-on: https://go-review.googlesource.com/35841Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      ec4062f8
    • Josh Bleecher Snyder's avatar
      cmd/compile: report more non-inlineable functions · a246f616
      Josh Bleecher Snyder authored
      Many non-inlineable functions were not being
      reported in '-m -m' mode.
      
      Updates #17858.
      
      Change-Id: I7d96361b39dd317f5550e57334a8a6dd1a836598
      Reviewed-on: https://go-review.googlesource.com/32971
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
      a246f616
    • Michael Munday's avatar
      cmd/compile: fix generic.rules · 457ac38e
      Michael Munday authored
      generic.rules wasn't updated when rewritegeneric.go was. This commit
      updates it so that the rewritegeneric.go file can be regenerated.
      
      Fixes #18885.
      
      Change-Id: Ie7dab653ca0a9ea1c255fd12e311a0d9e66afdd2
      Reviewed-on: https://go-review.googlesource.com/36032
      Run-TryBot: David Chase <drchase@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarDavid Chase <drchase@google.com>
      457ac38e
    • Matthew Dempsky's avatar
      cmd/compile: allocate Nodes together with Name/Param/Func · 166b1219
      Matthew Dempsky authored
      After allocating a Node that needs a Name, Param, and/or Func field,
      we never clear that field, so we can reduce GC overhead slightly by
      allocating them together with the owner Node.
      
      name       old time/op     new time/op     delta
      Template       325ms ± 7%      325ms ± 7%    ~           (p=0.910 n=29+30)
      Unicode        177ms ±12%      173ms ±11%    ~           (p=0.110 n=29+30)
      GoTypes        1.06s ± 7%      1.05s ± 5%  -1.22%        (p=0.027 n=30+30)
      Compiler       4.48s ± 3%      4.47s ± 3%    ~           (p=0.423 n=30+30)
      
      name       old user-ns/op  new user-ns/op  delta
      Template        476M ±22%       467M ±14%    ~           (p=0.310 n=29+30)
      Unicode         298M ±22%       294M ±25%    ~           (p=0.335 n=30+30)
      GoTypes        1.54G ± 9%      1.48G ± 9%  -4.06%        (p=0.000 n=30+30)
      Compiler       6.26G ± 6%      6.14G ± 6%  -1.90%        (p=0.004 n=30+30)
      
      name       old alloc/op    new alloc/op    delta
      Template      40.9MB ± 0%     41.1MB ± 0%  +0.53%        (p=0.000 n=30+30)
      Unicode       30.9MB ± 0%     31.0MB ± 0%  +0.16%        (p=0.000 n=30+30)
      GoTypes        122MB ± 0%      123MB ± 0%  +0.37%        (p=0.000 n=30+30)
      Compiler       477MB ± 0%      479MB ± 0%  +0.37%        (p=0.000 n=30+29)
      
      name       old allocs/op   new allocs/op   delta
      Template        400k ± 1%       376k ± 1%  -5.96%        (p=0.000 n=30+30)
      Unicode         330k ± 1%       325k ± 1%  -1.48%        (p=0.000 n=30+30)
      GoTypes        1.22M ± 0%      1.16M ± 0%  -4.38%        (p=0.000 n=30+30)
      Compiler       4.35M ± 0%      4.13M ± 0%  -5.08%        (p=0.000 n=30+29)
      
      Change-Id: I9bdc7d9223bb32f785df71810564e82d9a76d109
      Reviewed-on: https://go-review.googlesource.com/36022Reviewed-by: 's avatarRobert Griesemer <gri@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      166b1219
    • Matthew Dempsky's avatar
      cmd/compile: simplify noding const declarations · b761b07b
      Matthew Dempsky authored
      By grouping all the logic into constDecl, we're able to get rid of the
      lastconst and lasttype globals, and simplify the logic slightly. Still
      clunky, but much easier to reason about.
      
      Change-Id: I446696c31084b3bfc1fd5d3651655a81ddd159ab
      Reviewed-on: https://go-review.googlesource.com/36023
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      Reviewed-by: 's avatarJosh Bleecher Snyder <josharian@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      b761b07b
    • Josh Bleecher Snyder's avatar
      cmd/compile: insertVarPhis micro-optimization · 1cbc5aa5
      Josh Bleecher Snyder authored
      Algorithmic improvements here are hard.
      Lifting a lookup out of the loop helps a little, though.
      
      To compile the code in #17926:
      
      name  old s/op   new s/op   delta
      Real   146 ± 3%   140 ± 4%  -3.87%  (p=0.002 n=10+10)
      User   143 ± 3%   139 ± 4%  -3.08%  (p=0.005 n=10+10)
      Sys   8.28 ±35%  8.08 ±28%    ~     (p=0.684 n=10+10)
      
      Updates #17926.
      
      Change-Id: Ic255ac8b7b409c1a53791058818b7e2cf574abe3
      Reviewed-on: https://go-review.googlesource.com/33305
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarKeith Randall <khr@golang.org>
      1cbc5aa5
    • Josh Bleecher Snyder's avatar
      cmd/compile: disable memory profiling when not in use · 302474c6
      Josh Bleecher Snyder authored
      The default value of runtime.MemProfileRate
      is non-zero, which means that a small portion
      of allocations go through the (slow) profiled
      allocation path.
      
      This is never useful in the compiler
      unless the -memprofile flag has been passed.
      I noticed this when samples from mprof.go
      showed up in a compiler cpu pprof listing.
      
      name       old time/op      new time/op      delta
      Template        207ms ± 4%       205ms ± 4%  -0.86%  (p=0.001 n=97+90)
      Unicode        91.8ms ± 4%      91.4ms ± 4%  -0.44%  (p=0.030 n=93+93)
      GoTypes         628ms ± 4%       624ms ± 3%  -0.73%  (p=0.001 n=95+92)
      Compiler        2.70s ± 3%       2.69s ± 3%  -0.39%  (p=0.000 n=97+95)
      Flate           131ms ± 5%       130ms ± 4%  -0.82%  (p=0.000 n=93+90)
      GoParser        154ms ± 5%       153ms ± 4%  -0.57%  (p=0.019 n=98+96)
      Reflect         394ms ± 5%       392ms ± 5%  -0.62%  (p=0.026 n=94+97)
      Tar             112ms ± 6%       112ms ± 5%    ~     (p=0.455 n=97+98)
      XML             214ms ± 3%       213ms ± 4%  -0.68%  (p=0.000 n=91+93)
      
      name       old user-ns/op   new user-ns/op   delta
      Template   246user-ms ± 3%  244user-ms ± 4%  -0.48%  (p=0.016 n=92+91)
      Unicode    114user-ms ± 5%  113user-ms ± 4%  -0.78%  (p=0.002 n=98+94)
      GoTypes    817user-ms ± 3%  813user-ms ± 2%  -0.50%  (p=0.006 n=96+94)
      Compiler   3.58user-s ± 2%  3.57user-s ± 2%  -0.38%  (p=0.003 n=97+95)
      Flate      158user-ms ± 5%  157user-ms ± 4%  -0.80%  (p=0.000 n=94+90)
      GoParser   191user-ms ± 4%  191user-ms ± 4%    ~     (p=0.122 n=98+98)
      Reflect    500user-ms ± 4%  498user-ms ± 4%    ~     (p=0.057 n=95+99)
      Tar        134user-ms ± 3%  134user-ms ± 4%    ~     (p=0.529 n=98+98)
      XML        265user-ms ± 3%  265user-ms ± 3%  -0.30%  (p=0.033 n=92+96)
      
      
      Change-Id: Ied5384e337800d567895ff8d47f15d631edf4f0b
      Reviewed-on: https://go-review.googlesource.com/35916Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      302474c6
    • Matthew Dempsky's avatar
      cmd/compile: eliminate iota_ · 9f26b9b9
      Matthew Dempsky authored
      Change-Id: Iad9c1961aedcc754ad2f6010a49f94c5a0a4bfee
      Reviewed-on: https://go-review.googlesource.com/32487
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarJosh Bleecher Snyder <josharian@gmail.com>
      9f26b9b9
    • Josh Bleecher Snyder's avatar
      context: lazily initialize cancelCtx done channel · 986768de
      Josh Bleecher Snyder authored
      This CL reduces allocations when a context
      created with WithCancel either
      
      (1) never has its Done channel used or
      (2) gets cancelled before its Done channel is used
      
      This is not uncommon. Many contexts are created
      for tasks that end up not using them.
      
      name                                                old time/op    new time/op    delta
      ContextCancelTree/depth=1/Root=Background-8            112ns ± 2%      74ns ± 1%  -34.03%  (p=0.000 n=17+18)
      ContextCancelTree/depth=1/Root=OpenCanceler-8          601ns ± 3%     544ns ± 1%   -9.56%  (p=0.000 n=20+20)
      ContextCancelTree/depth=1/Root=ClosedCanceler-8        367ns ± 4%     257ns ± 1%  -30.01%  (p=0.000 n=20+20)
      ContextCancelTree/depth=10/Root=Background-8          2.91µs ± 2%    2.87µs ± 0%   -1.38%  (p=0.000 n=20+18)
      ContextCancelTree/depth=10/Root=OpenCanceler-8        4.36µs ± 2%    4.26µs ± 1%   -2.34%  (p=0.000 n=20+18)
      ContextCancelTree/depth=10/Root=ClosedCanceler-8      2.02µs ± 2%    1.51µs ± 1%  -25.18%  (p=0.000 n=19+19)
      ContextCancelTree/depth=100/Root=Background-8         30.5µs ± 6%    30.5µs ± 1%     ~     (p=0.941 n=20+20)
      ContextCancelTree/depth=100/Root=OpenCanceler-8       39.8µs ± 1%    41.1µs ± 1%   +3.15%  (p=0.000 n=18+19)
      ContextCancelTree/depth=100/Root=ClosedCanceler-8     17.8µs ± 1%    13.9µs ± 1%  -21.61%  (p=0.000 n=18+20)
      ContextCancelTree/depth=1000/Root=Background-8         302µs ± 1%     313µs ± 0%   +3.62%  (p=0.000 n=20+18)
      ContextCancelTree/depth=1000/Root=OpenCanceler-8       412µs ± 2%     427µs ± 1%   +3.55%  (p=0.000 n=18+19)
      ContextCancelTree/depth=1000/Root=ClosedCanceler-8     178µs ± 1%     139µs ± 1%  -21.80%  (p=0.000 n=19+17)
      
      name                                                old alloc/op   new alloc/op   delta
      ContextCancelTree/depth=1/Root=Background-8             176B ± 0%       80B ± 0%  -54.55%  (p=0.000 n=20+20)
      ContextCancelTree/depth=1/Root=OpenCanceler-8           544B ± 0%      448B ± 0%  -17.65%  (p=0.000 n=20+20)
      ContextCancelTree/depth=1/Root=ClosedCanceler-8         352B ± 0%      160B ± 0%  -54.55%  (p=0.000 n=20+20)
      ContextCancelTree/depth=10/Root=Background-8          3.49kB ± 0%    3.39kB ± 0%   -2.75%  (p=0.000 n=20+20)
      ContextCancelTree/depth=10/Root=OpenCanceler-8        3.86kB ± 0%    3.76kB ± 0%   -2.49%  (p=0.000 n=20+20)
      ContextCancelTree/depth=10/Root=ClosedCanceler-8      1.94kB ± 0%    0.88kB ± 0%  -54.55%  (p=0.000 n=20+20)
      ContextCancelTree/depth=100/Root=Background-8         36.6kB ± 0%    36.5kB ± 0%   -0.26%  (p=0.000 n=20+20)
      ContextCancelTree/depth=100/Root=OpenCanceler-8       37.0kB ± 0%    36.9kB ± 0%   -0.26%  (p=0.000 n=20+20)
      ContextCancelTree/depth=100/Root=ClosedCanceler-8     17.8kB ± 0%     8.1kB ± 0%  -54.55%  (p=0.000 n=20+20)
      ContextCancelTree/depth=1000/Root=Background-8         368kB ± 0%     368kB ± 0%   -0.03%  (p=0.000 n=20+20)
      ContextCancelTree/depth=1000/Root=OpenCanceler-8       368kB ± 0%     368kB ± 0%   -0.03%  (p=0.000 n=20+20)
      ContextCancelTree/depth=1000/Root=ClosedCanceler-8     176kB ± 0%      80kB ± 0%  -54.55%  (p=0.000 n=20+20)
      
      name                                                old allocs/op  new allocs/op  delta
      ContextCancelTree/depth=1/Root=Background-8             3.00 ± 0%      2.00 ± 0%  -33.33%  (p=0.000 n=20+20)
      ContextCancelTree/depth=1/Root=OpenCanceler-8           8.00 ± 0%      7.00 ± 0%  -12.50%  (p=0.000 n=20+20)
      ContextCancelTree/depth=1/Root=ClosedCanceler-8         6.00 ± 0%      4.00 ± 0%  -33.33%  (p=0.000 n=20+20)
      ContextCancelTree/depth=10/Root=Background-8            48.0 ± 0%      47.0 ± 0%   -2.08%  (p=0.000 n=20+20)
      ContextCancelTree/depth=10/Root=OpenCanceler-8          53.0 ± 0%      52.0 ± 0%   -1.89%  (p=0.000 n=20+20)
      ContextCancelTree/depth=10/Root=ClosedCanceler-8        33.0 ± 0%      22.0 ± 0%  -33.33%  (p=0.000 n=20+20)
      ContextCancelTree/depth=100/Root=Background-8            498 ± 0%       497 ± 0%   -0.20%  (p=0.000 n=20+20)
      ContextCancelTree/depth=100/Root=OpenCanceler-8          503 ± 0%       502 ± 0%   -0.20%  (p=0.000 n=20+20)
      ContextCancelTree/depth=100/Root=ClosedCanceler-8        303 ± 0%       202 ± 0%  -33.33%  (p=0.000 n=20+20)
      ContextCancelTree/depth=1000/Root=Background-8         5.00k ± 0%     5.00k ± 0%   -0.02%  (p=0.000 n=20+20)
      ContextCancelTree/depth=1000/Root=OpenCanceler-8       5.00k ± 0%     5.00k ± 0%   -0.02%  (p=0.000 n=20+20)
      ContextCancelTree/depth=1000/Root=ClosedCanceler-8     3.00k ± 0%     2.00k ± 0%  -33.33%  (p=0.000 n=20+20)
      
      Change-Id: Ibd7a0c3d5c847861cf1497f8fead34329413d26d
      Reviewed-on: https://go-review.googlesource.com/34979
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Reviewed-by: 's avatarSameer Ajmani <sameer@golang.org>
      986768de
    • Michael Munday's avatar
      cmd/asm, cmd/internal/obj/s390x: fix encoding of VREPI{H,F,G} · fd118b69
      Michael Munday authored
      Also adds tests for all missing VRI-a instructions (which may be
      affected by this change).
      
      Fixes #18749.
      
      Change-Id: I48249dda626f32555da9ab58659e2e140de6504a
      Reviewed-on: https://go-review.googlesource.com/35561
      Run-TryBot: Michael Munday <munday@ca.ibm.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarDavid Chase <drchase@google.com>
      fd118b69