- 07 Aug, 2013 5 commits
-
-
Ian Lance Taylor authored
The gc compiler only gives an error about fallthrough in a type switch if it has not given any errors in an earlier pass. Remove all functions in this test that use fallthrough in a type switch because they don't test anything useful and they cause gccgo to give unexpected errors. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/12614043
-
Keith Randall authored
We can then include this file in assembly to replace cryptic constants like "7" with meaningful constants like "(NOPROF|DUPOK|NOSPLIT)". Converting just pkg/runtime/asm*.s for now. Dropping NOPROF and DUPOK from lots of places where they aren't needed. More .s files to come in a subsequent changelist. A nonzero number in the textflag field now means "has not been converted yet". R=golang-dev, daniel.morsing, rsc, khr CC=golang-dev https://golang.org/cl/12568043
-
Alex Brainman authored
Fixes #6063 R=golang-dev, r, dave CC=dvyukov, golang-dev https://golang.org/cl/12586043
-
Josh Bleecher Snyder authored
HTTP/1.0 connections are closed implicitly, unless otherwise specified. Note that this change does not test or fix "request too large" responses. Reasoning: (a) it complicates tests and fixes, (b) they should be rare, and (c) this is just a minor wire optimization, and thus not really worth worrying about in this context. Fixes #5955. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/12435043
-
Brad Fitzpatrick authored
A response to a HEAD request is supposed to look the same as a response to a GET request, just without a body. HEAD requests are incredibly rare in the wild. The Go net/http package has so far treated HEAD requests specially: a Write on our default ResponseWriter returned ErrBodyNotAllowed, telling handlers that something was wrong. This was to optimize the fast path for HEAD requests, but: 1) because HEAD requests are incredibly rare, they're not worth having a fast path for. 2) Letting the http.Handler handle but do nop Writes is still very fast. 3) this forces ugly error handling into the application. e.g. https://code.google.com/p/go/source/detail?r=6f596be7a31e and related. 4) The net/http package nowadays does Content-Type sniffing, but you don't get that for HEAD. 5) The net/http package nowadays does Content-Length counting for small (few KB) responses, but not for HEAD. 6) ErrBodyNotAllowed was useless. By the time you received it, you had probably already done all your heavy computation and I/O to calculate what to write. So, this change makes HEAD requests like GET requests. We now count content-length and sniff content-type for HEAD requests. If you Write, it doesn't return an error. If you want a fast-path in your code for HEAD, you have to do it early and set all the response headers yourself. Just like before. If you choose not to Write in HEAD requests, be sure to set Content-Length if you know it. We won't write "Content-Length: 0" because you might've just chosen to not write (or you don't know your Content-Length in advance). Fixes #5454 R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/12583043
-
- 06 Aug, 2013 24 commits
-
-
Rob Pike authored
Leftovers from 11699043 R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/12558046
-
Rob Pike authored
Thanks to c.emil.hessman@gmail.com for pointing out the error. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/12572043
-
Rob Pike authored
If the padding is huge, we crashed by blowing the buffer. That's easy: make sure we have a big enough buffer by allocating in problematic cases. Zero padding floats was just wrong in general: the space would appear in the middle. Fixes #6044. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/12498043
-
Brad Fitzpatrick authored
Like existing Index, IndexRune, IndexHardN, etc. R=golang-dev, khr CC=golang-dev https://golang.org/cl/12486044
-
Keith Randall authored
They may call other NOSPLIT routines, and that might overflow the stack. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/12563043
-
Mikio Hara authored
This CL refactors the existing listenerSockaddr function into several methods on netFD. This is in preparation for runtime-integrated network pollster for BSD variants. Update #5199 R=golang-dev, dave, alex.brainman, dvyukov, remyoudompheng CC=golang-dev https://golang.org/cl/12023043
-
Rob Pike authored
Updates #6046. This CL just does maxstring and concatstring. There are other functions to fix but doing them a few at a time will help isolate any (unlikely) breakages these changes bring up in architectures I can't test myself. R=golang-dev, dave, iant CC=golang-dev https://golang.org/cl/12519044
-
Brad Fitzpatrick authored
I broke it with the darwin getwd attrlist stuff (0583e9d36dd). plan9 doesn't have syscall.ENOTSUP. It's in api/go1.txt as a symbol always available (not context-specific): pkg syscall, const ENOTSUP Errno ... but plan9 isn't considered by cmd/api, so it only looks universally available. Alternatively, we could add a fake ENOTSUP to plan9, but they were making efforts earlier to clean their syscall package, so I'd prefer not to dump more in it. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/12509044
-
Dustin Sallings authored
This change replaces the hard-coded switch on compression method in zipfile reader and writer with a map into which users can register compressors and decompressors in their init()s. R=golang-dev, bradfitz, rsc CC=golang-dev https://golang.org/cl/12421043
-
Brad Fitzpatrick authored
Generated by addca. R=gobot CC=golang-dev https://golang.org/cl/12557043
-
Russ Cox authored
NetBSD and OpenBSD are broken like OS X is. Good to know. Drop required count from avg/2 to avg/3, because the Plan 9 builder just barely missed avg/2 in one of its runs. R=golang-dev, dvyukov CC=golang-dev https://golang.org/cl/12548043
-
Dmitriy Vyukov authored
It turned out that change 12413043 did not break any builders. So let's lock this in. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/12545043
-
Mikio Hara authored
Looks like latest FreeBSD doesn't set address family identifer for RTAX_NETMASK stuff; probably RTAX_GENMASK too, not confirmed. This CL tries to identify address families by using the length of each socket address if possible. The issue is confirmed on FreeBSD 9.1. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/12332043
-
ChaiShushan authored
R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/12508043
-
Mikio Hara authored
Unlike the existing net package own pollster, runtime-integrated network pollster on BSD variants, actually kqueue, requires a socket that has beed passed to syscall.Listen previously for a stream listener. This CL separates pollDesc.Init (actually runtime_pollOpen) from newFD to allow control of each state of sockets and adds init method to netFD instead. Upcoming CLs will rearrange the call order of runtime-integrated pollster and syscall functions like the following; - For dialers that open active connections, runtime_pollOpen will be called in between syscall.Bind and syscall.Connect. - For stream listeners that open passive stream connections, runtime_pollOpen will be called just after syscall.Listen. - For datagram listeners that open datagram connections, runtime_pollOpen will be called just after syscall.Bind. This is in preparation for runtime-integrated network pollster for BSD variants. Update #5199 R=dvyukov, alex.brainman, minux.ma CC=golang-dev https://golang.org/cl/8608044
-
David du Colombier authored
The current failures were: fatal error: runtime: stack split during syscall goroutine 1 [stack split]: runtime.findnull(0x105a9080) /usr/go/src/pkg/runtime/string.goc:14 fp=0x305aefb8 runtime: unexpected return pc for runtime.errstr called from 0x80 runtime.errstr() /usr/go/src/pkg/runtime/sys_plan9_386.s:196 +0x2f fp=0x305aefc8 fatal error: runtime: stack split during syscall goroutine 2 [stack split]: runtime.nanotime(0x305bff3c) /usr/go/src/pkg/runtime/time_plan9_386.c:9 fp=0x305bff34 notetsleep(0x305bff9c, 0xf8475800, 0xd, 0x0, 0x0, ...) /usr/go/src/pkg/runtime/lock_sema.c:195 +0x87 fp=0x305bff48 runtime.notetsleepg(0x305bff9c, 0xf8475800, 0xd) /usr/go/src/pkg/runtime/lock_sema.c:266 +0xa4 fp=0x305bff68 runtime.MHeap_Scavenger() /usr/go/src/pkg/runtime/mheap.c:463 +0xc2 fp=0x305bffd0 runtime.goexit() /usr/go/src/pkg/runtime/proc.c:1332 fp=0x305bffd4 created by runtime.main /usr/go/src/pkg/runtime/proc.c:168 R=golang-dev, rsc CC=golang-dev https://golang.org/cl/12128043
-
Brad Fitzpatrick authored
On 10.6, OS X's fcntl returns EBADF instead of EINVAL. R=golang-dev, iant, dave CC=golang-dev https://golang.org/cl/12493043
-
Rob Pike authored
Update #6046. This CL just does findnull and findnullw. There are other functions to fix but doing them a few at a time will help isolate any (unlikely) breakages these changes bring up in architectures I can't test myself. R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/12520043
-
Dmitriy Vyukov authored
R=alex.brainman CC=golang-dev https://golang.org/cl/12502044
-
Dmitriy Vyukov authored
Embed all data necessary for read/write operations directly into netFD. benchmark old ns/op new ns/op delta BenchmarkTCP4Persistent 27669 23341 -15.64% BenchmarkTCP4Persistent-2 18173 12558 -30.90% BenchmarkTCP4Persistent-4 10390 7319 -29.56% This change will intentionally break all builders to see how many allocations they do per read/write. This will be fixed soon afterwards. R=golang-dev, alex.brainman CC=golang-dev https://golang.org/cl/12413043
-
Dmitriy Vyukov authored
gcpc/gcsp are used by GC in similar situation. gcpc/gcsp are also more stable than gp->sched, because gp->sched is mutated by entersyscall/exitsyscall in morestack and mcall. So it has higher chances of being inconsistent. Also, rename gcpc/gcsp to syscallpc/syscallsp. This is the same as reverted change 12250043 with save marked as textflag 7. The problem was that if save calls morestack, then subsequent lessstack spoils g->sched.pc/sp. And that bad values were remembered in g->syscallpc/sp. Entersyscallblock had the same problem, but it was never triggered to date. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/12478043
-
Kyle Lemons authored
R=golang-dev, r CC=golang-dev https://golang.org/cl/12403043
-
Keith Randall authored
Basically a partial rollback of 12053043 until I can figure out what is really going on. Fixes bug 6051. R=golang-dev CC=golang-dev https://golang.org/cl/12496043
-
Brad Fitzpatrick authored
R=golang-dev, r CC=golang-dev https://golang.org/cl/12490043
-
- 05 Aug, 2013 11 commits
-
-
Russ Cox authored
This means that pprof will no longer report profiles on OS X. That's unfortunate, but the profiles were often wrong and, worse, it was difficult to tell whether the profile was wrong or not. The workarounds were making the scheduler more complex, possibly caused a deadlock (see issue 5519), and did not actually deliver reliable results. It may be possible for adventurous users to apply a patch to their kernels to get working results, or perhaps having no results will encourage someone to do the work of creating a profiling thread like on Windows. Issue 6047 has details. Fixes #5519. Fixes #6047. R=golang-dev, bradfitz, r CC=golang-dev https://golang.org/cl/12429045
-
Brad Fitzpatrick authored
Uglier. ««« original CL description all: use strings.IndexByte instead of Index where possible R=golang-dev, khr CC=golang-dev https://golang.org/cl/12486043 »»» R=golang-dev CC=golang-dev https://golang.org/cl/12485044
-
Brad Fitzpatrick authored
R=golang-dev, khr CC=golang-dev https://golang.org/cl/12486043
-
Pieter Droogendijk authored
Fixes #5372. Fixes #5577. R=gri, rsc, bradfitz, r CC=golang-dev https://golang.org/cl/12265043
-
Brad Fitzpatrick authored
This means that in the common case (modern kernel), we only make 1 system call to dup instead of two, and we also avoid grabbing the syscall.ForkLock. R=golang-dev, iant CC=golang-dev https://golang.org/cl/12476043
-
Keith Randall authored
you do reflect.call with too big an argument list. Not worth the hassle. Fixes #6023 Fixes #6033 R=golang-dev, bradfitz, dave CC=golang-dev https://golang.org/cl/12485043
-
Brad Fitzpatrick authored
Fixes #3751 R=golang-dev, khr CC=golang-dev https://golang.org/cl/12483043
-
Dave Cheney authored
Fixes #4963. Sets the append crossover to 0 on intel platforms. Results for linux/amd64 Core i5 SNB benchmark old ns/op new ns/op delta BenchmarkAppend 102 104 +1.96% BenchmarkAppend1Byte 10 11 +0.92% BenchmarkAppend4Bytes 15 11 -28.10% BenchmarkAppend7Bytes 17 12 -32.58% BenchmarkAppend8Bytes 18 12 -36.17% BenchmarkAppend15Bytes 24 11 -55.02% BenchmarkAppend16Bytes 25 11 -56.03% BenchmarkAppend32Bytes 11 12 +4.31% BenchmarkAppendStr1Byte 8 9 +13.99% BenchmarkAppendStr4Bytes 11 9 -17.52% BenchmarkAppendStr8Bytes 14 9 -35.70% BenchmarkAppendStr16Bytes 21 9 -55.19% BenchmarkAppendStr32Bytes 10 10 -5.66% BenchmarkAppendSpecialCase 49 52 +7.96% Results for linux/386 Atom(TM) CPU 330 @ 1.60GHz benchmark old ns/op new ns/op delta BenchmarkAppend 219 218 -0.46% BenchmarkAppend1Byte 75 72 -3.44% BenchmarkAppend4Bytes 92 73 -19.87% BenchmarkAppend7Bytes 108 74 -31.20% BenchmarkAppend8Bytes 116 74 -35.95% BenchmarkAppend15Bytes 162 77 -52.22% BenchmarkAppend16Bytes 169 77 -54.20% BenchmarkAppend32Bytes 88 86 -2.38% BenchmarkAppendStr1Byte 57 59 +3.32% BenchmarkAppendStr4Bytes 72 59 -17.40% BenchmarkAppendStr8Bytes 92 60 -34.70% BenchmarkAppendStr16Bytes 141 63 -54.89% BenchmarkAppendStr32Bytes 75 73 -2.64% BenchmarkAppendSpecialCase 270 270 +0.00% R=golang-dev, r CC=golang-dev https://golang.org/cl/12440044
-
Keith Randall authored
For normal slices a[i:j] we're generating 3 bounds checks: j<={len(string),cap(slice)}, j<=j (!), and i<=j. Somehow snuck in as part of the [i:j:k] implementation where the second check does something. Remove the second check when we don't need it. R=rsc, r CC=golang-dev https://golang.org/cl/12311046
-
Rémy Oudompheng authored
Update #5910. R=golang-dev, daniel.morsing, rsc CC=golang-dev https://golang.org/cl/11373044
-
Russ Cox authored
While we're here, add a test for the same functionality in gzip, which was already implemented, and add bzip2 CRC checks. Fixes #5772. R=golang-dev, r CC=golang-dev https://golang.org/cl/12387044
-