- 15 Apr, 2015 20 commits
-
-
Ian Lance Taylor authored
Move the single file from internal/syscall to internal/syscall/unix, to match the golang.org/x/sys layout. Change-Id: I2fb2832b4cb22efc7666bd276f5401ac3e73dc40 Reviewed-on: https://go-review.googlesource.com/8972Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Rob Pike <r@golang.org>
-
David Crawshaw authored
Change-Id: I9ceceb29291ea9f5d7b675dfabd665c5e3618471 Reviewed-on: https://go-review.googlesource.com/8955Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Michael Hudson-Doyle authored
Fixes #10449 Change-Id: I1dc2d0213e6a46f3609222d5460c1a54081e2471 Reviewed-on: https://go-review.googlesource.com/8931Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Michael Hudson-Doyle authored
This is $GOPATH/pkg/linux_amd64 or similar. cmd/go already had a grotty calculation of this and I need to add another one for -buildmode=shared. Change-Id: Ied28c9b7cce671da8d45920e124a3e0c2501258a Reviewed-on: https://go-review.googlesource.com/8930Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Michael Hudson-Doyle authored
Including having -r "" preventing rpath from being set at all. Change-Id: Ib40d7bf93a6e9ef21985c4a05b5703e4fbd1cd1b Reviewed-on: https://go-review.googlesource.com/8806Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Josh Bleecher Snyder authored
It is faster to execute MOVQ AX,(DI) MOVQ AX,8(DI) MOVQ AX,16(DI) MOVQ AX,24(DI) ADDQ $32,DI than STOSQ STOSQ STOSQ STOSQ However, in order to be able to jump into the middle of a block of MOVQs, the call site needs to pre-adjust DI. If we're clearing a small area, the cost of that DI pre-adjustment isn't repaid. This CL switches the DUFFZERO implementation to use a hybrid strategy, in which small clears use STOSQ as before, but large clears use mostly MOVQ/ADDQ blocks. benchmark old ns/op new ns/op delta BenchmarkClearFat8 0.55 0.55 +0.00% BenchmarkClearFat12 0.82 0.83 +1.22% BenchmarkClearFat16 0.55 0.55 +0.00% BenchmarkClearFat24 0.82 0.82 +0.00% BenchmarkClearFat32 2.20 1.94 -11.82% BenchmarkClearFat40 1.92 1.66 -13.54% BenchmarkClearFat48 2.21 1.93 -12.67% BenchmarkClearFat56 3.03 2.20 -27.39% BenchmarkClearFat64 3.26 2.48 -23.93% BenchmarkClearFat72 3.57 2.76 -22.69% BenchmarkClearFat80 3.83 3.05 -20.37% BenchmarkClearFat88 4.14 3.30 -20.29% BenchmarkClearFat128 5.54 4.69 -15.34% BenchmarkClearFat256 9.95 9.09 -8.64% BenchmarkClearFat512 18.7 17.9 -4.28% BenchmarkClearFat1024 36.2 35.4 -2.21% Change-Id: Ic786406d9b3cab68d5a231688f9e66fcd1bd7103 Reviewed-on: https://go-review.googlesource.com/2585Reviewed-by: Keith Randall <khr@golang.org>
-
Josh Bleecher Snyder authored
Val is used to hold constant values. Reg was the odd duck out. Generated using eg. No functional changes. Passes toolstash -cmp. Change-Id: Ic1de769a1f92bb02e09a4428d998b716f307e2f6 Reviewed-on: https://go-review.googlesource.com/8912Reviewed-by: Russ Cox <rsc@golang.org>
-
Michael Hudson-Doyle authored
By removing type slice, renaming type sliceStruct to type slice and whacking until it compiles. Has a pleasing net reduction of conversions. Fixes #10188 Change-Id: I77202b8df637185b632fd7875a1fdd8d52c7a83c Reviewed-on: https://go-review.googlesource.com/8770Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Michael Hudson-Doyle authored
We forgot to add the !gccgo tag to cpuid_386.s. Change-Id: I2de2ed92ac9686c9365cb37cd29121fa98c2bf37 Reviewed-on: https://go-review.googlesource.com/8960Reviewed-by: Dave Cheney <dave@cheney.net> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Rob Pike authored
Change-Id: Ia0d7c2f08f8f124bcd62c7f9744227812d68903d Reviewed-on: https://go-review.googlesource.com/8941Reviewed-by: Rob Pike <r@golang.org>
-
Rob Pike authored
When a reflect.Value is passed to Printf (etc.), fmt called the String method, which does not disclose its contents. To get the contents, one could call Value.Interface(), but that is illegal if the Value is not exported or otherwise forbidden. This CL improves the situation with a trivial change to the fmt package: when we see a reflect.Value as an argument, we treat it exactly as we treat a reflect.Value we make inside the package. This means that we always print the contents of the Value as if _that_ was the argument to Printf. This is arguably a breaking change but I think it is a genuine improvement and no greater a break than many other tweaks we have made to formatted output from this package. Fixes #8965. Change-Id: Ifc2a4ce3c1134ad5160e101d2196c22f1542faab Reviewed-on: https://go-review.googlesource.com/8731Reviewed-by: roger peppe <rogpeppe@gmail.com> Reviewed-by: Russ Cox <rsc@golang.org>
-
Rob Pike authored
This trivial addition to the io package makes it easy to control the buffer size and allocation properties of io.Copy. Change-Id: Ica1a6bd015e429d4e655bc0c6f66cea21c454acf Reviewed-on: https://go-review.googlesource.com/8730Reviewed-by: Russ Cox <rsc@golang.org>
-
Dave Cheney authored
Fixes #9855 Use an architectural zero register as the source for zeroing, if available. Change-Id: Ie5b4ba4e3d356c6f892bfd1cebd14d5152bdeeb0 Reviewed-on: https://go-review.googlesource.com/8722Reviewed-by: Keith Randall <khr@golang.org>
-
Mikio Hara authored
Change-Id: I63053c45081f47ba736720a78d85c31c13767891 Reviewed-on: https://go-review.googlesource.com/8642Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Mikio Hara authored
Change-Id: Icaac9a48a3b9a3c5542235162e21ab8303592965 Reviewed-on: https://go-review.googlesource.com/8641Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Dave Cheney authored
Fixes #10450 runtime.cputicks is called from runtime.exitsyscall and must not split the stack. cputicks is implemented in several ways and the NOSPLIT annotation was missing from a few of these. Change-Id: I5cbbb4e5888c5d298fe2fef240782d0e49f59af8 Reviewed-on: https://go-review.googlesource.com/8939Reviewed-by: Aram Hăvărneanu <aram@mgk.ro>
-
Alex Brainman authored
When Windows calls externalthreadhandler it expects to receive return value in AX. We don't set AX anywhere. Change that. Store ctrlhandler1 and profileloop1 return values into AX before returning from externalthreadhandler. Fixes #10215. Change-Id: Ied04542cc3ebe7d4a26660e970f9f78098143591 Reviewed-on: https://go-review.googlesource.com/8901Reviewed-by: Minux Ma <minux@golang.org> Run-TryBot: Alex Brainman <alex.brainman@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Nigel Tao authored
http://www.w3.org/TR/PNG/#5ChunkOrdering disallows them. Fixes #10423 Change-Id: I3399ce53dc8b41b1b5f0b906a5912e6efd80418f Reviewed-on: https://go-review.googlesource.com/8905Reviewed-by: Rob Pike <r@golang.org>
-
Robert Griesemer authored
- The go/importer package provides access to compiler-specific importers. - Adjusted go/internal/gcimporter and go/types as needed. - types.Check was removed - not much simpler than calling types.Config.Check. - Package "unsafe" is now handled by the type checker; importers are not called for it anymore. - In std lib tests, re-use importer for faster testing (no need to re-import previously imported packages). - Minor cleanups. The code still needs cleanups before submitting. Change-Id: Idd456da2e9641688fe056504367348926feb0755 Reviewed-on: https://go-review.googlesource.com/8767Reviewed-by: Alan Donovan <adonovan@google.com> Run-TryBot: Robert Griesemer <gri@golang.org>
-
Josh Bleecher Snyder authored
Use environment variables to allow set-and-forget. Add a script to attempt to autodetect codesign info. Change-Id: Ic56b9c5f097b1a4117ebb89c408bc333d91f581d Reviewed-on: https://go-review.googlesource.com/8910Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
- 14 Apr, 2015 13 commits
-
-
Josh Bleecher Snyder authored
No functional changes. Passes toolstash -cmp. Change-Id: I4fba0c248645c3910ee3f7fc99dacafb676c5dc2 Reviewed-on: https://go-review.googlesource.com/8911Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Austin Clements authored
A G will be preempted if it runs for 10ms without blocking. Currently this constant is hard-coded in retake. Move it to a global const. We'll use the time slice length in scheduling background GC. Change-Id: I79a979948af2fad3afe5df9d4af4062f166554b7 Reviewed-on: https://go-review.googlesource.com/8838Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Rick Hudson <rlh@golang.org>
-
Austin Clements authored
mHeap_ReclaimList is asked to reclaim at least npages pages, but it counts the number of spans reclaimed, not the number of pages reclaimed. The number of spans reclaimed is strictly larger than the number of pages, so this is not strictly wrong, but it is forcing more reclamation than was intended by the caller, which delays large allocations. Fix this by increasing the count by the number of pages in the swept span, rather than just increasing it by 1. Fixes #9048. Change-Id: I5ae364a9837a6012e68fcd431bba000340cfd50c Reviewed-on: https://go-review.googlesource.com/8920Reviewed-by: Dmitry Vyukov <dvyukov@google.com> Reviewed-by: Rick Hudson <rlh@golang.org>
-
Austin Clements authored
Commit d7e0ad4b removed the next_gc manipulation from mSpan_Sweep, but left in the traceNextGC() for recording the updated next_gc value. Remove this now unnecessary call. Change-Id: I28e0de071661199be9810d7bdcc81ce50b5a58ae Reviewed-on: https://go-review.googlesource.com/8894Reviewed-by: Dmitry Vyukov <dvyukov@google.com> Reviewed-by: Rick Hudson <rlh@golang.org>
-
Marius Nuennerich authored
Fixes #10451 Change-Id: I15ed777e9a4a4e1ba1178d07fcbe0ab4bf0d9e50 Reviewed-on: https://go-review.googlesource.com/8936Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Matthew Dempsky authored
See also golang-dev discussion: https://groups.google.com/d/msg/golang-dev/Nk9gnTINlTg/SV8rBt-2__kJ Change-Id: I49edd98d73400c1757b6085dec86752de569c01a Reviewed-on: https://go-review.googlesource.com/8923Reviewed-by: Rob Pike <r@golang.org>
-
Rob Pike authored
Even if requested, there is no .go file for unsafe - it comes from the compiler - so referencing its cover variables will break the compilation in a command like go test -coverpkg=all fmt Fixes #10408. Change-Id: If92658ef6c29dc020f66ba30b02eaa796f7205e0 Reviewed-on: https://go-review.googlesource.com/8891Reviewed-by: Russ Cox <rsc@golang.org>
-
Dmitry Vyukov authored
Fixes #10441 Compiler crashed as: panic: runtime error: invalid memory address or nil pointer dereference goroutine 1 [running]: cmd/internal/gc.haspointers(0x0, 0xffffffffffffffff) src/cmd/internal/gc/reflect.go:623 +0x1f cmd/internal/gc.escwalk(0x20c82dc00, 0xffffffffffffffff, 0x20c82dda0, 0x20c835520) src/cmd/internal/gc/esc.go:1291 +0x14aa cmd/internal/gc.escwalk(0x20c82dc00, 0xffffffffffffffff, 0x20c82dda0, 0x20beac340) src/cmd/internal/gc/esc.go:1386 +0x836 while evaluating haspointers of the fake OADDR node here: leaks = level <= 0 && dst.Escloopdepth < src.Escloopdepth || level < 0 && dst == &e.funcParam && haspointers(src.Type) Change-Id: I13c23fced52e8fcd0ae1df81b374df8632eb7790 Reviewed-on: https://go-review.googlesource.com/8932Reviewed-by: David Chase <drchase@google.com> Run-TryBot: Dmitry Vyukov <dvyukov@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
David Crawshaw authored
With the new buildmodes c-archive and c-shared, it is possible for a cgo call to come in early in the lifecycle of a Go program. Calls before the runtime has been initialized are caught by _cgo_wait_runtime_init_done. However a call can come in after the runtime has initialized, but before the program's package init functions have finished running. To avoid this cgocallback checks m.ncgo to see if we are on a thread running Go. If not, we may be a foreign thread and it blocks until main_init is complete. Change-Id: I7a9f137fa2a40c322a0b93764261f9aa17fcf5b8 Reviewed-on: https://go-review.googlesource.com/8897Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org>
-
David Crawshaw authored
Avoids shadowing the builtin channel close function. Change-Id: I7a729b0937c8248fe27222be61318a88db995eee Reviewed-on: https://go-review.googlesource.com/8898Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org>
-
Nigel Tao authored
call unreadByteStuffedByte. If ensureNBits was due to an io.EOF that was translated to jpeg.errShortHuffmanData, then we may have read no bytes, so there is no byte-stuffed-byte to unread. Fixes #10387 Change-Id: I39a3842590c6cef2aa48943288d52f603338b44d Reviewed-on: https://go-review.googlesource.com/8841Reviewed-by: Rob Pike <r@golang.org>
-
Brad Fitzpatrick authored
Change-Id: Ie5fe5cf3e2926ba4f91271bd47f3f998c26e003e Reviewed-on: https://go-review.googlesource.com/8914Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
-
Brad Fitzpatrick authored
The memory model has been clarified since. This is legal and doesn't need justification. Change-Id: I60f9938503f86f52bb568ca1a99ac721ee72cee5 Reviewed-on: https://go-review.googlesource.com/8913Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
-
- 13 Apr, 2015 7 commits
-
-
Shenghou Ma authored
Change-Id: Idfb20bfe130d9a54d9f5aae8eab8a34655d30610 Reviewed-on: https://go-review.googlesource.com/8865Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Srdjan Petrovic authored
Already supported platforms are linux/amd64 and android/arm. Running -buildmode=c-shared on linux/arm is equivalent to: -ldflags "-shared" -asmflags "-shared" Change-Id: Ifdb267f1d6508157f236be912fa369440172d161 Reviewed-on: https://go-review.googlesource.com/8895Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
http://gcc.gnu.org/PR65755Ian Lance Taylor authored
Change-Id: Ic35dff4c9a7fc6716ef9d5553a7b1769bed9be01 Reviewed-on: https://go-review.googlesource.com/8892Reviewed-by: Minux Ma <minux@golang.org>
-
Mikio Hara authored
On darwin, /tmp and /var directories are usually linked to /private. % cd $TMPDIR; pwd -L /var/.../T % pwd -P /private/var/.../T Change-Id: I277ff2d096344d9a80e6004a83e9fc3e1716348c Reviewed-on: https://go-review.googlesource.com/8842Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Srdjan Petrovic authored
Follows http://golang.org/cl/8454, a similar CL for arm architectures. This CL involves android-specific changes, namely, synthesizing argv/auxv, as android doesn't provide those to the init functions. This code is based on crawshaw@ android code in golang.org/x/mobile. Change-Id: I32364efbb2662e80270a99bd7dfb1d0421b5417d Reviewed-on: https://go-review.googlesource.com/8457Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Rob Pike authored
Change-Id: I392cedc49847c8ea0daa38024fca97a289d805af Reviewed-on: https://go-review.googlesource.com/8890Reviewed-by: Rob Pike <r@golang.org>
-
Rob Pike authored
The documentation is clear that formats like %02x applied to a byte slice are per-element, so the result should be nothing if the slice is empty. It's not, because the top-level padding routine is called. It shouldn't be: the loop does the padding for us. Fixes #10430. Change-Id: I04ea0e804c0f2e70fff3701e5bf22acc90e890da Reviewed-on: https://go-review.googlesource.com/8864Reviewed-by: Ian Lance Taylor <iant@golang.org>
-