aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-07-27[dev.debug] cmd/compile: better DWARF with optimizations ondev.debugHeschi Kreinick
Debuggers use DWARF information to find local variables on the stack and in registers. Prior to this CL, the DWARF information for functions claimed that all variables were on the stack at all times. That's incorrect when optimizations are enabled, and results in debuggers showing data that is out of date or complete gibberish. After this CL, the compiler is capable of representing variable locations more accurately, and attempts to do so. Due to limitations of the SSA backend, it's not possible to be completely correct. There are a number of problems in the current design. One of the easier to understand is that variable names currently must be attached to an SSA value, but not all assignments in the source code actually result in machine code. For example: type myint int var a int b := myint(int) and b := (*uint64)(unsafe.Pointer(a)) don't generate machine code because the underlying representation is the same, so the correct value of b will not be set when the user would expect. Generating the more precise debug information is behind a flag, dwarflocationlists. Because of the issues described above, setting the flag may not make the debugging experience much better, and may actually make it worse in cases where the variable actually is on the stack and the more complicated analysis doesn't realize it. A number of changes are included: - Add a new pseudo-instruction, RegKill, which indicates that the value in the register has been clobbered. - Adjust regalloc to emit RegKills in the right places. Significantly, this means that phis are mixed with StoreReg and RegKills after regalloc. - Track variable decomposition in ssa.LocalSlots. - After the SSA backend is done, analyze the result and build location lists for each LocalSlot. - After assembly is done, update the location lists with the assembled PC offsets, recompose variables, and build DWARF location lists. Emit the list as a new linker symbol, one per function. - In the linker, aggregate the location lists into a .debug_loc section. TODO: - currently disabled for non-X86/AMD64 because there are no data tables. go build -toolexec 'toolstash -cmp' -a std succeeds. With -dwarflocationlists false: before: f02812195637909ff675782c0b46836a8ff01976 after: 06f61e8112a42ac34fb80e0c818b3cdb84a5e7ec benchstat -geomean /tmp/220352263 /tmp/621364410 completed 15 of 15, estimated time remaining 0s (eta 3:52PM) name old time/op new time/op delta Template 199ms ± 3% 198ms ± 2% ~ (p=0.400 n=15+14) Unicode 96.6ms ± 5% 96.4ms ± 5% ~ (p=0.838 n=15+15) GoTypes 653ms ± 2% 647ms ± 2% ~ (p=0.102 n=15+14) Flate 133ms ± 6% 129ms ± 3% -2.62% (p=0.041 n=15+15) GoParser 164ms ± 5% 159ms ± 3% -3.05% (p=0.000 n=15+15) Reflect 428ms ± 4% 422ms ± 3% ~ (p=0.156 n=15+13) Tar 123ms ±10% 124ms ± 8% ~ (p=0.461 n=15+15) XML 228ms ± 3% 224ms ± 3% -1.57% (p=0.045 n=15+15) [Geo mean] 206ms 377ms +82.86% name old user-time/op new user-time/op delta Template 292ms ±10% 301ms ±12% ~ (p=0.189 n=15+15) Unicode 166ms ±37% 158ms ±14% ~ (p=0.418 n=15+14) GoTypes 962ms ± 6% 963ms ± 7% ~ (p=0.976 n=15+15) Flate 207ms ±19% 200ms ±14% ~ (p=0.345 n=14+15) GoParser 246ms ±22% 240ms ±15% ~ (p=0.587 n=15+15) Reflect 611ms ±13% 587ms ±14% ~ (p=0.085 n=15+13) Tar 211ms ±12% 217ms ±14% ~ (p=0.355 n=14+15) XML 335ms ±15% 320ms ±18% ~ (p=0.169 n=15+15) [Geo mean] 317ms 583ms +83.72% name old alloc/op new alloc/op delta Template 40.2MB ± 0% 40.2MB ± 0% -0.15% (p=0.000 n=14+15) Unicode 29.2MB ± 0% 29.3MB ± 0% ~ (p=0.624 n=15+15) GoTypes 114MB ± 0% 114MB ± 0% -0.15% (p=0.000 n=15+14) Flate 25.7MB ± 0% 25.6MB ± 0% -0.18% (p=0.000 n=13+15) GoParser 32.2MB ± 0% 32.2MB ± 0% -0.14% (p=0.003 n=15+15) Reflect 77.8MB ± 0% 77.9MB ± 0% ~ (p=0.061 n=15+15) Tar 27.1MB ± 0% 27.0MB ± 0% -0.11% (p=0.029 n=15+15) XML 42.7MB ± 0% 42.5MB ± 0% -0.29% (p=0.000 n=15+15) [Geo mean] 42.1MB 75.0MB +78.05% name old allocs/op new allocs/op delta Template 402k ± 1% 398k ± 0% -0.91% (p=0.000 n=15+15) Unicode 344k ± 1% 344k ± 0% ~ (p=0.715 n=15+14) GoTypes 1.18M ± 0% 1.17M ± 0% -0.91% (p=0.000 n=15+14) Flate 243k ± 0% 240k ± 1% -1.05% (p=0.000 n=13+15) GoParser 327k ± 1% 324k ± 1% -0.96% (p=0.000 n=15+15) Reflect 984k ± 1% 982k ± 0% ~ (p=0.050 n=15+15) Tar 261k ± 1% 259k ± 1% -0.77% (p=0.000 n=15+15) XML 411k ± 0% 404k ± 1% -1.55% (p=0.000 n=15+15) [Geo mean] 439k 755k +72.01% name old text-bytes new text-bytes delta HelloSize 694kB ± 0% 694kB ± 0% -0.00% (p=0.000 n=15+15) name old data-bytes new data-bytes delta HelloSize 5.55kB ± 0% 5.55kB ± 0% ~ (all equal) name old bss-bytes new bss-bytes delta HelloSize 133kB ± 0% 133kB ± 0% ~ (all equal) name old exe-bytes new exe-bytes delta HelloSize 1.04MB ± 0% 1.04MB ± 0% ~ (all equal) Change-Id: I991fc553ef175db46bb23b2128317bbd48de70d8 Reviewed-on: https://go-review.googlesource.com/41770 Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
2017-07-26[dev.debug] cmd/internal/dwarf: add DWARF abbrevs with location listsHeschi Kreinick
Location lists require new DWARF abbrev entries. Add them before CL 41770 to enable binary comparison. Change-Id: If99461f6896db902f2774e0718065eb3d3522026 Reviewed-on: https://go-review.googlesource.com/50881 Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
2017-07-26[dev.debug] cmd/link: let the linker combine .debug_ranges, remove globalsHeschi Kreinick
The linker is pretty good at combining a bunch of symbols into a section, so let it do .debug_ranges the normal way. Along the way, remove a bunch of globals that were only used by one function that would only be called once per invocation. Change-Id: I1a528a438b193c41e7c444e8830516b07f11affc Reviewed-on: https://go-review.googlesource.com/43890 Reviewed-by: Alessandro Arzilli <alessandro.arzilli@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-07-26[dev.debug] cmd/compile: track variable decomposition in LocalSlotHeschi Kreinick
When the compiler decomposes a user variable, track its origin so that it can be recomposed during DWARF generation. Change-Id: Ia71c7f8e7f4d65f0652f1c97b0dda5d9cad41936 Reviewed-on: https://go-review.googlesource.com/50878 Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
2017-07-25[dev.debug] cmd/compile: keep float names in the Names listHeschi Kreinick
Fix an oversight in decompose that caused floats to be missing from the Names list. Change-Id: I5db9c9498e9a4421742389eb929752fdac873b38 Reviewed-on: https://go-review.googlesource.com/50877 Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
2017-07-25[dev.debug] cmd/compile: rename some locals in genssaHeschi Kreinick
When we start tracking the mapping from Value to Prog, valueProgs will be confusing. Disambiguate. Change-Id: Ib3b302fedb7eb0ff1bde789d70a11656d82f0897 Reviewed-on: https://go-review.googlesource.com/50876 Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
2017-07-25[dev.debug] cmd/compile: rename dwarf.Var.Offset to StackOffsetHeschi Kreinick
After we track decomposition, offset could mean stack offset or offset in recomposed variable. Disambiguate. Change-Id: I4d810b8c0dcac7a4ec25ac1e52898f55477025df Reviewed-on: https://go-review.googlesource.com/50875 Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
2017-07-24cmd/compile: consider exported flag in namedataIan Lance Taylor
It is possible to have an unexported name with a nil package, for an embedded field whose type is a pointer to an unexported type. We must encode that fact in the type..namedata symbol name, to avoid incorrectly merging an unexported name with an exported name. Fixes #21120 Change-Id: I2e3879d77fa15c05ad92e0bf8e55f74082db5111 Reviewed-on: https://go-review.googlesource.com/50710 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
2017-07-24cmd/link: use full link, not compile, to test for -no-?pieIan Lance Taylor
This avoids an error from clang when using -nopie during compilation, and permits us to check that the entire build succeeds. Updates #21042 Change-Id: I2e6c7d5c97a85c223ed3288622bbb58ce33b8774 Reviewed-on: https://go-review.googlesource.com/50874 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-07-24.github: recommend 'go bug' when filing an issueJosh Bleecher Snyder
It was released with 1.8, so it should be widely available. Change-Id: I7dcf205009b528071ea63f99cb5da0db183df341 Reviewed-on: https://go-review.googlesource.com/50932 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-07-24.github: add SUPPORT fileJosh Bleecher Snyder
GitHub recently added support for a SUPPORT file: https://github.com/blog/2400-support-file-support This SUPPORT file is a very lightly edited copy of the wiki entry on asking questions: https://github.com/golang/go/wiki/Questions Change-Id: Ic1eb74d985ea30862defb99750fb42da84e492de Reviewed-on: https://go-review.googlesource.com/50930 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-07-22encoding/json: ignore embedded fields of pointers to unexported non-structsJoe Tsai
https://golang.org/cl/33773 fixes the JSON marshaler to avoid serializing embedded fields on unexported types of non-struct types. However, Go allows embedding pointer to types, so the check for whether the field is a non-struct type must first dereference the pointer to get at the underlying type. Furthermore, due to a edge-case in the behavior of StructField.PkgPath not being a reliable indicator of whether the field is unexported (see #21122), we use our own logic to determine whether the field is exported or not. The logic in this CL may be simplified depending on what happens in #21122. Fixes #21121 Updates #21122 Change-Id: I8dfd1cdfac8a87950df294a566fb96dfd04fd749 Reviewed-on: https://go-review.googlesource.com/50711 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-07-21sync: delete a sentence from the Map docsBrad Fitzpatrick
From Josh's comments on https://golang.org/cl/50310 Once I removed the "from the Go standard library" bit, the beginning wasn't worth keeping. It also wasn't clear whether what it meant by "cache contention". Processor caches, or user-level caches built with sync.Map? It didn't seem worth clarifying and didn't convey any useful information, so deleted. Change-Id: Id1d76105a3081d0855f6a64540700932bb83d98e Reviewed-on: https://go-review.googlesource.com/50632 Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Bryan Mills <bcmills@google.com>
2017-07-21net/http: document that after Hijack, Request.Body is invalidBrad Fitzpatrick
We can make it panic with a more explicit and readable error message during Go 1.10, but document it for now. This has always been the case; it's not a new rule. Updates #20933 Change-Id: I53c1fefb47a8f4aae0bb32fa742afa3a2ed20e8a Reviewed-on: https://go-review.googlesource.com/50634 Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
2017-07-21sync: update Map documentation with usage rule of thumbMichael Stapelberg
As per bcmills’s lightning talk at GopherCon 2017: https://github.com/gophercon/2017-talks/tree/master/lightningtalks/BryanCMills-AnOverviewOfSyncMap Change-Id: I12dd0daa608af175d110298780f32c6dc5e1e0a0 Reviewed-on: https://go-review.googlesource.com/50310 Reviewed-by: Bryan Mills <bcmills@google.com>
2017-07-21doc: minor fixes to the editor guideJaana Burcu Dogan
Change-Id: I8f6bcfab27251ef6962306d56e40d306ef85fe60 Reviewed-on: https://go-review.googlesource.com/50472 Reviewed-by: Rob Pike <r@golang.org>
2017-07-21runtime: improve out-of-memory message when VirtualAlloc failsAustin Clements
Fixes #19514. Change-Id: I93600d5c3d11ecab5a47dd4cd55ed3aea05e221e Reviewed-on: https://go-review.googlesource.com/49611 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-07-20net/http: improve signature of Redirect, NewRequestDmitri Shuralyov
In CL https://golang.org/cl/4893043 (6 years ago), a new package named "url" was created (it is currently known as "net/url"). During that change, some identifier name collisions were introduced, and two parameters in net/http were renamed to "urlStr". Since that time, Go has continued to put high emphasis on the quality and readability of the documentation. Sometimes, that means making small sacrifices in the implementation details of a package to ensure that the godoc reads better, since that's what the majority of users interact with. See https://golang.org/s/style#named-result-parameters: > Clarity of docs is always more important than saving a line or two > in your function. I think the "urlStr" parameter name is suboptimal for godoc purposes, and just "url" would be better. During the review of https://golang.org/cl/4893043, it was also noted by @rsc that having to rename parameters named "url" was suboptimal: > It's unfortunate that naming the package url means > you can't have a parameter or variable named url. However, at the time, the name of the url package was still being decided, and uri was an alternative name under consideration. The reason urlStr was chosen is because it was a lesser evil compared to naming the url package uri instead: > Let's not get hung up on URI vs. URL, but I'd like s/uri/urlStr/ even for just > that the "i" in "uri" looks very similar to the "l" in "url" in many fonts. > Please let's go with urlStr instead of uri. Now that we have the Go 1 compatibility guarantee, the name of the net/url package is fixed. However, it's possible to improve the signature of Redirect, NewRequest functions in net/http package for godoc purposes by creating a package global alias to url.Parse, and renaming urlStr parameter to url in the exported funcs. This CL does so. Updates #21077. Change-Id: Ibcc10e3825863a663e6ad91b6eb47b1862a299a6 Reviewed-on: https://go-review.googlesource.com/49930 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-07-20cmd/go, cmd/link: if -no-pie doesn't work, try -nopieIan Lance Taylor
GCC says -no-pie, clang says -nopie. Fixes #21042 Change-Id: Iadc83ea7a48ea0debc5064c1ee8da4ebff752044 Reviewed-on: https://go-review.googlesource.com/49710 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-07-20sync: release m.mu during (*RWMutexMap).Range callbacks in sync_testBryan C. Mills
The mainline sync.Map has allowed mutations within Range callbacks since https://golang.org/cl/37342. The reference implementations need to do the same. This change integrates https://go-review.googlesource.com/c/42956/ from x/sync. Change-Id: I6b58cf874bb31cd4f6fdb8bfa8278888ed617a5a Reviewed-on: https://go-review.googlesource.com/42957 Run-TryBot: Bryan Mills <bcmills@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-07-20misc/cgo/testsanitizers: add regression test for change 50251Bryan C. Mills
http://golang.org/cl/50251 fixed a regression under TSAN. This change adds a minimal reproducer for the observed symptom. Change-Id: Ib9ad01b458b7fdec14d6c2fe3c243f9c64b3dcf2 Reviewed-on: https://go-review.googlesource.com/50371 Run-TryBot: Bryan Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-07-20cmd/go: fix test when go source tree has POSIX ACLJess Frazelle
Fixes TestGoBuildUmask when the user has a POSIX ACL on the Go source tree. Fixes #17909. Change-Id: I5bc19099af8353afd41071258f4f317612b4c8c1 Reviewed-on: https://go-review.googlesource.com/50370 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-07-20runtime: use SIGKILL if SIGQUIT is blocked; skip tests that need SIGQUITAustin Clements
The runtime tests may be invoked from a parent that has SIGQUIT blocked. For example, Java invokes subprocesses this way. In this situation, TestCrashDumpsAllThreads and TestPanicSystemstack will fail because they depend on SIGQUIT to get tracebacks, and any subprocess test that times out will fail to kill the subprocess. Fix this by detecting if SIGQUIT is blocked and, if so, skipping tests that depend on it and using SIGKILL to kill timed-out subprocesses. Based on a fix by Carl Henrik Lunde in https://golang.org/issue/19196#issuecomment-316145733 Fixes #19196. Change-Id: Ia20bf15b96086487d0ef6b75239dcc260c21714c Reviewed-on: https://go-review.googlesource.com/50330 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-07-20runtime: don't call libc sigaction function in forked childIan Lance Taylor
If we are using vfork, and if something (such as TSAN) is intercepting the sigaction function, then we must call the system call, not the libc function. Otherwise the intercepted sigaction call in the child may trash the data structures in the parent. Change-Id: Id9588bfeaa934f32c920bf829c5839be5cacf243 Reviewed-on: https://go-review.googlesource.com/50251 Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com> Reviewed-by: Austin Clements <austin@google.com>
2017-07-20os: remove duplicate check from windows os.StatJohnny Luo
Fixes #21075 Change-Id: Idfe5002dfe17943844d9427e27f82ce894b92e80 Reviewed-on: https://go-review.googlesource.com/50270 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-07-19net/mail: Fix typoyansal
Fixes #21089 Change-Id: Idd65c7185b3e19f33958eb165cb5b09c06db3d56 Reviewed-on: https://go-review.googlesource.com/50110 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-07-19doc: add an editor guideJaana Burcu Dogan
The Go ecosystem provides many tools to make Go development more productive and seamless. Document the availability of the editor plugins and IDEs, add an overview of feature support and screencasts. Updates #20398. Updates #20402. Updates #20399. Updates #20401. Updates #20569. Change-Id: I0c6cb48eb4e3848807aaad78390493e14f097916 Reviewed-on: https://go-review.googlesource.com/45772 Reviewed-by: Steve Francia <spf@golang.org>
2017-07-19runtime: only trace mark assists that do workAustin Clements
Currently we trace mark assists even if they're satisfied entirely by stealing. This means even if background marking is keeping up with allocation, we'll still emit a trace event every N bytes of allocation. The event will be a few microseconds, if that, but they're frequent enough that, when zoomed out in the trace view, it looks like all of the time is spent in mark assists even if almost none is. Change this so we only emit a trace event if the assist actually has to do assisting. This makes the traces of these events far more useful. Change-Id: If4aed1c413b814341ef2fba61d2f10751d00451b Reviewed-on: https://go-review.googlesource.com/50030 Run-TryBot: Austin Clements <austin@google.com> Reviewed-by: Rick Hudson <rlh@golang.org>
2017-07-19cmd/compile: fix unaligned loads/stores to global variables on s390xMichael Munday
Load/store-merging and move optimizations can result in unaligned memory accesses. This is fine so long as the load/store instruction used does not take a relative offset. In the SSA rules this means we must not merge (MOVDaddr (SB)) ops into loads/stores unless we can guarantee the alignment of the target. Fixes #21048. Change-Id: I70f13a62a148d5f0a56e704e8f76e36b4a4226d9 Reviewed-on: https://go-review.googlesource.com/49250 Run-TryBot: Michael Munday <mike.munday@ibm.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
2017-07-18net/http: fix parameter name in commentIan Lance Taylor
Fixes #21077 Change-Id: Ic61d7313907f58ff4027fd2eee1ddb8c1656304d Reviewed-on: https://go-review.googlesource.com/49712 Reviewed-by: Dmitri Shuralyov <shurcool@gmail.com>
2017-07-18runtime: move tSweepTerm capture closer to STWAustin Clements
tSweepTerm and pauseStart are supposed to be when STW was triggered, but right now they're captured a bit before STW. Move these down to immediately before we trigger STW. Fixes #19590. Change-Id: Icd48a5c4d45c9b36187ff986e4f178b5064556c1 Reviewed-on: https://go-review.googlesource.com/49612 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-07-18runtime: always use 2MB stacks on 64-bit WindowsAustin Clements
Currently, Windows stacks are either 128kB or 2MB depending on whether the binary uses cgo. This is because we assume that Go system stacks and the small amount of C code invoked by the standard library can operate within smaller stacks, but general Windows C code assumes larger stacks. However, it's easy to call into arbitrary C code using the syscall package on Windows without ever importing cgo into a binary. Such binaries need larger system stacks even though they don't use cgo. Fix this on 64-bit by increasing the system stack size to 2MB always. This only costs address space, which is free enough on 64-bit to not worry about. We keep (for now) the existing heuristic on 32-bit, where address space comes at more of a premium. Updates #20975. Change-Id: Iaaaa9a2fcbadc825cddc797aaaea8d34ef8debf2 Reviewed-on: https://go-review.googlesource.com/49331 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
2017-07-18database/sql: fix wrong method name in descriptionAlexey Palazhchenko
Change-Id: Ie6a88b70d7c45c59995ee2f57fb28f9a3cbb404d Reviewed-on: https://go-review.googlesource.com/49470 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-07-18A+C: final updates for Go 1.9Brad Fitzpatrick
Add Adam Kisala (individual CLA) Add Aditya Mukerjee (individual CLA) Add Akhil Indurti (individual CLA) Add André Carvalho (individual CLA) Add Andy Walker (individual CLA) Add Awn Umar (individual CLA) Add Bastian Ike (individual CLA) Add Brian Downs (individual CLA) Add Cody Oss (individual CLA) Add Costin Chirvasuta (corporate CLA for Google Inc.) Add Dan Ballard (individual CLA) Add Dong-hee Na (individual CLA) Add Dylan Waits (individual CLA) Add Evan Hicks (individual CLA) Add Fannie Zhang (corporate CLA for ARM Ltd.) Add Francisco Rojas (individual CLA) Add Gabriel Nicolas Avellaneda (individual CLA) Add Gabríel Arthúr Pétursson (individual CLA) Add Greg Poirier (individual CLA) Add Iccha Sethi (individual CLA) Add Ivan Moscoso (individual CLA) Add Jamie Kerr (individual CLA) Add Joe Kyo (individual CLA) Add Joey Geiger (individual CLA) Add John R. Lenton (individual CLA) Add Johnny Luo (individual CLA) Add Josh Roppo (individual CLA) Add Kate Manson (individual CLA) Add Leo Rudberg (corporate CLA for Google Inc.) Add Ma Peiqi (individual CLA) Add Martynas Budriūnas (corporate CLA for Google Inc.) Add Maryan Hratson (individual CLA) Add Michael Edwards (individual CLA) Add Michael Hendricks (individual CLA) Add Pablo Santiago Blum de Aguiar (individual CLA) Add Pat Moroney (individual CLA) Add Shi Han Ng (individual CLA) Add Steven Buss (corporate CLA for Google Inc.) Add Suzy Mueller (corporate CLA for Google Inc.) Add Taro Aoki (individual CLA) Add Tim Heckman (individual CLA) Add Tony Walker (individual CLA) Add Yasha Bubnov (individual CLA) Updates #12042 Change-Id: Iee063dd6c5a39de16907acfb5af87e81a05ab417 Reviewed-on: https://go-review.googlesource.com/49351 Reviewed-by: Andrew Bonventre <andybons@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-07-17syscall: update check for UserNS support for centos 7Jess Frazelle
Fixes #20796 Fixes #16283 Change-Id: Ib11992fbd2bc1fbb3b14ae5a6bf0da2e4c12f641 Reviewed-on: https://go-review.googlesource.com/49311 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-07-17cmd/compile: omit X:framepointer in compile versionRuss Cox
Framepointer is the default now. Only print an X: list if the settings are _not_ the default. Before: $ go tool compile -V compile version devel +a5f30d9508 Sun Jul 16 14:43:48 2017 -0400 X:framepointer $ go1.8 tool compile -V compile version go1.8 X:framepointer $ After: $ go tool compile -V compile version devel +a5f30d9508 Sun Jul 16 14:43:48 2017 -0400 $ go1.9 tool compile -V # imagined compile version go1.9 $ Perpetuates #18317. Change-Id: I981ba5c62be32e650a166fc9740703122595639b Reviewed-on: https://go-review.googlesource.com/49252 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-07-17strconv: apply Brad's review commentRuss Cox
Missed in CL 49253 because I submitted from the Gerrit UI and had not mailed the latest copy. Sigh. Change-Id: I540f960278df43e2eaf1aac188eb124a1ff240dd Reviewed-on: https://go-review.googlesource.com/49256 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
2017-07-17strconv: fix initialization of atofRandomTestsRuss Cox
The init func was using testing.Short, but that's not available until after flag parsing. Found by CL 49251. Change-Id: Ia7b871043375260873fa2c7e81e1d43c1c83d33f Reviewed-on: https://go-review.googlesource.com/49253 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-07-17time: fix 400 years offset in commentAlberto Donizetti
Fixes #21043 Change-Id: I12db4f67ddee80500ff323f84e8fa34511650e63 Reviewed-on: https://go-review.googlesource.com/49230 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-07-17doc/go1.9: eliminate <code> spacesRuss Cox
Per note at top of doc, we don't use fixed-width spaces in fixed-width phrases like "go doc". Also ASN.1 NULL is not code so it's not <code> at all. Change-Id: I791e4e6030b8b8d42f4621d2f4bf32fef93cf343 Reviewed-on: https://go-review.googlesource.com/47693 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-07-17doc/go1.9: minor clarifications and grammar nitsRuss Cox
Change-Id: I55f50e45f8872f063c3b6c9e89261d14689e77ce Reviewed-on: https://go-review.googlesource.com/47692 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-07-16log: adds a Logger Output method Examplegmarik
Change-Id: Ia3e351169a4ebe6db5e5f37b668f23dc8c992c78 Reviewed-on: https://go-review.googlesource.com/48877 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-07-16bytes: add example for (*Buffer).GrowBrian Downs
Change-Id: I04849883dd2e1f6d083e9f57d2a8c1bd7d258953 Reviewed-on: https://go-review.googlesource.com/48878 Run-TryBot: Bryan Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com>
2017-07-16ast: make ExampleCommentMap a runnable examplecloss
Fixes #20450 Change-Id: I2256282a8880e99508e98fefedfb94a7cccacbcf Reviewed-on: https://go-review.googlesource.com/48969 Run-TryBot: Bryan Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com>
2017-07-15io/ioutil: add example for ReadFileVitor De Mario
Change-Id: I062ec0606a741c8aa1b74f3f4b4e4fd47f76fed5 Reviewed-on: https://go-review.googlesource.com/48775 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-07-15sort: add example for StringsTony Walker
Change-Id: I33f0e2362e85287b493d9279d43b760733e2abcb Reviewed-on: https://go-review.googlesource.com/48831 Run-TryBot: Bryan Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com>
2017-07-15math/bits: add examples for leading zero methodsDylan Waits
Change-Id: Ib491d144387a7675af370f7b925fe6e62440d153 Reviewed-on: https://go-review.googlesource.com/48966 Run-TryBot: Kevin Burke <kev@inburke.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Kevin Burke <kev@inburke.com>
2017-07-15os/exec: add example for Cmd.RunAndré Carvalho
Change-Id: Ic47198bc8bf5baabfcf4d0599825eab30d7b126c Reviewed-on: https://go-review.googlesource.com/48853 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-07-15encoding/json: fix indentation in Decode stream exampleIccha Sethi
The existing example for Decoder.Decode (Stream) had excessive indentation in the godoc interface for the const jsonStream, making it hard to read. This fixes the indentation in the example_test.go to improve the readability in godoc. Helps #21026. Change-Id: I16f56b82182da1dcc73cca44e535a7f5695e975d Reviewed-on: https://go-review.googlesource.com/48910 Reviewed-by: Dmitri Shuralyov <shurcool@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-07-15encoding/binary: add examples for ByteOrder functionsRoss Light
Change-Id: Iec9a7bf61566ee08c4d15adb39d43c7a29c79122 Reviewed-on: https://go-review.googlesource.com/48962 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>