1. 25 May, 2016 16 commits
    • Austin Clements's avatar
      runtime: pass gcWork to scanstack · 3be48b4d
      Austin Clements authored
      Currently scanstack obtains its own gcWork from the P for the duration
      of the stack scan and then, if called during mark termination,
      disposes the gcWork.
      
      However, this means that the number of workbufs allocated will be at
      least the number of stacks scanned during mark termination, which may
      be very high (especially during a STW GC). This happens because, in
      steady state, each scanstack will obtain a fresh workbuf (either from
      the empty list or by allocating it), fill it with the scan results,
      and then dispose it to the full list. Nothing is consuming from the
      full list during this (and hence nothing is recycling them to the
      empty list), so the length of the full list by the time mark
      termination starts draining it is at least the number of stacks
      scanned.
      
      Fix this by pushing the gcWork acquisition up the stack to either the
      gcDrain that calls markroot that calls scanstack (which batches across
      many stack scans and is the path taken during STW GC) or to newstack
      (which is still a single scanstack call, but this is roughly bounded
      by the number of Ps).
      
      This fix reduces the workbuf allocation for the test program from
      issue #15319 from 213 MB (roughly 2KB * 1e5 goroutines) to 10 MB.
      
      Fixes #15319.
      
      Note that there's potentially a similar issue in write barriers during
      mark 2. Fixing that will be more difficult since there's no broader
      non-preemptible context, but it should also be less of a problem since
      the full list is being drained during mark 2.
      
      Some overall improvements in the go1 benchmarks, plus the usual noise.
      No significant change in the garbage benchmark (time/op or GC memory).
      
      name                      old time/op    new time/op    delta
      BinaryTree17-12              2.54s ± 1%     2.51s ± 1%  -1.09%  (p=0.000 n=20+19)
      Fannkuch11-12                2.12s ± 0%     2.17s ± 0%  +2.18%  (p=0.000 n=19+18)
      FmtFprintfEmpty-12          45.1ns ± 1%    45.2ns ± 0%    ~     (p=0.078 n=19+18)
      FmtFprintfString-12          127ns ± 0%     128ns ± 0%  +1.08%  (p=0.000 n=19+16)
      FmtFprintfInt-12             125ns ± 0%     122ns ± 1%  -2.71%  (p=0.000 n=14+18)
      FmtFprintfIntInt-12          196ns ± 0%     190ns ± 1%  -2.91%  (p=0.000 n=12+20)
      FmtFprintfPrefixedInt-12     196ns ± 0%     194ns ± 1%  -0.94%  (p=0.000 n=13+18)
      FmtFprintfFloat-12           253ns ± 1%     251ns ± 1%  -0.86%  (p=0.000 n=19+20)
      FmtManyArgs-12               807ns ± 1%     784ns ± 1%  -2.85%  (p=0.000 n=20+20)
      GobDecode-12                7.13ms ± 1%    7.12ms ± 1%    ~     (p=0.351 n=19+20)
      GobEncode-12                5.89ms ± 0%    5.95ms ± 0%  +0.94%  (p=0.000 n=19+19)
      Gzip-12                      219ms ± 1%     221ms ± 1%  +1.35%  (p=0.000 n=18+20)
      Gunzip-12                   37.5ms ± 1%    37.4ms ± 0%    ~     (p=0.057 n=20+19)
      HTTPClientServer-12         81.4µs ± 4%    81.9µs ± 3%    ~     (p=0.118 n=17+18)
      JSONEncode-12               15.7ms ± 1%    15.8ms ± 1%  +0.73%  (p=0.000 n=17+18)
      JSONDecode-12               57.9ms ± 1%    57.2ms ± 1%  -1.34%  (p=0.000 n=19+19)
      Mandelbrot200-12            4.12ms ± 1%    4.10ms ± 0%  -0.33%  (p=0.000 n=19+17)
      GoParse-12                  3.22ms ± 2%    3.25ms ± 1%  +0.72%  (p=0.000 n=18+20)
      RegexpMatchEasy0_32-12      70.6ns ± 1%    71.1ns ± 2%  +0.63%  (p=0.005 n=19+20)
      RegexpMatchEasy0_1K-12       240ns ± 0%     239ns ± 1%  -0.59%  (p=0.000 n=19+20)
      RegexpMatchEasy1_32-12      71.3ns ± 1%    71.3ns ± 1%    ~     (p=0.844 n=17+17)
      RegexpMatchEasy1_1K-12       384ns ± 2%     371ns ± 1%  -3.45%  (p=0.000 n=19+20)
      RegexpMatchMedium_32-12      109ns ± 1%     108ns ± 2%  -0.48%  (p=0.029 n=19+19)
      RegexpMatchMedium_1K-12     34.3µs ± 1%    34.5µs ± 2%    ~     (p=0.160 n=18+20)
      RegexpMatchHard_32-12       1.79µs ± 9%    1.72µs ± 2%  -3.83%  (p=0.000 n=19+19)
      RegexpMatchHard_1K-12       53.3µs ± 4%    51.8µs ± 1%  -2.82%  (p=0.000 n=19+20)
      Revcomp-12                   386ms ± 0%     388ms ± 0%  +0.72%  (p=0.000 n=17+20)
      Template-12                 62.9ms ± 1%    62.5ms ± 1%  -0.57%  (p=0.010 n=18+19)
      TimeParse-12                 325ns ± 0%     331ns ± 0%  +1.84%  (p=0.000 n=18+19)
      TimeFormat-12                338ns ± 0%     343ns ± 0%  +1.34%  (p=0.000 n=18+20)
      [Geo mean]                  52.7µs         52.5µs       -0.42%
      
      Change-Id: Ib2d34736c4ae2ec329605b0fbc44636038d8d018
      Reviewed-on: https://go-review.googlesource.com/23391
      Run-TryBot: Austin Clements <austin@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarRick Hudson <rlh@golang.org>
      3be48b4d
    • Austin Clements's avatar
      runtime: document scanstack · a1f7db88
      Austin Clements authored
      Also mark it go:systemstack and explain why.
      
      Change-Id: I88baf22741c04012ba2588d8e03dd3801d19b5c0
      Reviewed-on: https://go-review.googlesource.com/23390
      Run-TryBot: Austin Clements <austin@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarRick Hudson <rlh@golang.org>
      a1f7db88
    • Robert Griesemer's avatar
      cmd/compile: document how to update builtin.go · a689f6b8
      Robert Griesemer authored
      No code changes.
      
      Fixes #15835.
      
      Change-Id: Ibae3f20882f976babc4093df5e9fea0b2cf0e9d9
      Reviewed-on: https://go-review.googlesource.com/23443Reviewed-by: default avatarAlan Donovan <adonovan@google.com>
      a689f6b8
    • David Crawshaw's avatar
      doc: reflect {Num,}Method skips unexported methods · b7d96b8e
      David Crawshaw authored
      For #15673
      
      Change-Id: I3ce8d4016854d41860c5a9f05a54cda3de49f337
      Reviewed-on: https://go-review.googlesource.com/23430Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      b7d96b8e
    • Marcel van Lohuizen's avatar
      math/big: use run for benchmarks · 07f0c19a
      Marcel van Lohuizen authored
      shortens code and gives an example of the use of Run.
      
      Change-Id: I75ffaf762218a589274b4b62e19022e31e805d1b
      Reviewed-on: https://go-review.googlesource.com/23424Reviewed-by: default avatarRuss Cox <rsc@golang.org>
      Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      07f0c19a
    • Marcel van Lohuizen's avatar
      runtime: use Run for more benchmarks · 23cb8864
      Marcel van Lohuizen authored
      Names for Append?Bytes are slightly changed in addition to adding a slash.
      
      Change-Id: I0291aa29c693f9040fd01368eaad9766259677df
      Reviewed-on: https://go-review.googlesource.com/23426
      Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
      Reviewed-by: default avatarRuss Cox <rsc@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      23cb8864
    • Marcel van Lohuizen's avatar
      compress/flate: simplify using subtests and sub-benchmarks · d2aa5f95
      Marcel van Lohuizen authored
      This causes the large files to be loaded only once per benchmark.
      
      This CL also serves as an example use case of sub(tests|-benchmarks).
      
      This CL ensures that names are identical to the original
      except for an added slashes. Things could be
      simplified further if this restriction were dropped.
      
      Change-Id: I45e303e158e3152e33d0d751adfef784713bf997
      Reviewed-on: https://go-review.googlesource.com/23420Reviewed-by: default avatarRuss Cox <rsc@golang.org>
      Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
      Reviewed-by: default avatarJoe Tsai <thebrokentoaster@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      d2aa5f95
    • Marcel van Lohuizen's avatar
      testing: added package doc for sub(tests/benchmarks) · 89283781
      Marcel van Lohuizen authored
      Change-Id: I6991cd7a41140da784a1ff8d69c5ea2032d05850
      Reviewed-on: https://go-review.googlesource.com/23354Reviewed-by: default avatarRuss Cox <rsc@golang.org>
      Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      89283781
    • Marcel van Lohuizen's avatar
      compress/lzw: use Run for benchmarks · 5dd922c9
      Marcel van Lohuizen authored
      load file only once per group.
      
      Change-Id: I965661507055e6e100506bf14d37133ecdd2cc5e
      Reviewed-on: https://go-review.googlesource.com/23423Reviewed-by: default avatarRuss Cox <rsc@golang.org>
      Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      5dd922c9
    • Marcel van Lohuizen's avatar
      runtime: use of Run for some benchmarks · 095fbdcc
      Marcel van Lohuizen authored
      Names of sub-benchmarks are preserved, short of the additional slash.
      
      Change-Id: I9b3f82964f9a44b0d28724413320afd091ed3106
      Reviewed-on: https://go-review.googlesource.com/23425Reviewed-by: default avatarRuss Cox <rsc@golang.org>
      Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      095fbdcc
    • Robert Griesemer's avatar
      text/scanner: better error message if no error handler is installed · 824e1f2e
      Robert Griesemer authored
      This is reverting golang.org/cl/19622 and introducing "<input>"
      as filename if no filename is specified.
      
      Fixes #15813.
      
      Change-Id: Iafc74b789fa33f48ee639c42d4aebc6f06435f95
      Reviewed-on: https://go-review.googlesource.com/23402Reviewed-by: default avatarRuss Cox <rsc@golang.org>
      824e1f2e
    • Keith Randall's avatar
      cmd/compile: add generated tests for constant folding · 786e51d7
      Keith Randall authored
      Covers a bunch of constant-folding rules in generic.rules that aren't
      being covered currently.
      
      Increases coverage in generic.rules from 65% to 72%.
      
      Change-Id: I7bf58809faf22e97070183b42e6dd7d3f35bf5f9
      Reviewed-on: https://go-review.googlesource.com/23407
      Run-TryBot: Todd Neal <todd@tneal.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarTodd Neal <todd@tneal.org>
      786e51d7
    • David Crawshaw's avatar
      reflect: remove type info for unexported methods · 9f387962
      David Crawshaw authored
      Also remove some of the now unnecessary corner case handling and
      tests I've been adding recently for unexported method data.
      
      For #15673
      
      Change-Id: Ie0c7b03f2370bbe8508cdc5be765028f08000bd7
      Reviewed-on: https://go-review.googlesource.com/23410Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      9f387962
    • Elias Naur's avatar
      cmd/link: fix ARM gold linker check · f2f3b6cd
      Elias Naur authored
      CL 23400 introduced a check to make sure the gold linker is used
      on ARM host links. The check itself works, but the error checking
      logic was reversed; fix it.
      
      I manually verified that the check now correctly rejects host links
      on my RPi2 running an ancient rasbian without the gold linker
      installed.
      
      Updates #15696
      
      Change-Id: I927832620f0a60e91a71fdedf8cbd2550247b666
      Reviewed-on: https://go-review.googlesource.com/23421
      Run-TryBot: Elias Naur <elias.naur@gmail.com>
      Reviewed-by: default avatarDavid Crawshaw <crawshaw@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      f2f3b6cd
    • Elias Naur's avatar
      runtime,runtime/cgo: save callee-saved FP register on arm · 72eb46c5
      Elias Naur authored
      Other GOARCHs already handle their callee-saved FP registers, but
      arm was missing. Without this change, code using Cgo and floating
      point code might fail in mysterious and hard to debug ways.
      
      There are no floating point registers when GOARM=5, so skip the
      registers when runtime.goarm < 6.
      
      darwin/arm doesn't support GOARM=5, so the check is left out of
      rt0_darwin_arm.s.
      
      Fixes #14876
      
      Change-Id: I6bcb90a76df3664d8ba1f33123a74b1eb2c9f8b2
      Reviewed-on: https://go-review.googlesource.com/23140
      Run-TryBot: Elias Naur <elias.naur@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarMinux Ma <minux@golang.org>
      72eb46c5
    • Ian Lance Taylor's avatar
      encoding/csv: clarify that this package supports RFC 4180 · fa3f4848
      Ian Lance Taylor authored
      The intent of this comment is to reduce the number of issues opened
      against the package to add support for new kinds of CSV formats, such as
      issues #3150, #8458, #12372, #12755.
      
      Change-Id: I452c0b748e4ca9ebde3e6cea188bf7774372148e
      Reviewed-on: https://go-review.googlesource.com/23401Reviewed-by: default avatarAndrew Gerrand <adg@golang.org>
      fa3f4848
  2. 24 May, 2016 19 commits
  3. 23 May, 2016 3 commits
  4. 22 May, 2016 1 commit
  5. 21 May, 2016 1 commit
    • Brad Fitzpatrick's avatar
      A+C: automated update (subrepos) · 1f8d2768
      Brad Fitzpatrick authored
      Add Abe Haskins (individual CLA)
      Add Ahmy Yulrizka (individual CLA)
      Add Akihiro Suda (individual CLA)
      Add Alex Vaghin (corporate CLA for Google Inc.)
      Add Arlo Breault (individual CLA)
      Add Audrey Lim (individual CLA)
      Add Benjamin Wester (corporate CLA for Square, Inc.)
      Add Bryan Chan (corporate CLA for IBM)
      Add Christy Perez (corporate CLA for IBM)
      Add Colin Edwards (individual CLA)
      Add David Brophy (individual CLA)
      Add David Sansome (individual CLA)
      Add Diwaker Gupta (individual CLA)
      Add Doug Anderson (corporate CLA for Google Inc.)
      Add Dustin Carlino (corporate CLA for Google Inc.)
      Add Ernest Chiang (individual CLA)
      Add Ethan Burns (corporate CLA for Google Inc.)
      Add Gary Elliott (corporate CLA for Google Inc.)
      Add Hallgrimur Gunnarsson (corporate CLA for Google Inc.)
      Add Hironao OTSUBO (individual CLA)
      Add Holden Huang (individual CLA)
      Add Idora Shinatose (individual CLA)
      Add Irieda Noboru (individual CLA)
      Add Jeff Craig (corporate CLA for Google Inc.)
      Add Joe Henke (individual CLA)
      Add John Schnake (individual CLA)
      Add Jonathan Amsterdam (corporate CLA for Google Inc.)
      Add Kenji Kaneda (individual CLA)
      Add Kenneth Shaw (individual CLA)
      Add Mark Severson (individual CLA)
      Add Martin Garton (individual CLA)
      Add Mathias Leppich (individual CLA)
      Add Maxwell Krohn (individual CLA)
      Add Niall Sheridan (individual CLA)
      Add Nick Patavalis (individual CLA)
      Add Nick Petroni (individual CLA)
      Add Omar Jarjur (corporate CLA for Google Inc.)
      Add Özgür Kesim (individual CLA)
      Add Peter Gonda (corporate CLA for Google Inc.)
      Add Pierre Durand (individual CLA)
      Add Quentin Smith (corporate CLA for Google Inc.)
      Add Ricardo Padilha (individual CLA)
      Add Riku Voipio (corporate CLA for Linaro Limited)
      Add Roland Shoemaker (individual CLA)
      Add Sam Hug (individual CLA)
      Add Sam Whited (individual CLA)
      Add Sami Commerot (corporate CLA for Google Inc.)
      Add Scott Mansfield (corporate CLA for Netflix, Inc.)
      Add Sean Harger (corporate CLA for Google Inc.)
      Add Simon Jefford (individual CLA)
      Add Sridhar Venkatakrishnan (individual CLA)
      Add Tim Swast (corporate CLA for Google Inc.)
      Add Timothy Studd (individual CLA)
      Add Tipp Moseley (corporate CLA for Google Inc.)
      Add Toby Burress (corporate CLA for Google Inc.)
      Add Tzu-Jung Lee (corporate CLA for Currant)
      Add Vadim Grek (individual CLA)
      Add Xudong Zhang (individual CLA)
      
      Updates #12042
      
      Change-Id: I4119a8829119a2b8a9abbea9f52ceebb04878764
      Reviewed-on: https://go-review.googlesource.com/23306Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      Reviewed-by: default avatarAndrew Gerrand <adg@golang.org>
      1f8d2768