- 21 Aug, 2018 28 commits
-
-
Brad Fitzpatrick authored
Don't open files or do sysctls in init. Updates #26775 Change-Id: I017bed6c24ef1e4bc30040120349fb779f203225 Reviewed-on: https://go-review.googlesource.com/127655Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Kevin Zita authored
Fixes #26654 Change-Id: I4832c45cad40607b83e1a8a9b562fa12e639b7d9 GitHub-Last-Rev: c9ceedb7d4b4c01f91ea4fe3dc3496e73eed9120 GitHub-Pull-Request: golang/go#26781 Reviewed-on: https://go-review.googlesource.com/127716Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Sandy authored
It's maybe better. Change-Id: I7929e93a95c96676915bc24f2f7cce4e73b08c59 GitHub-Last-Rev: a8c2bb6cafe78090f35c3b194e270e301255be89 GitHub-Pull-Request: golang/go#26685 Reviewed-on: https://go-review.googlesource.com/126623Reviewed-by: Ralph Corderoy <ralph@inputplus.co.uk> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Peter Collingbourne authored
It's possible for one of the ldflags to cause the compiler driver to use a different linker than the default, so we need to make sure that the flag is supported by whichever linker is specified. Fixes #27110. Change-Id: Ic0c51b886e34344d324e68cbf6673b168c14992f Reviewed-on: https://go-review.googlesource.com/130316 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Brad Fitzpatrick authored
Change-Id: Ie4ed8b3e7d26ae53b2290a7a6e7d9888eb963edc Reviewed-on: https://go-review.googlesource.com/130318Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Ian Lance Taylor authored
The code was fixed in CL 108559 but the testing TODO was not implemented. Updates #22936 Change-Id: I20a703260a181bbcf5f87609d6fb8221a182be1a Reviewed-on: https://go-review.googlesource.com/125038 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rob Pike <r@golang.org> Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
-
Ian Lance Taylor authored
Consolidate decision about whether -race and -msan options are supported in cmd/internal/sys. Use consolidated functions in cmd/compile and cmd/go. Use a copy of them in cmd/dist; cmd/dist can't import cmd/internal/sys because Go 1.4 doesn't have it. Fixes #24315 Change-Id: I9cecaed4895eb1a2a49379b4848db40de66d32a9 Reviewed-on: https://go-review.googlesource.com/121816 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Brad Fitzpatrick authored
Change-Id: I8361ae33c785e45e3ccc7e9bc2732c887eeb41c4 Reviewed-on: https://go-review.googlesource.com/127015 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matt Layher <mdlayher@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Iskander Sharipov authored
Makes code simpler and faster (at least on x86). name old time/op new time/op delta CountRegs-8 7.40ns ± 1% 0.59ns ± 0% -92.02% (p=0.000 n=9+9) PickReg/(1<<0)-8 2.07ns ± 0% 0.37ns ± 0% -82.13% (p=0.000 n=9+10) PickReg/(1<<16)-8 11.8ns ± 0% 0.4ns ± 0% -96.86% (p=0.002 n=8+10) Change-Id: Ic780b615b75c25b6e7632a0de93b16a8e9ed0f8f Reviewed-on: https://go-review.googlesource.com/120318 Run-TryBot: Iskander Sharipov <iskander.sharipov@intel.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Brad Fitzpatrick authored
Compile go/doc's 4 regexps lazily, on demand. Also, add a test for the one that had no test coverage. This reduces init-time CPU as well as heap by ~20KB when they're not used, which seems to be common enough. As an example, cmd/doc only seems to use 1 of them. (as noted by temporary print statements) Updates #26775 Change-Id: I85df89b836327a53fb8e1ace3f92480374270368 Reviewed-on: https://go-review.googlesource.com/127875 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Brad Fitzpatrick authored
Saves 22KB of memory in stdlib packages. Updates #26775 Change-Id: Ia19fe7aff61f6e2ddd83cd35969d7ff94526591f Reviewed-on: https://go-review.googlesource.com/127661 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Muhammad Falak R Wani authored
Remove the os.Exit(0) to honor the deferred closing of the file. Change-Id: Iaa9304d8203c8fec0ec728af669a94eadd36905c Reviewed-on: https://go-review.googlesource.com/118915Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
-
Russ Cox authored
This reverts commit 723479bc. Reason for revert: other tools should convert the graph output to graphviz. Change-Id: Ide5b8f0b061aaff74bb6ba4c2a8f8768d1fbc05a Reviewed-on: https://go-review.googlesource.com/130295Reviewed-by: Russ Cox <rsc@golang.org>
-
Russ Cox authored
Dropped the example referred to in the text when copying this text out of 'go help mod fix'. Fixes #27083. Change-Id: I63dfa3033fa2b2408019eef9d8b5a055aa803c57 Reviewed-on: https://go-review.googlesource.com/130140 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
Fixes #27097. Change-Id: I6aa48a1c58a21fd320b0e9dcd1f86c90172f0182 Reviewed-on: https://go-review.googlesource.com/130139 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
This fixes a failure when using Go 1.11 to build App Engine code. Change-Id: I008e8cf5ad4c568676d904deddff031a166f2d5d Reviewed-on: https://go-review.googlesource.com/130138 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
Clients of 'go mod download', particularly proxies, may need the hashes of the content they downloaded, for checking against go.sum entries or recording elsewhere. Change-Id: Ic36c882cefc540678e1bc5a3dae1e865d181aa69 Reviewed-on: https://go-review.googlesource.com/129802 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Andrew Bonventre <andybons@golang.org>
-
Tim Cooper authored
Updates #26775 Change-Id: I83c9eeda59769d2f35e0cc98f3a8579861d5978b Reviewed-on: https://go-review.googlesource.com/119715Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Tim Cooper authored
Change-Id: Iaa5ded13e8ab4753e2e3d04c9fff203d854208ba Reviewed-on: https://go-review.googlesource.com/119435Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
isharipo authored
Copying sym.Reloc in loops hurts performance as it has 48 byte size (on 64-bit platforms). There are quite many symbols and each of them has more than 1 relocation (so, it's possible to have more than 1kk relocs). The're also traversed more than once in some code paths. By using pointers to them, copies are avoided. For linking "hello world" example from net/http: name old time/op new time/op delta Linker-4 530ms ± 2% 521ms ± 3% -1.80% (p=0.000 n=17+20) Change-Id: I6518aec69d6adcd137f84b5c089ceab4cb4ea2dd Reviewed-on: https://go-review.googlesource.com/113636 Run-TryBot: Iskander Sharipov <iskander.sharipov@intel.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Philip Børgesen authored
The existing Decoder.tokenError implementation creates its error messages by concatenating "invalid character " + quoteChar(c) + " " + context. All context values however already start with a space leading to error messages containing two spaces. This change removes " " from the concatenation expression. Fixes #26587 Change-Id: I93d14319396636b2a40d55053bda88c98e94a81a GitHub-Last-Rev: 6db7e1991b15beee601f558be72a2737070d8f68 GitHub-Pull-Request: golang/go#26588 Reviewed-on: https://go-review.googlesource.com/125775Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Jan Lehnardt authored
Companion PR to https://github.com/golang/sys/pull/13 Change-Id: I097fc97912840eb69ca232eded6ba939de0fead9 GitHub-Last-Rev: f8a8f7d96c96e3cb03010cb3d9607741f4bbc3a1 GitHub-Pull-Request: golang/go#26675 Reviewed-on: https://go-review.googlesource.com/126621 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Tim Cooper authored
name old time/op new time/op delta Dump/256-4 7.76µs ± 2% 5.82µs ± 2% -24.91% (p=0.008 n=5+5) Dump/1024-4 28.4µs ± 2% 22.6µs ± 3% -20.58% (p=0.008 n=5+5) Dump/4096-4 112µs ± 2% 88µs ± 0% -20.80% (p=0.016 n=5+4) Dump/16384-4 444µs ± 3% 361µs ± 7% -18.73% (p=0.008 n=5+5) name old alloc/op new alloc/op delta Dump/256-4 4.00kB ± 0% 1.39kB ± 0% -65.20% (p=0.008 n=5+5) Dump/1024-4 16.2kB ± 0% 5.5kB ± 0% -66.04% (p=0.008 n=5+5) Dump/4096-4 63.9kB ± 0% 20.6kB ± 0% -67.78% (p=0.008 n=5+5) Dump/16384-4 265kB ± 0% 82kB ± 0% -69.00% (p=0.008 n=5+5) name old allocs/op new allocs/op delta Dump/256-4 7.00 ± 0% 3.00 ± 0% -57.14% (p=0.008 n=5+5) Dump/1024-4 9.00 ± 0% 3.00 ± 0% -66.67% (p=0.008 n=5+5) Dump/4096-4 11.0 ± 0% 3.0 ± 0% -72.73% (p=0.008 n=5+5) Dump/16384-4 13.0 ± 0% 3.0 ± 0% -76.92% (p=0.008 n=5+5) Change-Id: I0a0d6de315b979142b05e333880da8a5e52b12ef Reviewed-on: https://go-review.googlesource.com/116495 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Alan Braithwaite authored
Change-Id: I76d878343c1cc14b53c700b0476ca050c1f9e6be GitHub-Last-Rev: 148a45f4b63f7f55312112bbbd982f9927ac9e6e GitHub-Pull-Request: golang/go#27107 Reviewed-on: https://go-review.googlesource.com/130235Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Tim Cooper authored
Change-Id: I93bc5de6bcb23c2639d7c2f3f5252fb6f09ca6e4 Reviewed-on: https://go-review.googlesource.com/126797Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Iskander Sharipov authored
Simplify `(T)` expressions to `T` where possible. Found using https://go-critic.github.io/overview.html#typeUnparen-ref Change-Id: Ic5ef335e03898f9fea1ff90fd83956376657fe67 Reviewed-on: https://go-review.googlesource.com/123379 Run-TryBot: Iskander Sharipov <iskander.sharipov@intel.com> Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
-
Daniel Martí authored
It is possible to enter the parent-walking directory loop in a way that it will loop forever - if mdir is empty, and d reaches ".". To avoid this, make sure that the 'd = filepath.Dir(d)' step only happens if the parent directory is actually different than the current directory. This fixes some of the tests like TestImport/golang.org_x_net_context, which were never finishing before. While at it, also fix TestImport/golang.org_x_net, which seems to have the wrong expected error. The root of the x/net repo doesn't have a go.mod file, nor is part of a module itself, so it seems like the expected error should reflect that. After these two changes, 'go test cmd/go/internal/modload' passes on my linux/amd64 machine. Fixes #27080. Change-Id: Ie8bab0f9fbc9f447844cbbc64117420d9087db1b Reviewed-on: https://go-review.googlesource.com/129778 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Jeet Parekh authored
Fixes #26589 Change-Id: I180883a13cec229093654004b42c48d76ee20272 GitHub-Last-Rev: 2d9879de43fbcfb413116d69accdade6bc042c97 GitHub-Pull-Request: golang/go#26667 Reviewed-on: https://go-review.googlesource.com/126617Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 20 Aug, 2018 12 commits
-
-
Santhosh Kumar Tekuri authored
Change-Id: I4d6f7440747d4f935acddc9a5c5928ed911a2fb0 Reviewed-on: https://go-review.googlesource.com/120515Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Brad Fitzpatrick authored
Fixes #26563 Change-Id: I22b0c72d45fab9d3f31fda04da76a8c0b10cd8b6 Reviewed-on: https://go-review.googlesource.com/130115 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Andrew Bonventre <andybons@golang.org>
-
Kevin Burke authored
A common error is to update the help text for a command in cmd/go, but fail to update alldocs.go, which actually prints the help text for the most common commands. Add a test that the long-form documentation help text matches the contents of alldocs.go, which will fail the build if we fail to keep the documentation in sync. We can get fancier with the test output if this is not sufficient. Fixes golang/go#26735. Change-Id: I2509765315eeb0f362633d812343d1324a01b73b Reviewed-on: https://go-review.googlesource.com/127920 Run-TryBot: Kevin Burke <kev@inburke.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Xia Bin authored
s.Func.Text only can be nil at the moment, otherwise there has some bugs in compiler's Go rumtime. Change-Id: Ib2ff9bb977352838e67f2b98a69468f6f350c1f3 Reviewed-on: https://go-review.googlesource.com/123535Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Iskander Sharipov authored
Performed `switch true {}` => `switch {}` replacement. Found using https://go-critic.github.io/overview.html#switchTrue-ref Change-Id: Ib39ea98531651966a5a56b7bd729b46e4eeb7f7c Reviewed-on: https://go-review.googlesource.com/123378 Run-TryBot: Iskander Sharipov <iskander.sharipov@intel.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
isharipo authored
Archreloc had this signature: func(*Link, *sym.Reloc, *sym.Symbol, *int64) bool The last *int64 argument is used as out parameter. Passed valus could be allocated on stack, but escape analysis fails here, leading to high number of unwanted allocs. If instead 4th arg is passed by value, and modified values is returned, no problems with allocations arise: func(*Link, *sym.Reloc, *sym.Symbol, int64) (int64, bool) There are 2 benefits: 1. code becomes more readable. 2. less allocations. For linking "hello world" example from net/http: name old time/op new time/op delta Linker-4 530ms ± 2% 520ms ± 2% -1.83% (p=0.001 n=17+16) It's top 1 in alloc_objects from memprofile: flat flat% sum% cum cum% 229379 33.05% 33.05% 229379 33.05% cmd/link/internal/ld.relocsym ... list relocsym: 229379 229379 (flat, cum) 33.05% of Total 229379 229379 183: var o int64 After the patch, ~230k of int64 allocs (~ 1.75mb) removed. Passes toolshash-check (toolstash cmp). Change-Id: I25504fe27967bcff70c4b7338790f3921d15473d Reviewed-on: https://go-review.googlesource.com/113637 Run-TryBot: Iskander Sharipov <iskander.sharipov@intel.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Ilya Tocar authored
When compiling with -race, we insert calls to racefuncentry, into every function. Add a rule that removes them in leaf functions, without instrumented loads/stores. Shaves ~30kb from "-race" version of go tool: file difference: go_old 15626192 go_new 15597520 [-28672 bytes] section differences: global text (code) = -24513 bytes (-0.358598%) read-only data = -5849 bytes (-0.167064%) Total difference -30362 bytes (-0.097928%) Fixes #24662 Change-Id: Ia63bf1827f4cf2c25e3e28dcd097c150994ade0a Reviewed-on: https://go-review.googlesource.com/121235 Run-TryBot: Ilya Tocar <ilya.tocar@intel.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
David Symonds authored
Splitting the string is unnecessary. Change-Id: I02796cb91602c1b9bf22721b985cd41b18cc92f2 Reviewed-on: https://go-review.googlesource.com/119936 Run-TryBot: David Symonds <dsymonds@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rob Pike <r@golang.org>
-
nogoegst authored
All the readers are denoted as `b` while for `Reader.Size()` it is `r`. Change-Id: Ib6f97306c11b3abb2ff30edbc9f9362cad36d080 GitHub-Last-Rev: 992f88b374b5a309303b7fa1622ee629d0fb741b GitHub-Pull-Request: golang/go#26205 Reviewed-on: https://go-review.googlesource.com/122156Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Ian Lance Taylor authored
Change-Id: I2fa547d1074ef0931196066678fadd7250a1148d Reviewed-on: https://go-review.googlesource.com/121936 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Shivansh Rai authored
Change-Id: I868dcaf84767d631bc8f1b6ef6bcb3ec18047259 Reviewed-on: https://go-review.googlesource.com/116135Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Ilya Tocar authored
We generate MOVBLZX for byte-sized LoadReg, so (MOVBQZX (LoadReg (Arg))) is the same as (LoadReg (Arg)). Remove those zero extension where possible. Triggers several times during all.bash. Fixes #25378 Updates #15300 Change-Id: If50656e66f217832a13ee8f49c47997f4fcc093a Reviewed-on: https://go-review.googlesource.com/115617 Run-TryBot: Ilya Tocar <ilya.tocar@intel.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-