- 21 Mar, 2016 13 commits
-
-
Michael Munday authored
Change-Id: Iedd01ef3a9d2831cb55c53b7a1984e7e932f4249 Reviewed-on: https://go-review.googlesource.com/20932Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Brad Fitzpatrick authored
Introduce garbage-free LookupN to replace most users of Lookupf. Also, remove the string interning from LookupBytes which was hurting more than helping. name old alloc/op new alloc/op delta Template 63.0MB ± 0% 62.7MB ± 0% -0.48% (p=0.000 n=10+9) Unicode 43.0MB ± 0% 43.0MB ± 0% -0.17% (p=0.000 n=10+7) GoTypes 219MB ± 0% 218MB ± 0% -0.14% (p=0.000 n=10+10) Compiler 992MB ± 0% 991MB ± 0% -0.12% (p=0.000 n=10+10) name old allocs/op new allocs/op delta Template 683k ± 0% 681k ± 0% -0.38% (p=0.000 n=10+8) Unicode 541k ± 0% 541k ± 0% -0.11% (p=0.000 n=10+10) GoTypes 2.09M ± 0% 2.08M ± 0% -0.40% (p=0.000 n=10+10) Compiler 9.28M ± 0% 9.24M ± 0% -0.36% (p=0.000 n=10+10) Size of $GOROOT/pkg/darwin_amd64 drops from 40124 KB to 40100 KB too, removing the zero padding as suggested by josharian. Updates #6853 Change-Id: I3c557266e9325fe29c459cef8e5b8954913e7abb Reviewed-on: https://go-review.googlesource.com/20931Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Michael Munday authored
Allows the compiler to recognise s390x specific files and s390x build tags. Change-Id: I7c62ab7361cf708181b1d9cfbe9b1fcb01be31e0 Reviewed-on: https://go-review.googlesource.com/20872Reviewed-by: Minux Ma <minux@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Dominik Honnef authored
This deletes unused code and helpers from tests. Change-Id: Ie31d46115f558ceb8da6efbf90c3c204e03b0d7e Reviewed-on: https://go-review.googlesource.com/20927Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Michael Munday authored
An instruction consisting of all 0s causes an illegal instruction signal on s390x. Since 0s are the default in this test this CL just makes it explicit. Change-Id: Id6e060eed1a588f4b10a4e4861709fcd19b434ac Reviewed-on: https://go-review.googlesource.com/20962Reviewed-by: Minux Ma <minux@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Michael Munday authored
Change-Id: I39aa6569c9a6f327f7aaa01f8b4ace814fd5b766 Reviewed-on: https://go-review.googlesource.com/20943Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Michael Hudson-Doyle authored
Debugasm can never be set in cmd/link, so delete it and the code it enables. Change-Id: If828db0b09f1a9e512dc660ac2750657a769094c Reviewed-on: https://go-review.googlesource.com/20971 Run-TryBot: Michael Hudson-Doyle <michael.hudson@canonical.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Michael Hudson-Doyle authored
This expression in readsym: dup != nil && len(dup.P) > 0 && strings.HasPrefix(s.Name, "gclocals·") can never be true: if dup != nil, then s.Name is ".dup" (and this is not new: the same broken logic is present in 1.4, at least). Delete the whole block. Change-Id: I33b14d9a82b292116d6fd79d22b38e3842501317 Reviewed-on: https://go-review.googlesource.com/20970 Run-TryBot: Michael Hudson-Doyle <michael.hudson@canonical.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Dave Cheney authored
The obj.Nocache helper was only used by the arm back end, move it there. Change-Id: I5c9faf995499991ead1f3d8c8ffc3b6af7346876 Reviewed-on: https://go-review.googlesource.com/20868Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Josh Bleecher Snyder authored
Add a special helper for its one external use. This is in preparation for an upcoming CL. Passes toolstash -cmp / buildall. Change-Id: I9d3463792afe220cc4bc89269bdecf0279abd281 Reviewed-on: https://go-review.googlesource.com/20933 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Dave Cheney authored
This CL addresses a long standing CL by rsc by pushing the use of Link.Windows down to its two users. Link.Window was always initalised with the value of runtime.GOOS so this does not affect cross compilation. Change-Id: Ibbae068f8b5aad06336909691f094384caf12352 Reviewed-on: https://go-review.googlesource.com/20869 Run-TryBot: Dave Cheney <dave@cheney.net> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Matthew Dempsky authored
'b' is a standard verb for floating point values. The runes like '+' and '#' are called "flags" by package fmt's documentation. The flag '-' controls left/right justification, not anything related to signs. Change-Id: Ia9cf81b002df373f274ce635fe09b5bd0066aa1c Reviewed-on: https://go-review.googlesource.com/20930Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Michael Hudson-Doyle authored
Another object file change, gives a reasonable improvement: name old s/op new s/op delta LinkCmdGo 0.46 ± 3% 0.44 ± 9% -3.34% (p=0.000 n=98+82) LinkJuju 4.09 ± 4% 3.92 ± 5% -4.30% (p=0.000 n=98+99) I guess the data section could be mmap-ed instead of read, I haven't tried that. Change-Id: I959eee470a05526ab1579e3f5d3ede41c16c954f Reviewed-on: https://go-review.googlesource.com/20928 Run-TryBot: Michael Hudson-Doyle <michael.hudson@canonical.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
- 20 Mar, 2016 13 commits
-
-
Richard Miller authored
In tests TransportPersistConnLeak and TransportPersistConnLeakShortBody, there's a fixed wait time (100ms and 400ms respectively) to allow goroutines to exit after CloseIdleConnections is called. This is sometimes too short on a slow host running many simultaneous tests. This CL replaces the fixed sleep in each test with a sequence of shorter sleeps, testing the number of remaining goroutines until it reaches the threshold or an overall time limit of 500ms expires. This prevents some failures in the plan9_arm builder, while reducing the test time on faster machines. Fixes #14887 Change-Id: Ia5c871062df139e2667cdfb2ce8283e135435318 Reviewed-on: https://go-review.googlesource.com/20922 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Alexandru Moșoi authored
Fixes #14849 Change-Id: I86e2dc27ca73bb6b24261a68cbf0094a63167414 Reviewed-on: https://go-review.googlesource.com/20833Reviewed-by: Keith Randall <khr@golang.org> Run-TryBot: Alexandru Moșoi <alexandru@mosoi.ro> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Ian Lance Taylor authored
For a long time varexpr has handled ODOT incorrectly: it has always returned false. Before https://golang.org/cl/20890 this has been because an ODOT had a Right field with an ONAME with no Class, for which varexpr returns false. CL 20890 preserved the behavior of varexpr for ODOT, so that the change would pass toolstash -cmp. This CL fixes varexpr so that ODOT can return true in some cases. This breaks toolstash -cmp. While the changed compiler allocates temporary variables in a different order, I have not been able to find any examples where the generated code is different, other than using different stack offsets and, in some cases, registers. It seems that other parts of the compiler will force the ODOT into a temporary anyhow. Still, this change is clearly correct, and is a minor compiler cleanup. Change-Id: I71506877aa3c13966bb03c281aa16271ee7fe80a Reviewed-on: https://go-review.googlesource.com/20907 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Shahar Kohanim authored
name old s/op new s/op delta LinkCmdGo 0.57 ± 5% 0.55 ± 6% -2.37% (p=0.000 n=97+98) GOGC=off: name old s/op new s/op delta LinkCmdGo 0.48 ± 3% 0.47 ± 3% -2.90% (p=0.000 n=100+100) Change-Id: I1a36dbf84914cacb79842bc0ddb1e26b4c5a5828 Reviewed-on: https://go-review.googlesource.com/20917Reviewed-by: David Crawshaw <crawshaw@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Ian Lance Taylor authored
Historically ODOT and friends have been considered to cost an extra budget point when deciding whether they should be inlined, because they had an ONAME node that represented the name to the right of the dot. This doesn't really make sense, as in general that symbol does not add any extra instructions; it just affects the offset of the load or store instruction. And the ONAME node is gone now. So, remove the extra cost. This does not pass toolstash -cmp, as it changes inlining decisions. For example, mspan.init in runtime/mheap.go is now considered to be an inlining candidate. Change-Id: I5ad27f08c66fd5daa4c8472dd0795df989183f5e Reviewed-on: https://go-review.googlesource.com/20891Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Shahar Kohanim authored
name old s/op new s/op delta LinkCmdGo 0.59 ± 6% 0.58 ± 5% -1.61% (p=0.000 n=99+99) GOGC=off: name old s/op new s/op delta LinkCmdGo 0.50 ± 3% 0.49 ± 3% -1.28% (p=0.000 n=98+99) Change-Id: I737ae056214999441a210c69ec0cf4febc39a715 Reviewed-on: https://go-review.googlesource.com/20914Reviewed-by: David Crawshaw <crawshaw@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Shahar Kohanim authored
Reduces size of archives in pkg/linux_amd64 by 3% from 41.5MB to 40.2MB Change-Id: Id64ca7995de8dd84c9e7ce1985730927cf4bfd66 Reviewed-on: https://go-review.googlesource.com/20912Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Shahar Kohanim authored
Speeds up linking cmd/go by ~1.5%: name old s/op new s/op delta LinkCmdGo 0.58 ± 6% 0.57 ± 5% -1.21% (p=0.000 n=98+99) Less noisy benchmark, with garbage collection off: name old s/op new s/op delta LinkCmdGo 0.49 ± 2% 0.49 ± 2% -1.79% (p=0.000 n=98+99) Change-Id: I0123bcb66a87cbc4d703356e4c5a4035032012ec Reviewed-on: https://go-review.googlesource.com/20916Reviewed-by: David Crawshaw <crawshaw@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Martin Möhrmann authored
Deduplicate the verb switch for signed and unsigned integer formatting. Make names of integer related functions consistent with names of other fmt functions. Consolidate basic integer tests. Change-Id: I0c19c24f1c2c06a3b1a4d7d377dcdac3b36bb0f5 Reviewed-on: https://go-review.googlesource.com/20831 Run-TryBot: Rob Pike <r@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rob Pike <r@golang.org>
-
Matthew Dempsky authored
In golang.org/cl/20602, I changed the semantics of Eqtype to stop checking the receiver parameters for type equality, and pushed this responsibility to addmethod (the only Eqtype caller that cared). However, I accidentally made the check stricter by making it start requiring that receiver names were identical. In general, this is a non-problem because the receiver names in export data will always match the original source. But running GO_GCFLAGS=-newexport ./all.bash at one point tries to load both old and new format export data for package sync, which reveals the problem. (See golang.org/issue/14877 for details.) Easy fix: just check the receiver type for type equality in addmethod, instead of the entire receiver parameter list. Fixes #14877. Change-Id: If10b79f66ba58a1b7774622b4fbad1916aba32f1 Reviewed-on: https://go-review.googlesource.com/20906 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Josh Bleecher Snyder authored
Convert remaining uses to typecheckslice. Passes toolstash -cmp. Change-Id: I6ed0877386fb6c0b036e8ee5a228433343855abd Reviewed-on: https://go-review.googlesource.com/20905 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Dave Cheney <dave@cheney.net> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Josh Bleecher Snyder authored
There are plenty more, but these cover most of the trivial cases, and all the cases that showed up in profiling. name old time/op new time/op delta Template 331ms ± 3% 327ms ± 6% ~ (p=0.143 n=10+10) Unicode 183ms ± 4% 180ms ± 2% ~ (p=0.114 n=9+8) GoTypes 1.12s ± 4% 1.07s ± 1% -4.34% (p=0.000 n=10+9) Compiler 5.16s ± 2% 5.04s ± 2% -2.24% (p=0.001 n=10+9) MakeBash 41.7s ± 2% 42.3s ± 1% +1.51% (p=0.000 n=10+10) name old alloc/op new alloc/op delta Template 63.4MB ± 0% 63.1MB ± 0% -0.42% (p=0.000 n=10+10) Unicode 43.2MB ± 0% 43.1MB ± 0% -0.22% (p=0.000 n=9+10) GoTypes 220MB ± 0% 219MB ± 0% -0.57% (p=0.000 n=8+10) Compiler 978MB ± 0% 975MB ± 0% -0.30% (p=0.000 n=10+10) name old allocs/op new allocs/op delta Template 702k ± 0% 686k ± 0% -2.35% (p=0.000 n=10+10) Unicode 548k ± 0% 542k ± 0% -1.09% (p=0.000 n=10+10) GoTypes 2.17M ± 0% 2.09M ± 0% -3.61% (p=0.000 n=10+10) Compiler 9.33M ± 0% 9.15M ± 0% -1.93% (p=0.000 n=10+10) Change-Id: I3a3d7f2d56876427b04cfedc7302d7f496d5bb65 Reviewed-on: https://go-review.googlesource.com/20904 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Dave Cheney <dave@cheney.net> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Keith Randall authored
Most 64-bit x86 ops can only take a signed 32-bit constant. Clean up our rewrite rules to enforce this restriction. Modify the assembler to fail if the offset does not fit in the instruction. That last check triggers a few times on weird testing code. Suppress those errors if the compiler itself generated errors. Fixes #14862 Change-Id: I76559af035b38483b1e59621a8029fc66b3a5d1e Reviewed-on: https://go-review.googlesource.com/20815Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
-
- 19 Mar, 2016 3 commits
-
-
Martin Möhrmann authored
Changes the integer function to restore the original f.zero value and therefore padding type before returning. Change-Id: I456449259a3d39bd6d62e110553120c31ec63f23 Reviewed-on: https://go-review.googlesource.com/20512Reviewed-by: Rob Pike <r@golang.org> Run-TryBot: Rob Pike <r@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Martin Möhrmann authored
handleMethods can format Error() and String() directly as its known these return strings that can be directly printed using fmtString. Remove the obsolete depth argument from handleMethods. Remove the depth argument from printArg since it is only ever called with depth set to 0. Recursion for formatting complex arguments is handled only by printValue which keeps track of depth. Change-Id: I4c4be588751de12ed999e7561a51bc168eb9eb2d Reviewed-on: https://go-review.googlesource.com/20911 Run-TryBot: Rob Pike <r@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rob Pike <r@golang.org>
-
Ian Lance Taylor authored
The Node type ODOT and its variants all represent a selector, with a simple name to the right of the dot. Before this change this was represented by using an ONAME Node in the Right field. This ONAME node served no useful purpose. This CL changes these Node types to store the symbol in the Sym field instead, thus not requiring allocating a Node for each selector. When compiling x/tools/go/types this CL eliminates nearly 5000 calls to newname and reduces the total number of Nodes allocated by about 6.6%. It seems to cut compilation time by 1 to 2 percent. Getting this right was somewhat subtle, and I added two dubious changes to produce the exact same output as before. One is to ishairy in inl.go: the ONAME node increased the cost of ODOT and friends by 1, and I retained that, although really ODOT is not more expensive than any other node. The other is to varexpr in walk.go: because the ONAME in the Right field of an ODOT has no class, varexpr would always return false for an ODOT, although in fact for some ODOT's it seemingly ought to return true; I added an && false for now. I will send separate CLs, that will break toolstash -cmp, to clean these up. This CL passes toolstash -cmp. Change-Id: I4af8a10cc59078c436130ce472f25abc3a9b2f80 Reviewed-on: https://go-review.googlesource.com/20890 TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 18 Mar, 2016 11 commits
-
-
Todd Neal authored
Consider functions with an ODCLCONST for inlining and modify exprfmt to ignore those nodes when exporting. Don't add symbols to the export list if there is no definition. This occurs when OLITERAL symbols are looked up via Pkglookup for non-exported symbols. Fixes #7655 Change-Id: I1de827850f4c69e58107447314fe7433e378e069 Reviewed-on: https://go-review.googlesource.com/20773 Run-TryBot: Todd Neal <todd@tneal.org> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
-
Keith Randall authored
Change-Id: I5a43c354f36184ae64a52268023c3222da3026d8 Reviewed-on: https://go-review.googlesource.com/20880 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Todd Neal <todd@tneal.org>
-
Keith Randall authored
Missed this in review of 20812 Change-Id: I01e220499dcd58e1a7205e2a577dd9630a8b7174 Reviewed-on: https://go-review.googlesource.com/20819Reviewed-by: Keith Randall <khr@golang.org>
-
Martin Möhrmann authored
Remove rewriting of flags before calling formatters. Change Flag method to directly take plusV and sharpV flags into account when reporting if plus or sharp flag is set. Change-Id: Ic3423881ad89e5a5f9fff5ab59e842062394ef6d Reviewed-on: https://go-review.googlesource.com/20859 Run-TryBot: Rob Pike <r@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rob Pike <r@golang.org>
-
Keith Randall authored
benchmark old ns/op new ns/op delta BenchmarkAlignedLoad-160 8.67 7.42 -14.42% BenchmarkUnalignedLoad-160 8.63 7.37 -14.60% Change-Id: Id4609d7b4038c4d2ec332efc4fe6f1adfb61b82b Reviewed-on: https://go-review.googlesource.com/20812Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
David Chase authored
This ought to revert the bad effects of https://go-review.googlesource.com/#/c/20775/ If you don't pass BOOT_GO_GCFLAGS, you get the old behavior. Tweaked to allow multiple space-separated flags in BOOT_GO_GCFLAGS. Change-Id: I2a22a04211b4535d1c5a8ec7a8a78cb051161c31 Reviewed-on: https://go-review.googlesource.com/20871 Run-TryBot: David Chase <drchase@google.com> Reviewed-by: Russ Cox <rsc@golang.org>
-
Martin Möhrmann authored
Change-Id: I0ec775c51f461c6f0cbff88e796a7af55b736fcb Reviewed-on: https://go-review.googlesource.com/20838Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Marcel van Lohuizen authored
Change-Id: I6eb91ea73ef887b025e5a8de1dd55f30618e1aa6 Reviewed-on: https://go-review.googlesource.com/20857Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Alan Donovan authored
(Corresponding x/tools/go/gcimporter change is https://go-review.googlesource.com/#/c/20827/) Change-Id: I64e7fee2e273d387f1c51b87986294489978d250 Reviewed-on: https://go-review.googlesource.com/20828Reviewed-by: Robert Griesemer <gri@golang.org>
-
Marcel van Lohuizen authored
plan9, nacl, and netbsd to be precise. Only the first test causes a hang, but just to be sure. Change-Id: I400bb356ee2a0cf12c8666c95af79c924d1629aa Reviewed-on: https://go-review.googlesource.com/20839 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
-
Marcel van Lohuizen authored
Change-Id: If45410a2d7e48d1c9e6800cd98f81dd89024832c Reviewed-on: https://go-review.googlesource.com/20852Reviewed-by: Russ Cox <rsc@golang.org>
-