- 26 Apr, 2016 7 commits
-
-
Russ Cox authored
The comment says 'DΟ NΟT SUBMIT', and that text being in a file can cause automated errors or warnings when trying to check the Go sources into other source control systems. (We reject that string in CL commit messages, which I've avoided here by changing the O's to Ο's above.) Change-Id: I6cdd57a8612ded5208f05a8bd6b137f44424a030 Reviewed-on: https://go-review.googlesource.com/22434 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
-
Keith Randall authored
Make sure ops have the right number of args, set aux and auxint only if allowed, etc. Normalize error reporting format. Change-Id: Ie545fcc5990c8c7d62d40d9a0a55885f941eb645 Reviewed-on: https://go-review.googlesource.com/22320Reviewed-by: David Chase <drchase@google.com>
-
Michael Munday authored
Renames block to blockGeneric so that it can be called when the assembly feature check fails. This means making block a var on platforms without an assembly implementation (similar to the sha1 package). Also adds a test to check that the fallback path works correctly when the feature check fails. name old speed new speed delta Hash8Bytes 7.13MB/s ± 2% 19.89MB/s ± 1% +178.82% (p=0.000 n=9+10) Hash1K 121MB/s ± 1% 661MB/s ± 1% +444.54% (p=0.000 n=10+9) Hash8K 137MB/s ± 0% 918MB/s ± 1% +569.29% (p=0.000 n=10+10) Change-Id: Id65dd6e943f14eeffe39a904dc88065fc6a60179 Reviewed-on: https://go-review.googlesource.com/22402Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Michael Munday <munday@ca.ibm.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Matthew Dempsky authored
Fixes #15434. Change-Id: Ia88b740df5418a6d3af1c29a03756f4234f388b0 Reviewed-on: https://go-review.googlesource.com/22428Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
David Crawshaw authored
The linker was incorrectly decoding type name lengths, causing typelinks to be sorted out of order and in cases where the name was the exact right length, linker panics. Added a test to the reflect package that causes TestTypelinksSorted to fail before this CL. It's not the exact failure seen in #15448 but it has the same cause: decodetype_name calculating the wrong length. The equivalent decoders in reflect/type.go and runtime/type.go have the parenthesis in the right place. Fixes #15448 Change-Id: I33257633d812b7d2091393cb9d6cc8a73e0138c8 Reviewed-on: https://go-review.googlesource.com/22403Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
David Chase authored
Here, "fix" means "replace". The new dominator computation is the "simple" algorithm from Lengauer and Tarjan's TOPLAS paper, with minimal changes. Also included is a test that tweaks the fixed error. Change-Id: I0abdf53d5d64df1e67e4e62f55e88957045cd63b Reviewed-on: https://go-review.googlesource.com/22401 Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Ilya Tocar authored
Use PCMPESTRI instruction if available. Index-4 21.1ns ± 0% 21.1ns ± 0% ~ (all samples are equal) IndexHard1-4 395µs ± 0% 105µs ± 0% -73.53% (p=0.000 n=19+20) IndexHard2-4 300µs ± 0% 147µs ± 0% -51.11% (p=0.000 n=19+20) IndexHard3-4 665µs ± 0% 665µs ± 0% ~ (p=0.942 n=16+19) Change-Id: I4f66794164740a2b939eb1c78934e2390b489064 Reviewed-on: https://go-review.googlesource.com/22337 Run-TryBot: Ilya Tocar <ilya.tocar@intel.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
-
- 25 Apr, 2016 13 commits
-
-
Robert Griesemer authored
This is not necessary for reproduceability but it removes differences due to imported package order between compiles using textual vs binary export format. The packages list tends to be very short, so it's ok doing it always for now. Guarded with a documented (const) flag so it's trivial to disable and remove eventually. Also, use the same flag now to enforce parameter numbering. Change-Id: Ie05d2490df770239696ecbecc07532ed62ccd5c0 Reviewed-on: https://go-review.googlesource.com/22445 Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Keith Randall authored
The code sequence for large-offset floating-point stores includes adding the base pointer to r11. Make sure we can interpret that instruction correctly. Fixes build. Fixes #15440 Change-Id: I7fe5a4a57e08682967052bf77c54e0ec47fcb53e Reviewed-on: https://go-review.googlesource.com/22440Reviewed-by: Michael Hudson-Doyle <michael.hudson@canonical.com>
-
Robert Griesemer authored
The numbering is only required for parameters of functions/methods with exported inlineable bodies. For now, always export parameter names with internal numbering to minimize the diffs between assembly code dumps of code compiled with the textual vs the binary format. To be disabled again once the new export format is default. Change-Id: I6d14c564e734cc5596c7e995d8851e06d5a35013 Reviewed-on: https://go-review.googlesource.com/22441Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Matthew Dempsky authored
Fixes #15439. Change-Id: I5a32384c46e20f8db6968e5a9e854c45ab262fe4 Reviewed-on: https://go-review.googlesource.com/22429Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Keith Randall authored
Zero the entire buffer so we don't need to lower its capacity upon return. This lets callers do some appending without allocation. Zeroing is cheap, the byte buffer requires only 4 extra instructions. Fixes #14235 Change-Id: I970d7badcef047dafac75ac17130030181f18fe2 Reviewed-on: https://go-review.googlesource.com/22424 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Alexandru Moșoi authored
Introduce OrB, EqB, NeqB, AndB to handle bool operations. Change-Id: I53e4d5125a8090d5eeb4576db619103f19fff58d Reviewed-on: https://go-review.googlesource.com/22412Reviewed-by: Keith Randall <khr@golang.org>
-
Robert Griesemer authored
Note that the spec already makes that point with a comment in the very first example for struct field tags. This change is simply stating this explicitly in the actual spec prose. - gccgo and go/types already follow this rule - the current reflect package API doesn't distinguish between absent tags and empty tags (i.e., there is no discoverable difference) Fixes #15412. Change-Id: I92f9c283064137b4c8651630cee0343720717a02 Reviewed-on: https://go-review.googlesource.com/22391Reviewed-by: Russ Cox <rsc@golang.org> Reviewed-by: Rob Pike <r@golang.org>
-
Josh Bleecher Snyder authored
The underlying issues have been fixed. All the individual fixes have their own tests, but it's still useful to have a plain source test. Fixes #15084 Change-Id: I06c485a7d0716201bd57d1f3be53668dddd7ec14 Reviewed-on: https://go-review.googlesource.com/22426 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
-
Josh Bleecher Snyder authored
As a nice side-effect, this allows us to unify several code paths. The terminology (low, high, max, simple slice expr, full slice expr) is taken from the spec and the examples in the spec. This is a trial run. The plan, probably for Go 1.8, is to change slice expressions to use Node.List instead of OKEY, and to do some similar tree structure changes for other ops. Passes toolstash -cmp. No performance change. all.bash passes with GO_GCFLAGS=-newexport. Updates #15350 Change-Id: Ic1efdc36e79cdb95ae1636e9817a3ac8f83ab1ac Reviewed-on: https://go-review.googlesource.com/22425Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Russ Cox authored
Update #15410 Change-Id: Iad3f2639aa7a67b11efc35a629e1893f7d87b957 Reviewed-on: https://go-review.googlesource.com/22430 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Alex Brainman authored
Updates #15345 Change-Id: Iae35d3e378cbc8157ba1ff91e4971ed4515a5e5c Reviewed-on: https://go-review.googlesource.com/22394Reviewed-by: David Crawshaw <crawshaw@golang.org> Run-TryBot: Alex Brainman <alex.brainman@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Josh Bleecher Snyder authored
* Make budget an int32 to avoid needless conversions. * Introduce some temporary variables to reduce repetition. * If ... args are present, they will be the last argument to the function. No need to scan all arguments. Passes toolstash -cmp. Change-Id: I55203609f5d2f25a4e238cd48c63214651120cfc Reviewed-on: https://go-review.googlesource.com/22421 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Josh Bleecher Snyder authored
Generated with eg: func before(n gc.Nodes) int { return len(n.Slice()) } func after(n gc.Nodes) int { return n.Len() } Change-Id: Ifdf01915e60069166afe96aa7b1d08720bf62fc5 Reviewed-on: https://go-review.googlesource.com/22420 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 24 Apr, 2016 9 commits
-
-
Josh Bleecher Snyder authored
This is a follow-up to CLs 19769 and 19770. Change-Id: Ia9b71055613b80df4ce62b34fcc4f479f04f72fd Reviewed-on: https://go-review.googlesource.com/22399 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Josh Bleecher Snyder authored
Passes toolstash -cmp. Change-Id: I42c962cc5a3ffec2969f223cf238c2fdadbf5857 Reviewed-on: https://go-review.googlesource.com/22381 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Josh Bleecher Snyder authored
Passes toolstash -cmp. Change-Id: I915e76374fd64aa2597e6fa47e4fa95ca00ca643 Reviewed-on: https://go-review.googlesource.com/22380 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Josh Bleecher Snyder authored
Note that this is only safe because the compiler generates multiple distinct gc.Types. If we switch to having canonical gc.Types, then this will need to be updated to handle the case in which the user uses both map[T]S and also map[[8]T]S. In that case, the runtime needs algs for [8]T, but this could mark the sole [8]T type as Noalg. This is a general problem with having a single bool to represent whether alg generation is needed for a type. Cuts 5k off cmd/go and 22k off golang.org/x/tools/cmd/godoc, approx 0.04% and 0.12% respectively. For #6853 and #9930 Change-Id: I30a15ec72ecb62e2aa053260a7f0f75015fc0ade Reviewed-on: https://go-review.googlesource.com/19769Reviewed-by: David Crawshaw <crawshaw@golang.org> Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Josh Bleecher Snyder authored
Note that this is only safe because the compiler generates multiple distinct gc.Types. If we switch to having canonical gc.Types, then this will need to be updated to handle the case in which the user uses both map[[n]T]S and also calls a function f(...T) with n arguments. In that case, the runtime needs algs for [n]T, but this could mark the sole [n]T type as Noalg. This is a general problem with having a single bool to represent whether alg generation is needed for a type. Cuts 17k off cmd/go and 13k off golang.org/x/tools/cmd/godoc, approx 0.14% and 0.07% respectively. For #6853 and #9930 Change-Id: Iccb6b9fd88ade5497d7090528a903816d340bf0a Reviewed-on: https://go-review.googlesource.com/19770Reviewed-by: David Crawshaw <crawshaw@golang.org> Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Keith Randall authored
func f(x, y, z *int) { a := []*int{x,y,z} ... } We used to use: var tmp [3]*int a := tmp[:] a[0] = x a[1] = y a[2] = z Now we do: var tmp [3]*int tmp[0] = x tmp[1] = y tmp[2] = z a := tmp[:] Doesn't sound like a big deal, but the compiler has trouble eliminating write barriers when using the former method because it doesn't know that the slice points to the stack. In the latter method, the compiler knows the array is on the stack and as a result doesn't emit any write barriers. This turns out to be extremely common when building ... args, like for calls fmt.Printf. Makes go binaries ~1% smaller. Doesn't have a measurable effect on the go1 fmt benchmarks, unfortunately. Fixes #14263 Update #6853 Change-Id: I9074a2788ec9e561a75f3b71c119b69f304d6ba2 Reviewed-on: https://go-review.googlesource.com/22395 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
-
Dmitry Vyukov authored
Arm arch uses coarse-grained kernel timer as cputicks. As the result sort.Sort smashes trace entirely. Use sort.Stable instead. Change-Id: Idfa017a86a489be58cf239f7fe56d7f4b66b52a9 Reviewed-on: https://go-review.googlesource.com/22317 Run-TryBot: Dmitry Vyukov <dvyukov@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
-
Dmitry Vyukov authored
On some processors cputicks (used to generate trace timestamps) produce non-monotonic timestamps. It is important that the parser distinguishes logically inconsistent traces (e.g. missing, excessive or misordered events) from broken timestamps. The former is a bug in tracer, the latter is a machine issue. Test that (1) parser does not return a logical error in case of broken timestamps and (2) broken timestamps are eventually detected and reported. Change-Id: Ib4b1eb43ce128b268e754400ed8b5e8def04bd78 Reviewed-on: https://go-review.googlesource.com/21608Reviewed-by: Austin Clements <austin@google.com>
-
Alex Brainman authored
Reloc.SymbolTableIndex is an index into symbol table. But Reloc.SymbolTableIndex cannot be used as index into File.Symbols, because File.Symbols slice has Aux lines removed as it is built. We cannot change the way File.Symbols works, so I propose we introduce new File.COFFSymbols that does not have that limitation. Also unlike File.Symbols, File.COFFSymbols will consist of COFFSymbol. COFFSymbol matches PE COFF specification exactly, and it is simpler to use. Updates #15345 Change-Id: Icbc265853a472529cd6d64a76427b27e5459e373 Reviewed-on: https://go-review.googlesource.com/22336Reviewed-by: David Crawshaw <crawshaw@golang.org> Run-TryBot: Alex Brainman <alex.brainman@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 23 Apr, 2016 5 commits
-
-
Brad Fitzpatrick authored
This is what led to https://golang.org/cl/20763 and https://golang.org/cl/20765 to shrink binary sizes. Change-Id: Id360d474e6153cfe32a525b0a720810fd113195b Reviewed-on: https://go-review.googlesource.com/22392Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Keith Randall authored
Now that we're using 32-bit ops for 8/16-bit logical operations (to avoid partial register stalls), there's really no need to keep track of the 8/16-bit ops at all. Convert everything we can to 32-bit ops. This CL is the obvious stuff. I might think a bit more about whether we can get rid of weirder stuff like HMULWU. The only downside to this CL is that we lose some information about constants. If we had source like: var a byte = ... a += 128 a += 128 We will convert that to a += 256, when we could get rid of the add altogether. This seems like a fairly unusual scenario and I'm happy with forgoing that optimization. Change-Id: Ia7c1e5203d0d110807da69ed646535194a3efba1 Reviewed-on: https://go-review.googlesource.com/22382Reviewed-by: Todd Neal <todd@tneal.org>
-
Keith Randall authored
Combine stores into larger widths when it is safe to do so. Add clobber() function so stray dead uses do not impede the above rewrites. Fix bug in loads where all intermediate values depending on a small load (not just the load itself) must have no other uses. We really need the small load to be dead after the rewrite.. Fixes #14267 Change-Id: Ib25666cb19777f65082c76238fba51a76beb5d74 Reviewed-on: https://go-review.googlesource.com/22326 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: Todd Neal <todd@tneal.org>
-
Dmitry Vyukov authored
Currently tracer uses global sequencer and it introduces significant slowdown on parallel machines (up to 10x). Replace the global sequencer with per-goroutine sequencer. If we assign per-goroutine sequence numbers to only 3 types of events (start, unblock and syscall exit), it is enough to restore consistent partial ordering of all events. Even these events don't need sequence numbers all the time (if goroutine starts on the same P where it was unblocked, then start does not need sequence number). The burden of restoring the order is put on trace parser. Details of the algorithm are described in the comments. On http benchmark with GOMAXPROCS=48: no tracing: 5026 ns/op tracing: 27803 ns/op (+453%) with this change: 6369 ns/op (+26%, mostly for traceback) Also trace size is reduced by ~22%. Average event size before: 4.63 bytes/event, after: 3.62 bytes/event. Besides running trace tests, I've also tested with manually broken cputicks (random skew for each event, per-P skew and episodic random skew). In all cases broken timestamps were detected and no test failures. Change-Id: I078bde421ccc386a66f6c2051ab207bcd5613efa Reviewed-on: https://go-review.googlesource.com/21512 Run-TryBot: Dmitry Vyukov <dvyukov@google.com> Reviewed-by: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Francesc Campoy authored
Fixes #15413 Change-Id: I837a391276eed565cf66d3715ec68b7b959ce143 Reviewed-on: https://go-review.googlesource.com/22390Reviewed-by: Andrew Gerrand <adg@golang.org>
-
- 22 Apr, 2016 6 commits
-
-
Matthew Dempsky authored
Change-Id: Ia3f262f06592b66447c213e2350402cd5e6e2ccd Reviewed-on: https://go-review.googlesource.com/22389 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Robert Griesemer authored
Exporting filenames as part of the position information can lead to different object files which breaks tests. Change-Id: Ia678ab64293ebf04bf83601e6ba72919d05762a4 Reviewed-on: https://go-review.googlesource.com/22385Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Brad Fitzpatrick authored
Change-Id: I12d5e5d0e74b354f26898bab4ea30eb27ac45cd7 Reviewed-on: https://go-review.googlesource.com/22387 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Brad Fitzpatrick authored
Fixes #15404 Change-Id: I16f2a34a1e4c3457053a1fc2141f21747cfb22b4 Reviewed-on: https://go-review.googlesource.com/22386Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Matthew Dempsky authored
Prevents denial of service attacks from bogus UDP packets. Fixes #13281. Change-Id: Ifb51b17a1b0807bfd27b144d6037431701184e7b Reviewed-on: https://go-review.googlesource.com/22126Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Mohit Agarwal authored
Fixes #14860 Change-Id: Id55ad942d45a104d560a879d6e8e1aa09671789b Reviewed-on: https://go-review.googlesource.com/22351Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-