- 12 Jul, 2013 13 commits
-
-
Russ Cox authored
If the stack frame size is larger than the known-unmapped region at the bottom of the address space, then the stack split prologue cannot use the usual condition: SP - size >= stackguard because SP - size may wrap around to a very large number. Instead, if the stack frame is large, the prologue tests: SP - stackguard >= size (This ends up being a few instructions more expensive, so we don't do it always.) Preemption requests register by setting stackguard to a very large value, so that the first test (SP - size >= stackguard) cannot possibly succeed. Unfortunately, that same very large value causes a wraparound in the second test (SP - stackguard >= size), making it succeed incorrectly. To avoid *that* wraparound, we have to amend the test: stackguard != StackPreempt && SP - stackguard >= size This test is only used for functions with large frames, which essentially always split the stack, so the cost of the few instructions is noise. This CL and CL 11085043 together fix the known issues with preemption, at the beginning of a function, so we will be able to try turning it on again. R=ken2 CC=golang-dev https://golang.org/cl/11205043
-
Russ Cox authored
This is a transcript before this change. I've capitalized the text being removed. Note that it is always near another line that already says fmt, marked with <<< $ cd $GOROOT/src/pkg/fmt $ go test -cover PASS coverage FOR FMT: 91.3% of statements ok fmt 0.040s <<< $ go test -coverpkg strconv PASS coverage FOR FMT: 64.9% of statements in strconv ok fmt 0.039s <<< $ go test -cover -c $ ./fmt.test -test.covermode=set <<< PASS coverage FOR FMT: 91.3% of statements $ go test -coverpkg strconv -c $ ./fmt.test -test.covermode=set <<< PASS coverage FOR FMT: 64.9% of statements in strconv That the summary printed by 'go test [options] fmt' is unchanged: $ go test -cover fmt ok fmt 0.040s coverage: 91.3% of statements $ go test -coverpkg strconv fmt ok fmt 0.038s coverage: 64.9% of statements in strconv R=r CC=gobot, golang-dev https://golang.org/cl/10932045
-
Shenghou Ma authored
Fixes build for some slow FreeBSD/NetBSD/Darwin builder. R=golang-dev CC=golang-dev https://golang.org/cl/11207043
-
Russ Cox authored
Missed this in CL 10909045. TBR=golang-dev CC=golang-dev https://golang.org/cl/10803045
-
David Symonds authored
Fixes #5836. R=golang-dev, bradfitz, r, rsc CC=golang-dev https://golang.org/cl/10883045
-
Russ Cox authored
The current cas64 definition hard-codes the x86 behavior of updating *old with the new value when the cas fails. This is inconsistent with cas32 and casp. Make it consistent. This means that the cas64 uses will be epsilon less efficient than they might be, because they have to do an unnecessary memory load on x86. But so be it. Code clarity and consistency is more important. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/10909045
-
Russ Cox authored
I hate bash. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/11200043
-
Russ Cox authored
The static func named thread in issue5337.go's C snippet conflicts with the static func named thread in issue3350.go's C snippet. I don't know why (they're both static) but I also don't care, because -linkmode=internal only needs to be able to handle the cgo in the standard library, and it does. Change the test to avoid this problem. Fixes build (after run.bash is fixed to detect the breakage). R=minux.ma TBR=minux.ma CC=golang-dev https://golang.org/cl/11201043
-
Russ Cox authored
R=golang-dev, dave, r CC=golang-dev, nigeltao https://golang.org/cl/10713043
-
Russ Cox authored
STRINGSZ (200) is fine for lines generated by things like instruction dumps, but an error containing a couple file names can easily exceed that, especially on Macs with the ridiculous default $TMPDIR. R=ken2 CC=golang-dev https://golang.org/cl/11199043
-
Russ Cox authored
Fixes #5853. R=ken2 CC=golang-dev https://golang.org/cl/11104044
-
Paul Borman authored
The json package cheerfully would marshal type S struct { IP net.IP } but would give an error when unmarshalling. This change allows any type whose concrete type is a byte slice to be unmarshalled from a string. Fixes #5086. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/11161044
-
Alex Brainman authored
R=golang-dev, rsc CC=golang-dev https://golang.org/cl/11064044
-
- 11 Jul, 2013 12 commits
-
-
ChaiShushan authored
when the program is not main package, `go run x.go` can't return the link error message. so use `go run x.go` in instead `go build x.go`. Fixes #5865. R=golang-dev, adg CC=golang-dev https://golang.org/cl/11165043
-
Robert Griesemer authored
Fixes #5862. R=r CC=golang-dev https://golang.org/cl/11168043
-
Shenghou Ma authored
R=golang-dev CC=golang-dev https://golang.org/cl/11188043
-
Shenghou Ma authored
Fixes #3250. R=rsc CC=golang-dev https://golang.org/cl/10757044
-
Shenghou Ma authored
1. "int e;" is unused, generating "unused variable" error. 2. a->e was typed void *[2], but was accessed with *(int *)(a->e), this generated "dereferencing type-punned pointer will break strict-aliasing rules" error. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/11009043
-
Shenghou Ma authored
Update #5847 Summary: syscall: implement Sendfile for OpenBSD and NetBSD R=golang-dev, rsc, dave CC=golang-dev https://golang.org/cl/10980043
-
Shenghou Ma authored
R=golang-dev, rsc CC=golang-dev https://golang.org/cl/10981043
-
Dmitriy Vyukov authored
runtime.newproc/ready are deliberately sloppy about waking new M's, they only ensure that there is at least 1 spinning M. Currently to compensate for that, schedule() checks if the current P has local work and there are no spinning M's, it wakes up another one. It does not work if goroutines do not call schedule. With this change a spinning M wakes up another M when it finds work to do. It's also not ideal, but it fixes the underutilization. A proper check would require to know the exact number of runnable G's, but it's too expensive to maintain. Fixes #5586. This is reincarnation of cl/9776044 with the bug fixed. The bug was due to code added after cl/9776044 was created: if(tick - (((uint64)tick*0x4325c53fu)>>36)*61 == 0 && runtime·sched.runqsize > 0) { runtime·lock(&runtime·sched); gp = globrunqget(m->p, 1); runtime·unlock(&runtime·sched); } If M gets gp from global runq here, it does not reset m->spinning. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/10743044
-
ChaiShushan authored
R=golang-dev, rsc CC=golang-dev https://golang.org/cl/10855043
-
Dmitriy Vyukov authored
Currently it crashes as follows: fatal error: unknown pc ... goroutine 71698 [runnable]: runtime.racegoend() src/pkg/runtime/race.c:171 runtime.goexit() src/pkg/runtime/proc.c:1276 +0x9 created by runtime_test.testConcurrentReadsAfterGrowth src/pkg/runtime/map_test.go:264 +0x332 R=golang-dev, rsc CC=golang-dev https://golang.org/cl/10674047
-
Nigel Tao authored
R=r CC=andybons, golang-dev https://golang.org/cl/11148043
-
Russ Cox authored
If you compute the size by subtraction from the address of the next symbol, it helps to wait until the symbols have been sorted by address. R=golang-dev, r CC=golang-dev https://golang.org/cl/11143043
-
- 10 Jul, 2013 8 commits
-
-
Nigel Tao authored
R=r, andybons CC=andybons, golang-dev https://golang.org/cl/10977043
-
Robert Griesemer authored
R=khr CC=golang-dev https://golang.org/cl/11131043
-
Robert Griesemer authored
Instead, rely on the type checker. R=adonovan CC=golang-dev https://golang.org/cl/10826044
-
Andrew Gerrand authored
R=golang-dev, dsymonds, bradfitz CC=golang-dev https://golang.org/cl/11095043
-
Alex Brainman authored
Fixes #5783 R=golang-dev, r CC=golang-dev https://golang.org/cl/10956043
-
Robert Griesemer authored
The notion of a named type is crucial for the definition of type identity, assignability, definitions of methods. Explicitly introduce the notion with an extra sentence. Fixes #5682. R=r, rsc, iant CC=golang-dev https://golang.org/cl/11055043
-
Brad Fitzpatrick authored
R=golang-dev, adg CC=golang-dev https://golang.org/cl/11080043
-
Andrew Gerrand authored
Fixes #5843. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/11073043
-
- 09 Jul, 2013 5 commits
-
-
Rob Pike authored
Merging a couple of CLs into one, since they collided in my client and I'm lazy. 1) Fix up output in "go test -cover" case. We need to tell the testing package the name of the package being tested and the name of the package being covered. It can then sort out the report. 2) Filter out the _test.go files from coverage processing. We want to measure what the tests cover, not what's covered in the tests, The coverage for encoding/gob goes from 82.2% to 88.4%. There may be a cleaner way to do this - suggestions welcome - but ça suffit. Fixes #5810. R=rsc CC=golang-dev https://golang.org/cl/10868047
-
Robert Griesemer authored
Fixes #5787. R=r CC=golang-dev https://golang.org/cl/11057043
-
Nigel Tao authored
R=r, rsc, andybons CC=andybons, golang-dev https://golang.org/cl/10890045
-
Dave Cheney authored
Fix warning found by clang 3.3. R=rsc, r CC=golang-dev https://golang.org/cl/11022043
-
ChaiShushan authored
R=r CC=golang-dev https://golang.org/cl/10758044
-
- 08 Jul, 2013 1 commit
-
-
Andrew Gerrand authored
Fixes #5503. R=golang-dev, r CC=golang-dev https://golang.org/cl/10989043
-
- 07 Jul, 2013 1 commit
-
-
Shenghou Ma authored
CL 10869046 changed cmd/go to checkout master branch, so for "go get -u" to work, it must "git pull" instead of "git fetch". Added "--ff-only" so that it won't accidentally overwrite user changes. R=dsymonds CC=golang-dev https://golang.org/cl/10907043
-