1. 15 Jan, 2020 6 commits
    • Josh Bleecher Snyder's avatar
      cmd/compile: use a sync.Pool and string interning when printing types · f77e7ed7
      Josh Bleecher Snyder authored
      CL 214239 improved type printing, but introduced performance regressions:
      3-5% memory increase, 1-2% CPU time increase.
      
      There were two primary sources of the memory regression:
      
      * allocating a bytes.Buffer for every type to print
      * always printing to that buffer, even when we could return a constant string
      
      This change addresses both of those regressions.
      The sync.Pool allows buffer re-use.
      String interning prevents allocation for re-used strings.
      
      It addresses some, but not all, of the CPU time regression.
      
      
      Memory performance impact vs master:
      
      name        old alloc/op      new alloc/op      delta
      Template         37.6MB ± 0%       36.3MB ± 0%  -3.30%  (p=0.008 n=5+5)
      Unicode          28.7MB ± 0%       28.3MB ± 0%  -1.55%  (p=0.008 n=5+5)
      GoTypes           127MB ± 0%        122MB ± 0%  -4.38%  (p=0.008 n=5+5)
      Compiler          584MB ± 0%        568MB ± 0%  -2.72%  (p=0.008 n=5+5)
      SSA              1.99GB ± 0%       1.95GB ± 0%  -1.97%  (p=0.008 n=5+5)
      Flate            23.5MB ± 0%       22.8MB ± 0%  -2.84%  (p=0.008 n=5+5)
      GoParser         29.2MB ± 0%       28.0MB ± 0%  -4.17%  (p=0.008 n=5+5)
      Reflect          81.9MB ± 0%       78.6MB ± 0%  -4.09%  (p=0.008 n=5+5)
      Tar              35.3MB ± 0%       34.1MB ± 0%  -3.29%  (p=0.008 n=5+5)
      XML              45.5MB ± 0%       44.3MB ± 0%  -2.61%  (p=0.008 n=5+5)
      [Geo mean]       82.4MB            79.9MB       -3.09%
      
      name        old allocs/op     new allocs/op     delta
      Template           394k ± 0%         363k ± 0%  -7.73%  (p=0.008 n=5+5)
      Unicode            340k ± 0%         329k ± 0%  -3.25%  (p=0.008 n=5+5)
      GoTypes           1.41M ± 0%        1.28M ± 0%  -9.54%  (p=0.008 n=5+5)
      Compiler          5.77M ± 0%        5.39M ± 0%  -6.58%  (p=0.008 n=5+5)
      SSA               19.1M ± 0%        18.1M ± 0%  -5.13%  (p=0.008 n=5+5)
      Flate              247k ± 0%         228k ± 0%  -7.50%  (p=0.008 n=5+5)
      GoParser           325k ± 0%         295k ± 0%  -9.24%  (p=0.008 n=5+5)
      Reflect           1.04M ± 0%        0.95M ± 0%  -8.48%  (p=0.008 n=5+5)
      Tar                365k ± 0%         336k ± 0%  -7.93%  (p=0.008 n=5+5)
      XML                449k ± 0%         417k ± 0%  -7.10%  (p=0.008 n=5+5)
      [Geo mean]         882k              818k       -7.26%
      
      
      Memory performance going from 52c44884,
      which is the commit preceding CL 214239, to this change:
      
      name        old alloc/op      new alloc/op      delta
      Template         36.5MB ± 0%       36.3MB ± 0%  -0.37%  (p=0.008 n=5+5)
      Unicode          28.3MB ± 0%       28.3MB ± 0%  -0.06%  (p=0.008 n=5+5)
      GoTypes           123MB ± 0%        122MB ± 0%  -0.64%  (p=0.008 n=5+5)
      Compiler          571MB ± 0%        568MB ± 0%  -0.51%  (p=0.008 n=5+5)
      SSA              1.96GB ± 0%       1.95GB ± 0%  -0.13%  (p=0.008 n=5+5)
      Flate            22.8MB ± 0%       22.8MB ± 0%    ~     (p=0.421 n=5+5)
      GoParser         28.1MB ± 0%       28.0MB ± 0%  -0.37%  (p=0.008 n=5+5)
      Reflect          78.8MB ± 0%       78.6MB ± 0%  -0.32%  (p=0.008 n=5+5)
      Tar              34.3MB ± 0%       34.1MB ± 0%  -0.35%  (p=0.008 n=5+5)
      XML              44.3MB ± 0%       44.3MB ± 0%  +0.05%  (p=0.032 n=5+5)
      [Geo mean]       80.1MB            79.9MB       -0.27%
      
      name        old allocs/op     new allocs/op     delta
      Template           372k ± 0%         363k ± 0%  -2.46%  (p=0.008 n=5+5)
      Unicode            333k ± 0%         329k ± 0%  -0.97%  (p=0.008 n=5+5)
      GoTypes           1.33M ± 0%        1.28M ± 0%  -3.71%  (p=0.008 n=5+5)
      Compiler          5.53M ± 0%        5.39M ± 0%  -2.50%  (p=0.008 n=5+5)
      SSA               18.3M ± 0%        18.1M ± 0%  -1.22%  (p=0.008 n=5+5)
      Flate              234k ± 0%         228k ± 0%  -2.44%  (p=0.008 n=5+5)
      GoParser           305k ± 0%         295k ± 0%  -3.23%  (p=0.008 n=5+5)
      Reflect            980k ± 0%         949k ± 0%  -3.12%  (p=0.008 n=5+5)
      Tar                345k ± 0%         336k ± 0%  -2.69%  (p=0.008 n=5+5)
      XML                425k ± 0%         417k ± 0%  -1.72%  (p=0.008 n=5+5)
      [Geo mean]         838k              818k       -2.41%
      
      
      Remaining CPU time regression, that is,
      the change from before CL 214239 to this change:
      
      name        old time/op       new time/op       delta
      Template          208ms ± 2%        209ms ± 1%    ~     (p=0.181 n=47+46)
      Unicode          82.9ms ± 2%       81.9ms ± 2%  -1.25%  (p=0.000 n=50+48)
      GoTypes           709ms ± 3%        714ms ± 3%  +0.77%  (p=0.003 n=48+49)
      Compiler          3.31s ± 2%        3.32s ± 2%    ~     (p=0.271 n=48+48)
      SSA               10.8s ± 1%        10.9s ± 1%  +0.61%  (p=0.000 n=46+47)
      Flate             134ms ± 2%        134ms ± 1%  +0.41%  (p=0.002 n=48+46)
      GoParser          166ms ± 2%        167ms ± 2%  +0.41%  (p=0.010 n=46+48)
      Reflect           440ms ± 4%        444ms ± 4%  +1.05%  (p=0.002 n=50+49)
      Tar               183ms ± 2%        184ms ± 2%    ~     (p=0.074 n=45+45)
      XML               247ms ± 2%        248ms ± 2%  +0.67%  (p=0.001 n=49+48)
      [Geo mean]        425ms             427ms       +0.34%
      
      name        old user-time/op  new user-time/op  delta
      Template          271ms ± 2%        271ms ± 2%    ~     (p=0.654 n=48+48)
      Unicode           117ms ± 2%        116ms ± 3%    ~     (p=0.458 n=47+45)
      GoTypes           952ms ± 3%        963ms ± 2%  +1.11%  (p=0.000 n=48+49)
      Compiler          4.50s ± 5%        4.49s ± 7%    ~     (p=0.894 n=50+50)
      SSA               15.0s ± 2%        15.1s ± 2%  +0.46%  (p=0.015 n=50+49)
      Flate             166ms ± 2%        167ms ± 2%  +0.40%  (p=0.005 n=49+48)
      GoParser          202ms ± 2%        203ms ± 2%  +0.60%  (p=0.002 n=49+47)
      Reflect           583ms ± 3%        588ms ± 3%  +0.82%  (p=0.001 n=49+46)
      Tar               223ms ± 2%        224ms ± 2%  +0.37%  (p=0.046 n=48+46)
      XML               310ms ± 2%        311ms ± 2%  +0.46%  (p=0.009 n=50+49)
      [Geo mean]        554ms             556ms       +0.36%
      
      
      Change-Id: I85951a6538373ef4309a2cc366cc1ebaf1f4582d
      Reviewed-on: https://go-review.googlesource.com/c/go/+/214818
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarKeith Randall <khr@golang.org>
      f77e7ed7
    • Brad Fitzpatrick's avatar
      crypto/tls: stop a timeout timer · 5d9f1c84
      Brad Fitzpatrick authored
      I noticed this leak while writing CL 214977.
      
      Change-Id: I7566952b8e4bc58939d23435aea86576fc58ddca
      Reviewed-on: https://go-review.googlesource.com/c/go/+/214978
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      5d9f1c84
    • Joel Sing's avatar
      math, math/big: add support for riscv64 · 5a3a5d35
      Joel Sing authored
      Based on riscv-go port.
      
      Updates #27532
      
      Change-Id: Id8ae7d851c393ec3702e4176c363accb0a42587f
      Reviewed-on: https://go-review.googlesource.com/c/go/+/204633Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      5a3a5d35
    • Tobias Klauser's avatar
      runtime: re-enable TestArenaCollision on darwin in race mode · 3743d212
      Tobias Klauser authored
      Go 1.14 will drop support for macOS 10.10, see #23011
      
      This reverts CL 155097
      
      Updates #26475
      Updates #29340
      
      Change-Id: I64d0275141407313b73068436ee81d13eacc4c76
      Reviewed-on: https://go-review.googlesource.com/c/go/+/214058
      Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      3743d212
    • yah01's avatar
      spec: add missing space in EBNF · ee55dd6b
      yah01 authored
      Fixes #36520
      
      Change-Id: I698ab235f82f7c81caa09318c954847cf3833153
      GitHub-Last-Rev: 368a1dc7889c2370fba272bcb45d94822b60d7b9
      GitHub-Pull-Request: golang/go#36559
      Reviewed-on: https://go-review.googlesource.com/c/go/+/214821Reviewed-by: default avatarRobert Griesemer <gri@golang.org>
      ee55dd6b
    • Thomas Symborski's avatar
      strings: update Join parameter name for clarity · a52db640
      Thomas Symborski authored
      Change-Id: I83f806e76ef4d268b187bd273d78ceb41b7e8fa5
      GitHub-Last-Rev: ee82eaae64536cecb631df328aafe2541f71d3f2
      GitHub-Pull-Request: golang/go#36194
      Reviewed-on: https://go-review.googlesource.com/c/go/+/211799Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      a52db640
  2. 14 Jan, 2020 4 commits
    • Rob Pike's avatar
      doc: fix up some HTML issues in go_spec.html · cae9a9fd
      Rob Pike authored
      The HTML linter 'tidy' reports:
      
      	go_spec.html:2556: Warning: unescaped & which should be written as &amp;
      	go_spec.html:3293: Warning: unescaped & or unknown entity "&s1"
      	go_spec.html:3293: Warning: unescaped & or unknown entity "&a"
      	go_spec.html:3294: Warning: unescaped & or unknown entity "&s2"
      	go_spec.html:3294: Warning: unescaped & or unknown entity "&a"
      	go_spec.html:2045: Warning: trimming empty <p>
      	go_spec.html:4526: Warning: trimming empty <ul>
      	go_spec.html:4533: Warning: trimming empty <ul>
      	go_spec.html:4539: Warning: trimming empty <ul>
      
      This CL fixes all but the <ul> ones, which I think should be fixed
      but are defended by a comment.
      
      Change-Id: I0ca88f5e80755024801877ab1298025ecf8f10c5
      Reviewed-on: https://go-review.googlesource.com/c/go/+/214457Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      Reviewed-by: default avatarTobias Klauser <tobias.klauser@gmail.com>
      cae9a9fd
    • Ian Lance Taylor's avatar
      runtime: keep P's first timer when in new atomically accessed field · cfe3cd90
      Ian Lance Taylor authored
      This reduces lock contention when only a few P's are running and
      checking for whether they need to run timers on the sleeping P's.
      Without this change the running P's would get lock contention
      while looking at the sleeping P's timers. With this change a single
      atomic load suffices to determine whether there are any ready timers.
      
      Change-Id: Ie843782bd56df49867a01ecf19c47498ec827452
      Reviewed-on: https://go-review.googlesource.com/c/go/+/214185
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      Reviewed-by: default avatarMichael Knyszek <mknyszek@google.com>
      Reviewed-by: default avatarDavid Chase <drchase@google.com>
      cfe3cd90
    • Michael Anthony Knyszek's avatar
      runtime: better approximate total cost of scavenging · 71154e06
      Michael Anthony Knyszek authored
      Currently, the scavenger is paced according to how long it takes to
      scavenge one runtime page's worth of memory. However, this pacing
      doesn't take into account the additional cost of actually using a
      scavenged page. This operation, "sysUsed," is a counterpart to the
      scavenging operation "sysUnused." On most systems this operation is a
      no-op, but on some systems like Darwin and Windows we actually make a
      syscall. Even on systems where it's a no-op, the cost is implicit: a
      more expensive page fault when re-using the page.
      
      On Darwin in particular the cost of "sysUnused" is fairly close to the
      cost of "sysUsed", which skews the pacing to be too fast. A lot of
      soon-to-be-allocated memory ends up scavenged, resulting in many more
      expensive "sysUsed" operations, ultimately slowing down the application.
      
      The way to fix this problem is to include the future cost of "sysUsed"
      on a page in the scavenging cost. However, measuring the "sysUsed" cost
      directly (like we do with "sysUnused") on most systems is infeasible
      because we would have to measure the cost of the first access.
      
      Instead, this change applies a multiplicative constant to the measured
      scavenging time which is based on a per-system ratio of "sysUnused" to
      "sysUsed" costs in the worst case (on systems where it's a no-op, we
      measure the cost of the first access). This ultimately slows down the
      scavenger to a more reasonable pace, limiting its impact on performance
      but still retaining the memory footprint improvements from the previous
      release.
      
      Fixes #36507.
      
      Change-Id: I050659cd8cdfa5a32f5cc0b56622716ea0fa5407
      Reviewed-on: https://go-review.googlesource.com/c/go/+/214517
      Run-TryBot: Michael Knyszek <mknyszek@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarAustin Clements <austin@google.com>
      71154e06
    • Koya IWAMURA's avatar
      C: add missing name · 0c65531e
      Koya IWAMURA authored
      Even though I contributed to golang/go[^1], the rule[^2] did not reflect my name in CONTRIBUTORS, so I added it.
      
      [^1]: https://go-review.googlesource.com/c/go/+/164199
      [^2]: https://github.com/golang/build/blob/e21a90b/cmd/updatecontrib/updatecontrib.go#L118
      
      Change-Id: I5d6b5684d61ea5da679519a9e703d977470de175
      Reviewed-on: https://go-review.googlesource.com/c/go/+/214617Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      0c65531e
  3. 13 Jan, 2020 6 commits
  4. 10 Jan, 2020 10 commits
  5. 09 Jan, 2020 10 commits
    • Matthew Dempsky's avatar
      runtime: change checkptr to use throw instead of panic · 56d6b879
      Matthew Dempsky authored
      Updates #34964.
      
      Change-Id: I5afb2c1e77a9a47358a1d0d108c4a787d7172b94
      Reviewed-on: https://go-review.googlesource.com/c/go/+/214217
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarAustin Clements <austin@google.com>
      56d6b879
    • Jay Conrod's avatar
      cmd/go: remove references to 1.13 in 'go help modules' · 65219650
      Jay Conrod authored
      In "Module support" section, there were two mentions of "Go 1.13",
      assuming that's the latest version. Rather than update these to 1.14,
      this CL changes those to "The go command".
      
      Also, a minor change in wording for finding go.mod files.
      
      Change-Id: Id194be9405b540f221464814e71c361a22cc0f55
      Reviewed-on: https://go-review.googlesource.com/c/go/+/214140
      Run-TryBot: Jay Conrod <jayconrod@google.com>
      Reviewed-by: default avatarBryan C. Mills <bcmills@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      65219650
    • Austin Clements's avatar
      doc/go1.14: -d=checkptr is not yet recommended on Windows · 199bc000
      Austin Clements authored
      Hopefully we'll have the remaining safety violations in the standard
      library ironed out by 1.15.
      
      We also fix a minor (but important) typo while we're here.
      
      Updates #34964, #34972.
      
      Change-Id: Ic72fd4d9411b749f8c0cea87e95ab68347009893
      Reviewed-on: https://go-review.googlesource.com/c/go/+/214118Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      199bc000
    • Dmitri Shuralyov's avatar
      CONTRIBUTORS: first round of updates for Go 1.14 · 10bfe5b9
      Dmitri Shuralyov authored
      This update was automatically generated using the updatecontrib command:
      
      	cd gotip
      	go run golang.org/x/build/cmd/updatecontrib
      
      With minor manual changes based on publicly available information
      to canonicalize letter case and formatting for a few names.
      
      Actions taken (relative to CONTRIBUTORS at origin/master):
      
      	Added Aaron Beitch <aaronb@arista.com>
      	Added Adam Shelton <aashelt90@gmail.com>
      	Added Aditya Harindar <aditya.harindar@gmail.com>
      	Added Alec Benzer <alec.benzer@gmail.com>
      	Added Alex Buchanan <buchanae@gmail.com>
      	Added Alex Gaynor <alex@alloy.us>
      	Added Alex Harford <alex.harford@saucelabs.com>
      	Added Alex Zhirov <azhirov@google.com>
      	Added Alexandr Mayorskiy <a.mayorskiy@corp.mail.ru>
      	Added An Xiao <hac@zju.edu.cn>
      	Added Andrei Enshin <b1os@bk.ru>
      	Added Andrew Medvedev <andrew.y.medvedev@gmail.com>
      	Added Andrew Stormont <astormont@racktopsystems.com>
      	Added Antonio Huete Jimenez <tuxillo@quantumachine.net>
      	Added Arda Güçlü <ardaguclu@gmail.com>
      	Added Artem Alekseev <artem.alekseev@intel.com>
      	Added Ayan George <ayan@ayan.net>
      	Added Barnaby Keene <accounts@southcla.ws>
      	Added Ben Toews <mastahyeti@gmail.com>
      	Added Benjamin Wuethrich <benjamin.wuethrich@gmail.com>
      	Added Brandon Philips <brandon@ifup.org>
      	Added Carlos Amedee <carlos@golang.org>
      	Added Changkun Ou <hi@changkun.us>
      	Added Chauncy Cullitan <chauncyc@google.com>
      	Added Clint J. Edwards <clint.j.edwards@gmail.com>
      	Added Daisuke Suzuki <daisuzu@gmail.com>
      	Added Dan Scales <danscales@google.com>
      	Added David Bond <davidsbond93@gmail.com>
      	Added Denis Isaev <idenx@yandex.com>
      	Added Domas Tamašauskas <puerdomus@gmail.com>
      	Added Duco van Amstel <duco.vanamstel@gmail.com>
      	Added Eduardo Villaseñor <evillasrmx@gmail.com>
      	Added Eric Biggers <ebiggers@google.com>
      	Added Eric Brown <browne@vmware.com>
      	Added Eric Rutherford <erutherford@gmail.com>
      	Added Gabriel Rosenhouse <rosenhouse@gmail.com>
      	Added George Hartzell <hartzell@alerce.com>
      	Added Gert Cuykens <gert.cuykens@gmail.com>
      	Added Ghazni Nattarshah <ghazni.nattarshah@gmail.com>
      	Added GitHub User DQNEO (188741) <dqneoo@gmail.com>
      	Added GitHub User Matts966 (28551465) <Matts966@users.noreply.github.com>
      	Added GitHub User ajz01 (4744634) <ajzdenek@gmail.com>
      	Added GitHub User andig (184815) <cpuidle@gmx.de>
      	Added GitHub User jinmiaoluo (39730824) <jinmiaoluo@icloud.com>
      	Added GitHub User maltalex (10195391) <code@bit48.net>
      	Added GitHub User po3rin (29445112) <abctail30@gmail.com>
      	Added GitHub User pokutuna (57545) <popopopopokutuna@gmail.com>
      	Added GitHub User ramenjuniti (32011829) <ramenjuniti@gmail.com>
      	Added GitHub User skanehira (7888591) <sho19921005@gmail.com>
      	Added GitHub User witchard (4994659) <witchard@hotmail.co.uk>
      	Added GitHub User zikaeroh (48577114) <zikaeroh@gmail.com>
      	Added Günther Noack <gnoack@google.com>
      	Added Hasit Bhatt <hasit.p.bhatt@gmail.com>
      	Added Howard Zhang <howard.zhang@arm.com>
      	Added Huan Du <i@huandu.me>
      	Added Ignacio Hagopian <jsign.uy@gmail.com>
      	Added Ilya Sinelnikov <sidhmangh@gmail.com>
      	Added Irbe Krumina <irbekrm@gmail.com>
      	Added Isfan Azhabil <isfan.azhabil@tokopedia.com>
      	Added Ivan Trubach <mr.trubach@icloud.com>
      	Added Jaap Aarts <jaap.aarts1@gmail.com>
      	Added Jeremy Faller <jeremy@golang.org>
      	Added Johan Jansson <johan.jansson@iki.fi>
      	Added John Papandriopoulos <jpap.code@gmail.com>
      	Added Jorge L. Fatta <jorge.fatta@auth0.com>
      	Added Josa Gesell <josa@gesell.me>
      	Added Julian Tibble <julian.tibble@gmail.com>
      	Added Jun Zhang <jim.zoumo@gmail.com>
      	Added Jędrzej Szczepaniak <jbszczepaniak@gmail.com>
      	Added Kalman Bekesi <kalmanb@google.com>
      	Added Katharine Berry <ktbry@google.com>
      	Added Keisuke Kishimoto <keisuke.kishimoto@gmail.com>
      	Added Kevan Swanberg <kevswanberg@gmail.com>
      	Added Koki Tomoshige <tomocy.dev@gmail.com>
      	Added Liz Rice <liz@lizrice.com>
      	Added Lorenz Brun <lorenz@brun.one>
      	Added Luke Young <bored-engineer@users.noreply.github.com>
      	Added Marc Sanmiquel <marcsanmiquel@gmail.com>
      	Added Marko Kungla <marko.kungla@gmail.com>
      	Added Mikhail Fesenko <proggga@gmail.com>
      	Added Mohit Verma <vmohit.93@gmail.com>
      	Added Moritz Fain <moritz@fain.io>
      	Added Nathan Dias <nathan.dias@orijtech.com>
      	Added Nikita Vanyasin <nikita.vanyasin@gmail.com>
      	Added Nuno Cruces <ncruces@users.noreply.github.com>
      	Added Oliver Powell <oliverpowell84@gmail.com>
      	Added Panos Georgiadis <pgeorgiadis@suse.de>
      	Added Pantelis Sampaziotis <psampaz@gmail.com>
      	Added Paulo Gomes <paulo.gomes.uk@gmail.com>
      	Added Prashant Agrawal <prashant.a.vjti@gmail.com>
      	Added Ricardo Seriani <ricardo.seriani@gmail.com>
      	Added Rob Findley <rfindley@google.com>
      	Added Robin Zhong <robin@robinzhong.co>
      	Added Rohan Challa <rohan@golang.org>
      	Added Roman Kollár <roman.kollar.0@gmail.com>
      	Added Ruixin Bao <ruixin.bao@ibm.com>
      	Added Sardorbek Pulatov <sardorbek.pulatov@outlook.com>
      	Added Scott Ragan <ragansa@fb.com>
      	Added Sean Liao <seankhliao@gmail.com>
      	Added Sebastian Chlopecki <sebsebmc@gmail.com>
      	Added Sebastian Kinne <skinne@google.com>
      	Added Sergei Lemeshkin <sergeilem@gmail.com>
      	Added Serhat Giydiren <serhatgiydiren@gmail.com>
      	Added Shivashis Padhi <shivashispadhi@gmail.com>
      	Added Simarpreet Singh <simar@linux.com>
      	Added Simon Ferquel <simon.ferquel@docker.com>
      	Added Simon Rozman <simon@rozman.si>
      	Added Sjoerd Siebinga <sjoerd.siebinga@gmail.com>
      	Added Spencer Kocot <spencerkocot@gmail.com>
      	Added Srinidhi Kaushik <shrinidhi.kaushik@gmail.com>
      	Added Sven Taute <sven.taute@gmail.com>
      	Added Tao Qingyun <qingyunha@gmail.com>
      	Added Tianji Wu <the729@gmail.com>
      	Added Tomas Dabasinskas <tomas@dabasinskas.net>
      	Added Ville Skyttä <ville.skytta@iki.fi>
      	Added Vitaly Zdanevich <zdanevich.vitaly@ya.ru>
      	Added Vladimir Evgrafov <evgrafov.vladimir@gmail.com>
      	Added Vojtech Bocek <vbocek@gmail.com>
      	Added Wang Xuerui <git@xen0n.name>
      	Added William Poussier <william.poussier@gmail.com>
      	Added Xiangdong Ji <xiangdong.ji@arm.com>
      	Added Yuichi Nishiwaki <yuichi.nishiwaki@gmail.com>
      	Added Ziheng Liu <lzhfromustc@gmail.com>
      	Used GitHub User DQNEO (188741) form for DQNEO <dqneoo@gmail.com> https://github.com/golang/go/commit/f07059d949 [go]
      	Used GitHub User Matts966 (28551465) form for Matts966 <Matts966@users.noreply.github.com> https://github.com/golang/tools/commit/d89860af [tools]
      	Used GitHub User ajz01 (4744634) form for ajz01 <ajzdenek@gmail.com> https://github.com/golang/go/commit/57ad6ef15d [go]
      	Used GitHub User andig (184815) form for andig <cpuidle@gmx.de> https://github.com/golang/go/commit/cf630586ca [go sys]
      	Used GitHub User jinmiaoluo (39730824) form for jinmiaoluo <jinmiaoluo@icloud.com> https://github.com/golang/go/commit/c7e73ef60a [go]
      	Used GitHub User maltalex (10195391) form for maltalex <code@bit48.net> https://github.com/golang/sys/commit/c709ea0 [sys]
      	Used GitHub User po3rin (29445112) form for po3rin <abctail30@gmail.com> https://github.com/golang/go/commit/bf865823ba [go]
      	Used GitHub User pokutuna (57545) form for pokutuna <popopopopokutuna@gmail.com> https://github.com/golang/go/commit/46e0d724b3 [go]
      	Used GitHub User ramenjuniti (32011829) form for ramenjuniti <ramenjuniti@gmail.com> https://github.com/golang/go/commit/f9dd99cae3 [go]
      	Used GitHub User skanehira (7888591) form for skanehira <sho19921005@gmail.com> https://github.com/golang/go/commit/87805c92fd [go]
      	Used GitHub User utkarsh-extc (53217283) form for utkarsh-extc <53217283+utkarsh-extc@users.noreply.github.com> https://github.com/golang/sys/commit/51ab0e2 [sys]
      	Used GitHub User witchard (4994659) form for witchard <witchard@hotmail.co.uk> https://github.com/golang/go/commit/42db1da8e9 [go]
      	Used GitHub User zikaeroh (48577114) form for zikaeroh <zikaeroh@gmail.com> https://github.com/golang/tools/commit/e84277c2 [tools]
      	Used GitHub name "Adam Shelton" for Adam <aashelt90@gmail.com> https://github.com/golang/exp/commit/c286b88 [exp]
      	Used GitHub name "Andrew Bonventre" for Andrew <andybons@golang.org> https://github.com/golang/go/commit/8bbfc51d9a [arch blog build crypto debug exp gddo go image lint mobile net oauth2 perf playground proposal.git review sync sys talks term text time tools tour website]
      	Used GitHub name "David Bond" for davidsbond <davidsbond93@gmail.com> https://github.com/golang/go/commit/b421b85841 [go]
      	Used GitHub name "Eduardo Villaseñor" for galaxy-designer <evillasrmx@gmail.com> https://github.com/golang/tools/commit/db047d72 [tools]
      	Used GitHub name "George Hartzell" for hartzell <hartzell@alerce.com> https://github.com/golang/tools/commit/5eefd052 [tools]
      	Used GitHub name "Ignacio Hagopian" for jsign <jsign.uy@gmail.com> https://github.com/golang/go/commit/4d4ddd862d [go]
      	Used GitHub name "Ivan Markin" for nogoegst <nogoegst@users.noreply.github.com> https://github.com/golang/go/commit/a1addf15df [go]
      	Used GitHub name "Jun Zhang" for zoumo <jim.zoumo@gmail.com> https://github.com/golang/tools/commit/81ca6dc7 [tools]
      	Used GitHub name "Keiji Yoshida" for yosssi <yoshida.keiji.84@gmail.com> https://github.com/golang/lint/commit/ac6833c [lint]
      	Used GitHub name "Koki Tomoshige" for tomocy <tomocy.dev@gmail.com> https://github.com/golang/go/commit/2f04903fec [go]
      	Used GitHub name "Michalis Kargakis" for kargakis <mkargaki@redhat.com> https://github.com/golang/go/commit/e243d242d7 [go]
      	Used GitHub name "Nikita Vanyasin" for nikita-vanyasin <nikita.vanyasin@gmail.com> https://github.com/golang/go/commit/c3e8a20a65 [go]
      	Used GitHub name "Roberto Clapis" for Roberto <empijei@users.noreply.github.com> https://github.com/golang/go/commit/963776e689 [go]
      	Used GitHub name "Robin Eklind" for mewmew <rnd0x00@gmail.com> https://github.com/golang/go/commit/b8620afb8d [arch blog go proposal.git]
      	Used GitHub name "Sergei Lemeshkin" for sergeilem <sergeilem@gmail.com> https://github.com/golang/go/commit/a3a1bdff79 [go]
      	Used GitHub name "Vladimir Evgrafov" for vovapi <evgrafov.vladimir@gmail.com> https://github.com/golang/go/commit/207a0b7933 [go]
      
      Updates #12042
      
      Change-Id: I1ba3c17108491316255f914c3a71f69fc6f4341a
      Reviewed-on: https://go-review.googlesource.com/c/go/+/213824Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      Reviewed-by: default avatarCarlos Amedee <carlos@golang.org>
      10bfe5b9
    • Michael Anthony Knyszek's avatar
      runtime: add scavtrace debug flag and remove scavenge info from gctrace · 8ac98e7b
      Michael Anthony Knyszek authored
      Currently, scavenging information is printed if the gctrace debug
      variable is >0. Scavenging information is also printed naively, for
      every page scavenged, resulting in a lot of noise when the typical
      expectation for GC trace is one line per GC.
      
      This change adds a new GODEBUG flag called scavtrace which prints
      scavenge information roughly once per GC cycle and removes any scavenge
      information from gctrace. The exception is debug.FreeOSMemory, which may
      force an additional line to be printed.
      
      Fixes #32952.
      
      Change-Id: I4177dcb85fe3f9653fd74297ea93c97c389c1811
      Reviewed-on: https://go-review.googlesource.com/c/go/+/212640
      Run-TryBot: Michael Knyszek <mknyszek@google.com>
      Reviewed-by: default avatarAustin Clements <austin@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      8ac98e7b
    • Bryan C. Mills's avatar
      cmd/go: explicitly reject 'list -u' and 'list -versions' when '-mod=vendor' is set · 509592d1
      Bryan C. Mills authored
      The information requested by these flags is not available from the
      vendor directory.
      
      Noticed while diagnosing #36478.
      
      Updates #33848
      
      Change-Id: I2b181ba5c27f01fdd6277d8d0ab1003c05774ff7
      Reviewed-on: https://go-review.googlesource.com/c/go/+/214081
      Run-TryBot: Bryan C. Mills <bcmills@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarJay Conrod <jayconrod@google.com>
      509592d1
    • Bryan C. Mills's avatar
      cmd/go/internal/modload: do not disable Query for -mod=readonly · cec535b7
      Bryan C. Mills authored
      'go list -m' allows explicit module@version arguments,
      which it resolves (using Query) but does not add to the build list.
      Similarly, 'go list -u' resolves versions without modifying the build list.
      
      These explicit operations should be allowed even when '-mod=readonly' is set.
      
      Updates #36478
      
      'go list' and 'go mod download' do not
      
      Change-Id: I5d2735729ad573635b9c1902d5d3a8bd960b8a76
      Reviewed-on: https://go-review.googlesource.com/c/go/+/214077
      Run-TryBot: Bryan C. Mills <bcmills@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarJay Conrod <jayconrod@google.com>
      cec535b7
    • Austin Clements's avatar
      runtime: protect against external code calling ExitProcess · 957259b7
      Austin Clements authored
      On Windows, we implement asynchronous preemption using SuspendThread
      to suspend other threads in our process. However, SuspendThread is
      itself actually asynchronous (it enqueues a kernel "asynchronous
      procedure call" and returns). Unfortunately, Windows' ExitProcess API
      kills all threads except the calling one and then runs APCs. As a
      result, if SuspendThread and ExitProcess are called simultaneously,
      the exiting thread can be suspended and the suspending thread can be
      exited, leaving behind a ghost process consisting of a single thread
      that's suspended.
      
      We've already protected against the runtime's own calls to
      ExitProcess, but if Go code calls external code, there's nothing
      stopping that code from calling ExitProcess. For example, in #35775,
      our own call to racefini leads to C code calling ExitProcess and
      occasionally causing a deadlock.
      
      This CL fixes this by introducing synchronization between calling
      external code on Windows and preemption. It adds an atomic field to
      the M that participates in a simple CAS-based synchronization protocol
      to prevent suspending a thread running external code. We use this to
      protect cgocall (which is used for both cgo calls and system calls on
      Windows) and racefini.
      
      Tested by running the flag package's TestParse test compiled in race
      mode in a loop. Before this change, this would reliably deadlock after
      a few minutes.
      
      Fixes #35775.
      Updates #10958, #24543.
      
      Change-Id: I50d847abcdc2688b4f71eee6a75eca0f2fee892c
      Reviewed-on: https://go-review.googlesource.com/c/go/+/213837
      Run-TryBot: Austin Clements <austin@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
      Reviewed-by: default avatarDavid Chase <drchase@google.com>
      957259b7
    • Bryan C. Mills's avatar
      cmd/go: make "finding" logging deterministic · 6dbcc8b8
      Bryan C. Mills authored
      In CL 204777, I made the "finding" messages in cachingRepo only print
      after a “longish” delay, on the theory that they would help diagnose
      slow or stuck fetches.
      
      However, as I've been testing Go 1.14 beta 1, I've found that these
      messages are mostly just noise, and the fact that they are so
      nondeterministic causes both confusion and test flakes (#35539).
      
      Moreover, it currently triggers once for each candidate module, when
      what we're usually after is actually a specific package within the
      module.
      
      So let's log the package operation unconditionally instead of the
      module fetches nondeterministically.
      
      Fixes #35539
      Updates #26152
      
      Change-Id: I41a1c772465b2f0b357d3402bc372b6907773741
      Reviewed-on: https://go-review.googlesource.com/c/go/+/213679
      Run-TryBot: Bryan C. Mills <bcmills@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarJay Conrod <jayconrod@google.com>
      6dbcc8b8
    • Cherry Zhang's avatar
      runtime: overwrite asyncPreempt PC when injecting sigpanic on Windows · 17e97322
      Cherry Zhang authored
      On Windows, it might be possible that SuspendThread suspends a
      thread right between when an exception happens and when the
      exception handler runs. (This is my guess. I don't know the
      implementation detail of Windows exceptions to be sure.) In this
      case, we may inject a call to asyncPreempt before the exception
      handler runs. The exception handler will inject a sigpanic call,
      which will make the stack trace looks like
      
      sigpanic
      asyncPreempt
      actual panicking function
      
      i.e. it appears asyncPreempt panicked.
      
      Instead, just overwrite the PC, without pushing another frame.
      
      Fixes #35773.
      
      Change-Id: Ief4e964dcb7f45670b5f93c4dcf285cc1c737514
      Reviewed-on: https://go-review.googlesource.com/c/go/+/213879
      Run-TryBot: Cherry Zhang <cherryyz@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarAustin Clements <austin@google.com>
      17e97322
  6. 08 Jan, 2020 4 commits
    • Bryan C. Mills's avatar
      cmd/go: adjust heuristics for skipping +incompatible versions · 817afe83
      Bryan C. Mills authored
      We know of at least one module (github.com/stripe/stripe-go) that has
      a run of +incompatible versions, followed by a run of versions with
      go.mod files, followed by another run of +incompatible versions.
      
      We want the heuristics for showing +incompatible versions to reflect
      the authors' current intent, and it seems clear that the current
      intent of the authors of that module is for users of the unversioned
      import path to still be on +incompatible versions.
      
      To respect that intent, we need to keep checking for +incompatible
      versions even after we have seen a lower major version with an
      explicit go.mod file.
      
      However, we still don't want to download every single version of the
      module to check it. A given major version should have a consistent,
      canonical import path, so the path (as inferred by the presence or
      absence of a go.mod file) should be the same for every release across
      that major version.
      
      To avoid unnecessary overhead — and to allow module authors to correct
      accidental changes to a major version's import path — we check only
      the most recent release of each major version. If a release
      accidentally changes the import path in either direction (by deleting
      or adding a go.mod file), it can be corrected by issuing a single
      subsequent release of that major version to restore the correct path.
      
      I manually verified that, with this change,
      github.com/stripe/stripe-go@latest reverts to v68.7.0+incompatible
      as it was in Go 1.13.
      The other regression tests for #34165 continue to pass.
      
      Updates #34165
      
      Change-Id: I5daff3cd2123f94c7c49519babf4eecd509f169e
      Reviewed-on: https://go-review.googlesource.com/c/go/+/212317Reviewed-by: default avatarJay Conrod <jayconrod@google.com>
      817afe83
    • Keith Randall's avatar
      cmd/compile: give every really deep type a unique name · 2248fc63
      Keith Randall authored
      This avoids the security problem in #29312 where two very deep, but
      distinct, types are given the same name. They both make it to the
      linker which chooses one, and the use of the other is now type unsafe.
      
      Instead, give every very deep type its own name. This errs on the
      other side, in that very deep types that should be convertible to each
      other might now not be. But at least that's not a security hole.
      
      Update #29312.
      
      Change-Id: Iac0ebe73fdc50594fd6fbf7432eef65f9a053126
      Reviewed-on: https://go-review.googlesource.com/c/go/+/213517
      Run-TryBot: Keith Randall <khr@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarEmmanuel Odeke <emm.odeke@gmail.com>
      Reviewed-by: default avatarRobert Griesemer <gri@golang.org>
      2248fc63
    • Luka Zitnik's avatar
      net/http: document that ParseForm consumes Request.Body · 77c13021
      Luka Zitnik authored
      Fixes #35620
      
      Change-Id: I71bc56ec7a7507d14b4f013177b4b816bb1a2094
      Reviewed-on: https://go-review.googlesource.com/c/go/+/212458Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      77c13021
    • Joel Sing's avatar
      runtime: use FP offsets for pipe/pipe2 on freebsd/arm64 and linux/arm64 · 4b1b18d1
      Joel Sing authored
      This is more readable and less error-prone than using RSP offsets.
      
      Suggested during review of CL 212765.
      
      Change-Id: I070190abeeac8eae5dbd414407602619d9d57422
      Reviewed-on: https://go-review.googlesource.com/c/go/+/213577
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
      4b1b18d1