- 21 Mar, 2016 25 commits
-
-
Robert Griesemer authored
Constant comparisons against 0 are reasonably common. Special-case and avoid allocating a new zero value each time. Change-Id: I6c526c8ab30ef7f0fef59110133c764b7b90ba05 Reviewed-on: https://go-review.googlesource.com/20956Reviewed-by: Alan Donovan <adonovan@google.com>
-
Matthew Dempsky authored
Also give them more idiomatic Go names. Adding godocs is outside the scope of this CL. (Besides, the method names almost all directly parallel an underlying math/big.Int or math/big.Float method.) CL prepared mechanically with sed (for rewriting mpint.go/mpfloat.go) and gofmt (for rewriting call sites). Passes toolstash -cmp. Change-Id: Id76f4aee476ba740f48db33162463e7978c2083d Reviewed-on: https://go-review.googlesource.com/20909 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
-
Marcel van Lohuizen authored
Fixed bug that slipped probably slipped in after rebasing and explain why it failed on nacl/netbsd/plan9, which set default maxparallelism to 1. Change-Id: I4d59682fb2843d138b320334189f53fcdda5b2f6 Reviewed-on: https://go-review.googlesource.com/20980 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
-
Robert Griesemer authored
Fixes #14890. Change-Id: Ie790276b0e2ef94c92db3a777042d750269f876a Reviewed-on: https://go-review.googlesource.com/20953Reviewed-by: Alan Donovan <adonovan@google.com>
-
Michael Munday authored
The Linux ABI takes arguments in a different order on s390x. Change-Id: Ic9cfcc22a5ea3d8ef77d4dd0b915fc266ff3e5f7 Reviewed-on: https://go-review.googlesource.com/20960Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
-
Michael Munday authored
Minimum architecture of z196 required so that GCC can assemble gcc_s390x.S in runtime/cgo. Change-Id: I603ed2edd39f826fb8193740ece5bd11d18c3dc5 Reviewed-on: https://go-review.googlesource.com/20876Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Brad Fitzpatrick authored
Updates #10848 Change-Id: I8353100ed01cb0e8fc19225157f5709bae388612 Reviewed-on: https://go-review.googlesource.com/20975Reviewed-by: Rob Pike <r@golang.org>
-
Michael Munday authored
Fixes this test on s390x. Change-Id: Ie5b70e8191169867765ec9248d827ca12c6405f4 Reviewed-on: https://go-review.googlesource.com/20964Reviewed-by: Minux Ma <minux@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Michael Munday authored
Change-Id: I928532b406a3457d2c5f75f4de7d46a3f795192e Reviewed-on: https://go-review.googlesource.com/20939Reviewed-by: Minux Ma <minux@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
-
Michael Hudson-Doyle authored
It was just a funny way of saying len(Ctxt.Allsym) by now. Change-Id: Iff75e73c9f7ec4ba26cfef479bbd05d7dcd172f5 Reviewed-on: https://go-review.googlesource.com/20973 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
Nothing cares about it. I did this after looking at the memprof output, but it helps performance a bit: name old s/op new s/op delta LinkCmdGo 0.44 ± 3% 0.43 ± 3% -2.20% (p=0.000 n=94+90) LinkJuju 3.98 ± 5% 3.94 ± 5% -1.19% (p=0.000 n=100+91) As well as MaxRSS (i.e. what /usr/bin/time -f '%M' prints): name old MaxRSS new MaxRSS delta LinkCmdGo 130k ± 0% 120k ± 3% -7.79% (p=0.000 n=79+90) LinkJuju 862k ± 6% 827k ± 8% -4.01% (p=0.000 n=100+99) Change-Id: I6306b7b3369576a688659e2ecdb0815b4152ae96 Reviewed-on: https://go-review.googlesource.com/20972 Run-TryBot: Michael Hudson-Doyle <michael.hudson@canonical.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Brad Fitzpatrick authored
Change-Id: I0ea74dc1b11fad8ded9e649a3c1e4213ea6639b8 Reviewed-on: https://go-review.googlesource.com/20974 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
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 2 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>
-