- 01 Jan, 2015 1 commit
-
-
Shenghou Ma authored
This is a genuine bug exposed by our test for issue 9456: our wrapper for pthread_create is not initialized until we initialize cgo itself, but it is possible that a static constructor could call pthread_create, and in that case, it will be calling a nil function pointer. Fix that by also initializing the sys_pthread_create function pointer inside our pthread_create wrapper function, and use a pthread_once to make sure it is only initialized once. Fix build for openbsd. Change-Id: Ica4da2c21fcaec186fdd3379128ef46f0e767ed7 Reviewed-on: https://go-review.googlesource.com/2232Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
- 31 Dec, 2014 3 commits
-
-
Shenghou Ma authored
%lL will prepend the current directory to the filename, which is not what we want here (as the file name is already absolute). Fixes #9150. Change-Id: I4c9386be6baf421393b92d9401a264b4692986d0 Reviewed-on: https://go-review.googlesource.com/2231Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Shenghou Ma authored
Some libraries, for example, OpenBLAS, create work threads in a global constructor. If we're doing cpu profiling, it's possible that SIGPROF might come to some of the worker threads before we make our first cgo call. Cgocallback used to terminate the process when that happens, but it's better to miss a couple profiling signals than to abort in this case. Fixes #9456. Change-Id: I112b8e1a6e10e6cc8ac695a4b518c0f577309b6b Reviewed-on: https://go-review.googlesource.com/2141Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
David Symonds authored
Change-Id: Ic2e34f84596b56715d5f41c9a5250f7c9f8e671b Reviewed-on: https://go-review.googlesource.com/2087Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org> Reviewed-by: Dave Cheney <dave@cheney.net>
-
- 30 Dec, 2014 7 commits
-
-
Martin Möhrmann authored
Avoid the decimal lookup in digits array and compute the decimal character value directly. Reduce calls to 64bit division on 32bit plattforms by splitting conversion into smaller blocks. Convert value to uintptr type when it can be represented by uintptr. on darwin/386 benchmark old ns/op new ns/op delta BenchmarkFormatInt 8352 7466 -10.61% BenchmarkAppendInt 4281 3401 -20.56% BenchmarkFormatUint 2785 2251 -19.17% BenchmarkAppendUint 1770 1223 -30.90% on darwin/amd64 benchmark old ns/op new ns/op delta BenchmarkFormatInt 5531 5492 -0.71% BenchmarkAppendInt 2435 2295 -5.75% BenchmarkFormatUint 1628 1569 -3.62% BenchmarkAppendUint 726 750 +3.31% Change-Id: Ifca281cbdd62ab7d7bd4b077a96da99eb12cf209 Reviewed-on: https://go-review.googlesource.com/2105Reviewed-by: Robert Griesemer <gri@golang.org>
-
Alan Donovan authored
+ tests that these parse: map[int]int{}[0]++ interface{f()}(x).f() chan int(x) <- 0 Fixes #9474 Change-Id: If9fa57b3ab415ae7e93aa9935ec63edda8fe9d4f Reviewed-on: https://go-review.googlesource.com/2178Reviewed-by: Robert Griesemer <gri@golang.org>
-
Brad Fitzpatrick authored
Change-Id: I72f6d0fc66dbee3f832d2d960b99a166a5bb10c3 Reviewed-on: https://go-review.googlesource.com/2191Reviewed-by: David Symonds <dsymonds@golang.org>
-
Brad Fitzpatrick authored
Change-Id: Ic15e40bb1ae0bf3a4e8c43a44daf7cc35a18da87 Reviewed-on: https://go-review.googlesource.com/2192Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Anthony Martin authored
Change-Id: I4379418853c523fc9aaeb5d6f37bc96117841418 Reviewed-on: https://go-review.googlesource.com/1786Reviewed-by: David du Colombier <0intro@gmail.com> Reviewed-by: Aram Hăvărneanu <aram@mgk.ro>
-
Emil Hessman authored
Vitess and protobuf has moved to GitHub; update the links. Change-Id: I2d90bde1a7f2b590c8b7b08ce73d6faa13b51da0 Reviewed-on: https://go-review.googlesource.com/2166Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Brad Fitzpatrick authored
We already had client support for trailers, but no way for a server to set them short of hijacking the connection. Fixes #7759 Change-Id: Ic83976437739ec6c1acad5f209ed45e501dbb93a Reviewed-on: https://go-review.googlesource.com/2157Reviewed-by: Andrew Gerrand <adg@golang.org>
-
- 29 Dec, 2014 6 commits
-
-
Chris Manghane authored
operands Fixes #6671 for cmd/gc. Change-Id: I4907655b6e243960f2ceb544c63ea16513c7bd68 Reviewed-on: https://go-review.googlesource.com/1251Reviewed-by: Robert Griesemer <gri@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
-
Chris Manghane authored
Change-Id: I36b57f3e299a4f96b8b5aa55c9c224d888229684 Reviewed-on: https://go-review.googlesource.com/1790Reviewed-by: Minux Ma <minux@golang.org> Reviewed-by: Russ Cox <rsc@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Robert Griesemer authored
Reported via unsupported GitHub pull request: https://github.com/golang/go/pull/9436/ Change-Id: I12b00e8ccac700bb36b200196e2867fcc863fdf1 Reviewed-on: https://go-review.googlesource.com/2139Reviewed-by: Alan Donovan <adonovan@google.com>
-
David du Colombier authored
Following change 2154, the goatoi function was renamed atoi. However, this definition conflicts with the atoi function defined in the Plan 9 runtime, which takes a []byte instead of a string. This change fixes the build on Plan 9. Change-Id: Ia0f7ca2f965bd5e3cce3177bba9c806f64db05eb Reviewed-on: https://go-review.googlesource.com/2165Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Keith Randall authored
They are no longer needed now that C is gone. goatoi -> atoi gofuncname/funcname -> funcname/cfuncname goroundupsize -> already existing roundupsize Change-Id: I278bc33d279e1fdc5e8a2a04e961c4c1573b28c7 Reviewed-on: https://go-review.googlesource.com/2154Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Minux Ma <minux@golang.org>
-
Shenghou Ma authored
Now that we've removed all the C code in runtime and the C compilers, there is no need to have a separate stackguard field to check for C code on Go stack. Remove field g.stackguard1 and rename g.stackguard0 to g.stackguard. Adjust liblink and cmd/ld as necessary. Change-Id: I54e75db5a93d783e86af5ff1a6cd497d669d8d33 Reviewed-on: https://go-review.googlesource.com/2144Reviewed-by: Keith Randall <khr@golang.org>
-
- 28 Dec, 2014 7 commits
-
-
Brad Fitzpatrick authored
Change-Id: Ia18f6ed0fa38dac297fc5fe1ca56e38ec37518ef Reviewed-on: https://go-review.googlesource.com/2152Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Brad Fitzpatrick authored
Fixes #9451 Change-Id: I0540e398b30c10779ac9d5a67a01d44bb6054a92 Reviewed-on: https://go-review.googlesource.com/2151Reviewed-by: David Symonds <dsymonds@golang.org>
-
Emil Hessman authored
Use Fatalf for formatting directive rather than plain Fatal. Change-Id: Iebd30cd6326890e9501746113a6d97480949e3d2 Reviewed-on: https://go-review.googlesource.com/2161Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Keith Randall authored
The goalg function was a holdover from when we had algorithm tables in both C and Go. It is no longer needed. Change-Id: Ia0c1af35bef3497a899f22084a1a7b42daae72a0 Reviewed-on: https://go-review.googlesource.com/2099Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Emil Hessman authored
The error message for decoding a unquoted value into a struct field with the ,string option specified has two arguments when one is needed. Make the error message take one argument and add a test in order to cover the case when a unquoted value is specified. Also add error value as the missing argument for Fatalf call in test. Fixes the following go vet reports: decode.go:602: wrong number of args for format in Errorf call: 1 needed but 2 args decode_test.go:1088: missing argument for Fatalf("%v"): format reads arg 1, have only 0 args Change-Id: Id036e10c54c4a7c1ee9952f6910858ecc2b84134 Reviewed-on: https://go-review.googlesource.com/2109Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
-
Emil Hessman authored
Use log.Fatalf for formatting directives instead of log.Fatal Change-Id: Ia207b320f5795c63cdfa71f92c19ca6d05cc833f Reviewed-on: https://go-review.googlesource.com/2160Reviewed-by: Minux Ma <minux@golang.org>
-
Keith Randall authored
Rename "gothrow" to "throw" now that the C version of "throw" is no longer needed. This change is purely mechanical except in panic.go where the old version of "throw" has been deleted. sed -i "" 's/[[:<:]]gothrow[[:>:]]/throw/g' runtime/*.go Change-Id: Icf0752299c35958b92870a97111c67bcd9159dc3 Reviewed-on: https://go-review.googlesource.com/2150Reviewed-by: Minux Ma <minux@golang.org> Reviewed-by: Dave Cheney <dave@cheney.net>
-
- 27 Dec, 2014 2 commits
-
-
Guobiao Mei authored
Change-Id: I60bbb7deb7462d1ca884677b4f86bd54b20b3f35 Reviewed-on: https://go-review.googlesource.com/2140Reviewed-by: Minux Ma <minux@golang.org>
-
Martin Möhrmann authored
The new test case produces the longest string representation possible and thereby uses all of the 65 bytes in the buffer array used by the formatBits function. Change-Id: I11320c4de56ced5ff098b7e37f1be08e456573e2 Reviewed-on: https://go-review.googlesource.com/2108Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 26 Dec, 2014 5 commits
-
-
Shenghou Ma authored
Change-Id: Ie95c86d222b230a2e69f4141e3372bf94dee3e91 Reviewed-on: https://go-review.googlesource.com/2129Reviewed-by: Minux Ma <minux@golang.org>
-
Shenghou Ma authored
Specify what will happen if len(dst) != len(src). Change-Id: I66afa3730f637753b825189687418f14ddec3629 Reviewed-on: https://go-review.googlesource.com/1754Reviewed-by: Adam Langley <agl@golang.org>
-
Shenghou Ma authored
Fixes #9445 Change-Id: If7abd4d4d41cdfd5cf677f03533c930c8b965a01 Reviewed-on: https://go-review.googlesource.com/2128Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
mattn authored
Change-Id: I5437b3a36181373d8ff33225d7520ab321459de9 Reviewed-on: https://go-review.googlesource.com/2084Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Shenghou Ma authored
Fixes #9359. Change-Id: Iba62935b5a14de23d914f433a09a40417d7e88ed Signed-off-by: Shenghou Ma <minux@golang.org> Reviewed-on: https://go-review.googlesource.com/1889Reviewed-by: Russ Cox <rsc@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 25 Dec, 2014 1 commit
-
-
Dmitry Vyukov authored
Currently we do very a complex rebalancing of runnable goroutines between queues, which tries to preserve scheduling fairness. Besides being complex and error-prone, it also destroys all locality of scheduling. This change uses simpler scheme: leave runnable goroutines where they are, during starttheworld start all Ps with local work, plus start one additional P in case we have excessive runnable goroutines in local queues or in the global queue. The schedler must be able to operate efficiently w/o the rebalancing, because garbage collections do not have to happen frequently. The immediate need is execution tracing support: handling of garabage collection which does stoptheworld/starttheworld several times becomes exceedingly complex if the current execution can jump between Ps during starttheworld. Change-Id: I4fdb7a6d80ca4bd08900d0c6a0a252a95b1a2c90 Reviewed-on: https://go-review.googlesource.com/1951Reviewed-by: Rick Hudson <rlh@golang.org>
-
- 24 Dec, 2014 5 commits
-
-
Michael Matloob authored
Change-Id: Idff57050a34d09e7fa9b77e9b53d61bb5ea2a71c Reviewed-on: https://go-review.googlesource.com/2095Reviewed-by: Minux Ma <minux@golang.org>
-
Keith Randall authored
This test code is ugly. There must be a better way. But for now, fix the build. Change-Id: I33064145ea37f11abf040ec97caa87669be1a9fa Reviewed-on: https://go-review.googlesource.com/2114Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Marko Tiikkaja authored
numCanOpen will never be larger than 0 in maybeOpenNewConnections() when this code path is taken, so no new connections can ever be opened. Change-Id: Id1302e8d9afb3a67be61b5e738fe07ef81d20fe0 Reviewed-on: https://go-review.googlesource.com/1550Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Shenghou Ma authored
For Go 1.5, we can use go:linkname rather than assembly thunk for gc. Gccgo already has support for //extern. Change-Id: I5505aa247dd5b555112f7261ed2f192c81cf0bdf Signed-off-by: Shenghou Ma <minux@golang.org> Reviewed-on: https://go-review.googlesource.com/1888Reviewed-by: Russ Cox <rsc@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Shenghou Ma authored
Change-Id: I1ef770184ad1d42bcb58714d559f2cc866a919ab Signed-off-by: Shenghou Ma <minux@golang.org> Reviewed-on: https://go-review.googlesource.com/1880Reviewed-by: Keith Randall <khr@golang.org>
-
- 23 Dec, 2014 3 commits
-
-
Martin Möhrmann authored
Move the checks for empty rotate changes from the beginning of rotate to the callers. Remove additional variable p used instead of existing m with same value. Remove special casing of equal ranges (i==j) to exit early as no work is saved vs checking (i!=j) and making a single swapRange call if this is false. benchmark old ns/op new ns/op delta BenchmarkStableString1K 417195 425218 +1.92% BenchmarkStableInt1K 126661 124498 -1.71% BenchmarkStableInt64K 10365014 10417438 +0.51% BenchmarkStable1e2 132151 130648 -1.14% BenchmarkStable1e4 42027428 40812649 -2.89% BenchmarkStable1e6 8524772364 8430192391 -1.11% Change-Id: Ia7642e9d31408496970c700f5843d53cc3ebe817 Reviewed-on: https://go-review.googlesource.com/2100Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Carlos Castillo authored
When go parses #cgo lines, expand ${SRCDIR} into the path to the source directory. This allows options to be passed to the compiler and linker that involve file paths relative to the source code directory. Without the expansion the paths would be invalid when the current working directory changes. Fixes #7891 Fixes #5428 Change-Id: I343a145a9771a5ccbaa958e4a1ecd1716fcae52d Reviewed-on: https://go-review.googlesource.com/1756Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Keith Randall authored
Test more stuff: 1) flagNoPointers, an incorrect value was the cause of #9425 2) Total function layout size 3) gc program Change-Id: I73f65fe740215938fa930d2f096febd9db0a0021 Reviewed-on: https://go-review.googlesource.com/2090Reviewed-by: Ian Lance Taylor <iant@golang.org>
-