]>
Cypherpunks repositories - gostls13.git/log
Jonathan Rudenberg [Mon, 8 Apr 2013 02:04:50 +0000 (12:04 +1000)]
doc: fix typos in go1.1.html
R=golang-dev, adg, adg
CC=golang-dev
https://golang.org/cl/
8488047
Rob Pike [Mon, 8 Apr 2013 01:42:47 +0000 (18:42 -0700)]
reflect: document the unreliability of StringHeader and SliceHeader
R=golang-dev, adg, dvyukov
CC=golang-dev
https://golang.org/cl/
8494045
Andrew Gerrand [Mon, 8 Apr 2013 01:41:01 +0000 (11:41 +1000)]
doc: document go1.1 build tag
Fixes #5235.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
8426048
Dmitriy Vyukov [Mon, 8 Apr 2013 01:19:16 +0000 (18:19 -0700)]
runtime: fix race on hashmap flags field
Use atomic operations on flags field to make sure we aren't
losing a flag update during parallel map operations.
R=golang-dev, dave, r
CC=golang-dev
https://golang.org/cl/
8377046
Alexei Sholik [Sun, 7 Apr 2013 23:50:23 +0000 (16:50 -0700)]
go/ast: fix typo in Fprint documentation
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
8499043
David Symonds [Sun, 7 Apr 2013 21:59:47 +0000 (07:59 +1000)]
undo CL
8363045 /
a3ce42f9748b
It changes an exported API, and breaks the build.
««« original CL description
reflect: use unsafe.Pointer in StringHeader and SliceHeader
Relates to issue 5193.
R=r
CC=golang-dev
https://golang.org/cl/
8363045
»»»
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
8357051
Jan Ziak [Sun, 7 Apr 2013 21:33:40 +0000 (23:33 +0200)]
reflect: use unsafe.Pointer in StringHeader and SliceHeader
Relates to issue 5193.
R=r
CC=golang-dev
https://golang.org/cl/
8363045
Brad Fitzpatrick [Sun, 7 Apr 2013 18:56:15 +0000 (11:56 -0700)]
test: fix flaky NaN-key map complexity test
Don't measure wall time in map.go. Keep it portable
and only test NaN, but not time.
Move time tests to mapnan.go and only measure user CPU time,
not wall time. It builds on Darwin and Linux, the primary
platforms where people hack on the runtime & in particular
maps. The runtime is shared, though, so we don't need it to
run on all of the platforms.
Fixes flaky build failures like:
http://build.golang.org/log/
ba67eceefdeaa1142cb6c990a62fa3ffd8fd73f8
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
8479043
Albert Strasheim [Sun, 7 Apr 2013 18:37:37 +0000 (11:37 -0700)]
runtime, runtime/debug, runtime/race: deflake tests
R=golang-dev, dvyukov, bradfitz
CC=golang-dev
https://golang.org/cl/
8366044
Albert Strasheim [Sun, 7 Apr 2013 18:16:15 +0000 (11:16 -0700)]
lib9: handle empty TMPDIR more gracefully.
Before, an empty TMPDIR would lead to:
cannot create <nil>/go.o: No such file or directory
R=golang-dev, iant, dave, bradfitz
CC=golang-dev
https://golang.org/cl/
8355045
Albert Strasheim [Sun, 7 Apr 2013 08:37:32 +0000 (18:37 +1000)]
runtime: gofmt -s
R=golang-dev, iant, dave
CC=golang-dev
https://golang.org/cl/
8253045
Dmitriy Vyukov [Sun, 7 Apr 2013 05:27:54 +0000 (22:27 -0700)]
runtime: fix deadlock in network poller
The invariant is that there must be at least one running P or a thread polling network.
It was broken.
Fixes #5216.
R=golang-dev, bradfitz, r
CC=golang-dev
https://golang.org/cl/
8459043
Ian Lance Taylor [Sun, 7 Apr 2013 03:18:15 +0000 (20:18 -0700)]
runtime: make CgoMal alloc field void*
This makes it an unsafe.Pointer in Go so the garbage collector
will treat it as a pointer to untyped data, not a pointer to
bytes.
R=golang-dev, dvyukov
CC=golang-dev
https://golang.org/cl/
8286045
Dmitriy Vyukov [Sun, 7 Apr 2013 03:09:02 +0000 (20:09 -0700)]
runtime: change Note from union to struct
Unions can break precise GC.
Update #5193.
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/
8362046
Dmitriy Vyukov [Sun, 7 Apr 2013 03:07:07 +0000 (20:07 -0700)]
runtime: change Lock from union to struct
Unions can break precise GC.
Update #5193.
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/
8457043
Dmitriy Vyukov [Sun, 7 Apr 2013 03:02:49 +0000 (20:02 -0700)]
runtime: replace unions with structs
Unions can break precise GC.
Update #5193.
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/
8456043
Dmitriy Vyukov [Sun, 7 Apr 2013 03:02:03 +0000 (20:02 -0700)]
runtime: replace union in MHeap with a struct
Unions break precise GC.
Update #5193.
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/
8368044
Dmitriy Vyukov [Sun, 7 Apr 2013 03:01:28 +0000 (20:01 -0700)]
runtime: reset dangling typed pointer
+untype it because it can point to different types
Update #5193.
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/
8454043
Dmitriy Vyukov [Sun, 7 Apr 2013 03:00:45 +0000 (20:00 -0700)]
runtime: reset typed dangling pointer
If for whatever reason seh points into Go heap region,
the dangling pointer will cause memory corruption during GC.
Update #5193.
R=golang-dev, alex.brainman, iant
CC=golang-dev
https://golang.org/cl/
8402045
Jonathan Rudenberg [Sat, 6 Apr 2013 20:11:12 +0000 (04:11 +0800)]
misc: update zsh completion
R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/
8437043
John Howard Palevich [Sat, 6 Apr 2013 20:06:11 +0000 (04:06 +0800)]
cmd/go: fix capitalization of Bitbucket, document Git support
Fixes #5226.
R=golang-dev, minux.ma, iant
CC=golang-dev
https://golang.org/cl/
8320044
Ian Lance Taylor [Sat, 6 Apr 2013 14:13:31 +0000 (07:13 -0700)]
A+C: John Howard Palevich (individual CLA)
Generated by addca.
R=gobot
CC=golang-dev
https://golang.org/cl/
8441045
Jonathan Rudenberg [Fri, 5 Apr 2013 22:23:03 +0000 (15:23 -0700)]
net/http: fix typo in ErrMissingBoundary
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
8429045
Rémy Oudompheng [Fri, 5 Apr 2013 19:24:07 +0000 (21:24 +0200)]
cmd/gc: fix Offsetof computation.
The offset of an embedded field s.X must be relative to s
and not to the implicit s.Field of which X is a direct field.
Moreover, no indirections may happen on the path.
Fixes #4909.
R=nigeltao, ality, daniel.morsing, iant, gri, r
CC=golang-dev
https://golang.org/cl/
8287043
Volker Dobler [Fri, 5 Apr 2013 02:43:18 +0000 (13:43 +1100)]
testing: structure package documentation
Makes finding the relevant information much easier.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/
8353045
Brad Fitzpatrick [Fri, 5 Apr 2013 00:04:18 +0000 (17:04 -0700)]
strconv: remove some test TODOs and adjust malloc limits lower
These no longer allocate.
R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/
8340047
Carl Shapiro [Thu, 4 Apr 2013 21:18:52 +0000 (14:18 -0700)]
runtime: use a distinct pattern to mark free blocks in need of zeroing
R=golang-dev, dvyukov, khr, cshapiro
CC=golang-dev
https://golang.org/cl/
8392043
Kamil Kisiel [Thu, 4 Apr 2013 21:04:02 +0000 (08:04 +1100)]
godoc: enable visibility of element linked from URL hash
Expands the example when visiting a URL such as
http://golang.org/pkg/net/http/#example_Hijacker
Fixes #5212.
R=golang-dev, bradfitz, adg
CC=golang-dev
https://golang.org/cl/
8378043
Brad Fitzpatrick [Thu, 4 Apr 2013 20:40:26 +0000 (13:40 -0700)]
net/http: remove some obsolete TODOs
We've decided to leave logging to third-parties (there are too
many formats), which others have done.
And we can't change the behavior of the various response
fields at this point anyway. Plus I argue they're correct and
match their documention.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
8391043
Brad Fitzpatrick [Thu, 4 Apr 2013 20:40:15 +0000 (13:40 -0700)]
net/http: better stand-alone FileServer doc example
Motivated by a deletion in the wiki, which had a better
example.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
8288045
Carl Shapiro [Thu, 4 Apr 2013 18:42:01 +0000 (11:42 -0700)]
cmd/gc: fix a typo
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/
8379043
Andriy Lytvynov [Thu, 4 Apr 2013 18:11:54 +0000 (11:11 -0700)]
doc/code.html: fix typos
Fixed example program's output to match program's code.
Fixes #5204.
R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/
8365043
Rob Pike [Thu, 4 Apr 2013 18:11:45 +0000 (11:11 -0700)]
A+C: Andriy Lytvynov (individual CLA)
Generated by addca.
R=gobot
CC=golang-dev
https://golang.org/cl/
8377043
Duncan Holm [Thu, 4 Apr 2013 05:36:10 +0000 (16:36 +1100)]
doc: use the already defined GOPATH in PATH
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/
8248044
Andrew Gerrand [Thu, 4 Apr 2013 05:35:29 +0000 (16:35 +1100)]
A+C: Duncan Holm (individual CLA)
Generated by addca.
R=gobot
CC=golang-dev
https://golang.org/cl/
8357043
Dave Cheney [Thu, 4 Apr 2013 05:13:29 +0000 (16:13 +1100)]
doc/go1.1.html: mention cgo and cross compilation
R=r, minux.ma, bradfitz
CC=golang-dev
https://golang.org/cl/
8304043
Andrew Gerrand [Thu, 4 Apr 2013 05:10:30 +0000 (16:10 +1100)]
doc: mention availability of race detector in go1.1 doc
R=r
CC=golang-dev
https://golang.org/cl/
8301044
Andrew Gerrand [Thu, 4 Apr 2013 03:46:54 +0000 (14:46 +1100)]
misc/dist: only build race toolchain where available, fix file upload
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/
8343046
Andrew Gerrand [Thu, 4 Apr 2013 03:21:19 +0000 (14:21 +1100)]
misc/dist: add -version flag to override version name
Also, don't build the tour when making the source distribution.
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/
8354043
Andrew Gerrand [Thu, 4 Apr 2013 02:51:20 +0000 (13:51 +1100)]
untag go1.1beta1
R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/
8342046
Andrew Gerrand [Thu, 4 Apr 2013 02:41:14 +0000 (13:41 +1100)]
tag go1.1beta1
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/
8343045
Anthony Martin [Thu, 4 Apr 2013 01:23:43 +0000 (18:23 -0700)]
cmd/nm: don't add filename elements for m symbols
The compilers used to generate only one 'm' symbol
to record the stack frame size for each function.
In cmd/nm, the 'm' and 'f' symbols are handled in
the same switch case with a special exception for
the symbol described above called ".frame".
Now that the compilers emit additional 'm' symbols
for precise garbage collection of the stack, the
current logic is incorrect. cmd/nm will attempt to
interpret these new 'm' symbols as 'f' symbols and
add them to the file name index table.
This fails with an out-of-memory condition when
zenter encounters an 'm' symbol with a very large
value (usually the .args symbol indicating a
variadic NOSPLIT function).
R=iant
CC=dave, gobot, golang-dev, rsc
https://golang.org/cl/
7962045
Andrew Gerrand [Thu, 4 Apr 2013 01:07:53 +0000 (12:07 +1100)]
misc/dist: don't ship race-enabled commands
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
8350044
Jonathan Rudenberg [Thu, 4 Apr 2013 01:04:35 +0000 (12:04 +1100)]
cmd/go: run main package when no files are listed
Fixes 5164.
R=golang-dev, iant, adg
CC=golang-dev
https://golang.org/cl/
8119049
Dmitriy Vyukov [Thu, 4 Apr 2013 00:03:42 +0000 (17:03 -0700)]
doc: fix typos in go1.1
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
8342044
Alexei Sholik [Wed, 3 Apr 2013 23:44:03 +0000 (16:44 -0700)]
doc: fix typos and trailing spaces
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/
8285044
Robert Griesemer [Wed, 3 Apr 2013 23:41:53 +0000 (16:41 -0700)]
A+C: added Alexei Sholik (individual CLA)
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
8351043
Dmitriy Vyukov [Wed, 3 Apr 2013 22:11:34 +0000 (09:11 +1100)]
runtime: fix data/bss shadow memory mapping for race detector
Fixes #5175.
Race detector runtime expects values passed to MapShadow() to be page-aligned,
because they are used in mmap() call. If they are not aligned mmap() trims
either beginning or end of the mapping.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
8325043
Andrew Gerrand [Wed, 3 Apr 2013 21:56:11 +0000 (08:56 +1100)]
doc: mention godoc.org in "How to Write Go Code"
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
8344043
Andrew Gerrand [Wed, 3 Apr 2013 21:19:24 +0000 (08:19 +1100)]
doc: simplify How to write Go code article
This version just tells you what to do, rather
than trying to teach you how it all works.
Should be much better for newcomers.
R=dave, gary.burd, alcosholik, r
CC=golang-dev
https://golang.org/cl/
8247044
Andrew Gerrand [Wed, 3 Apr 2013 21:06:29 +0000 (08:06 +1100)]
misc/dist: include race detector packages in binary distributions
Fixes #4596.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
8327045
Rob Pike [Wed, 3 Apr 2013 20:56:24 +0000 (13:56 -0700)]
doc: link the race detector document into the release notes
Also:
- put GORACE into the go env command
- do minor housekeeping on the race detector article
Fixes #4995.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/
8319044
Rob Pike [Wed, 3 Apr 2013 20:29:06 +0000 (13:29 -0700)]
doc/go1.1.html: document the state of gccgo
Fixes #5053.
R=adg, iant
CC=golang-dev
https://golang.org/cl/
8337043
Robert Griesemer [Wed, 3 Apr 2013 20:24:32 +0000 (13:24 -0700)]
math/big: minor cleanups
- comment fixes
- s/z/x/ in (*rat).Float64 to match convention for functions
returning a non-*Rat
- minor test output tweaking
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
8327044
James Tucker [Wed, 3 Apr 2013 18:13:40 +0000 (11:13 -0700)]
database/sql: improve standard deviation response time under high concurrency
See https://github.com/raggi/go-and-java for runtime benchmark.
The patch reduces the amount of map key search, moving connection oriented
variables onto the connection structs.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
8092045
Brad Fitzpatrick [Wed, 3 Apr 2013 18:12:25 +0000 (11:12 -0700)]
C: add James Tucker (Google CLA)
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/
8253044
Rob Pike [Wed, 3 Apr 2013 17:59:36 +0000 (10:59 -0700)]
doc/go1.1.html: document os/signal.Stop
Also fix the sort order of the laundry list.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
8325044
Brad Fitzpatrick [Wed, 3 Apr 2013 17:52:20 +0000 (10:52 -0700)]
net/smtp: allow PLAIN auth when advertised
The smtp package originally allowed PLAIN whenever, but then
the TLS check was added for paranoia, but it's too paranoid:
it prevents using PLAIN auth even from localhost to localhost
when the server advertises PLAIN support.
This CL also permits the client to send PLAIN if the server
advertises it.
Fixes #5184
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
8279043
Brad Fitzpatrick [Wed, 3 Apr 2013 17:41:28 +0000 (10:41 -0700)]
api: update next.txt.
Update #4871
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
8287044
Rob Pike [Wed, 3 Apr 2013 17:40:33 +0000 (10:40 -0700)]
doc/go1.1.html: state that the heap is bigger on 64-bit machines
Be deliberately vague, since the precise details should not be depended upon.
Fixes #5155.
R=golang-dev, gri, adg
CC=golang-dev
https://golang.org/cl/
8283044
Rob Pike [Wed, 3 Apr 2013 17:40:04 +0000 (10:40 -0700)]
bufio: make it a little clearer how the default Scanner splits lines.
Just commentary, no semantic change.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
8329043
Brad Fitzpatrick [Wed, 3 Apr 2013 17:31:12 +0000 (10:31 -0700)]
net/http: don't allocate 0-byte io.LimitedReaders for GET requests
Save an allocation per GET request and don't call io.LimitedReader(r, 0)
just to read 0 bytes. There's already an eofReader global variable
for when we just want a non-nil io.Reader to immediately EOF.
(Sorry, I know Rob told me to stop, but I was bored on the plane and
wrote this before I received the recent "please, really stop" email.)
benchmark old ns/op new ns/op delta
BenchmarkServerHandlerTypeLen 13888 13279 -4.39%
BenchmarkServerHandlerNoLen 12912 12229 -5.29%
BenchmarkServerHandlerNoType 13348 12632 -5.36%
BenchmarkServerHandlerNoHeader 10911 10261 -5.96%
benchmark old allocs new allocs delta
BenchmarkServerHandlerTypeLen 20 19 -5.00%
BenchmarkServerHandlerNoLen 18 17 -5.56%
BenchmarkServerHandlerNoType 18 17 -5.56%
BenchmarkServerHandlerNoHeader 13 12 -7.69%
benchmark old bytes new bytes delta
BenchmarkServerHandlerTypeLen 1913 1878 -1.83%
BenchmarkServerHandlerNoLen 1878 1843 -1.86%
BenchmarkServerHandlerNoType 1878 1844 -1.81%
BenchmarkServerHandlerNoHeader 1085 1051 -3.13%
Fixes #5188
R=golang-dev, adg, r
CC=golang-dev
https://golang.org/cl/
8297044
Rémy Oudompheng [Wed, 3 Apr 2013 15:30:20 +0000 (08:30 -0700)]
bytes: don't leave mprotect-ed pages after unsafe test.
Fixes inscrutable GC faults during testing.
R=golang-dev, bradfitz, dave, fullung
CC=golang-dev
https://golang.org/cl/
8300044
Robert Griesemer [Wed, 3 Apr 2013 14:41:26 +0000 (07:41 -0700)]
go/parser: ParseExpr must accept type expressions
My old code was trying to be too smart.
Also: Slightly better error message format
for gofmt -r pattern errors.
Fixes #4406.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/
8267045
Andrew Gerrand [Wed, 3 Apr 2013 09:32:50 +0000 (20:32 +1100)]
A+C: zorion arrizabalaga (individual CLA)
Generated by addca.
R=gobot
CC=golang-dev
https://golang.org/cl/
8305043
Dave Cheney [Wed, 3 Apr 2013 08:13:37 +0000 (19:13 +1100)]
go/build: disable cgo when cross compiling
Fixes #5141.
R=golang-dev, minux.ma, ality, bradfitz
CC=golang-dev
https://golang.org/cl/
8134043
Rémy Oudompheng [Wed, 3 Apr 2013 06:18:30 +0000 (08:18 +0200)]
cmd/gc: be more tolerant with recursive types when checking map types.
A nested TFORW type would push algtype1 into an impossible case.
Fixes #5125.
R=golang-dev, daniel.morsing
CC=golang-dev
https://golang.org/cl/
8213043
Robert Griesemer [Wed, 3 Apr 2013 06:17:37 +0000 (23:17 -0700)]
spec: Go has no 'reference types'
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
8288044
Dave Cheney [Wed, 3 Apr 2013 05:49:17 +0000 (16:49 +1100)]
doc/go1.1.html: additional tweaks
R=r, adg, minux.ma
CC=golang-dev
https://golang.org/cl/
8250043
Andrew Gerrand [Wed, 3 Apr 2013 04:59:17 +0000 (15:59 +1100)]
doc: add prominent download button to getting started page
Also remove the introduction, which says what the rest of the
page says anyway.
Fixes #5182.
R=golang-dev, kamil.kisiel, r
CC=golang-dev
https://golang.org/cl/
8281044
Brad Fitzpatrick [Wed, 3 Apr 2013 03:58:25 +0000 (20:58 -0700)]
runtime: avoid hashing strings until needed in single-bucket maps
This changes the map lookup behavior for string maps with 2-8 keys.
There was already previously a fastpath for 0 items and 1 item.
Now, if a string-keyed map has <= 8 items, first check all the
keys for length first. If only one has the right length, then
just check it for equality and avoid hashing altogether. Once
the map has more than 8 items, always hash like normal.
I don't know why some of the other non-string map benchmarks
got faster. This was with benchtime=2s, multiple times. I haven't
anything else getting slower, though.
benchmark old ns/op new ns/op delta
BenchmarkHashStringSpeed 37 34 -8.20%
BenchmarkHashInt32Speed 32 29 -10.67%
BenchmarkHashInt64Speed 31 27 -12.82%
BenchmarkHashStringArraySpeed 105 99 -5.43%
BenchmarkMegMap 274206 255153 -6.95%
BenchmarkMegOneMap 27 23 -14.80%
BenchmarkMegEqMap 148332 116089 -21.74%
BenchmarkMegEmptyMap 4 3 -12.72%
BenchmarkSmallStrMap 22 22 -0.89%
BenchmarkMapStringKeysEight_32 42 23 -43.71%
BenchmarkMapStringKeysEight_64 55 23 -56.96%
BenchmarkMapStringKeysEight_1M 279688 24 -99.99%
BenchmarkIntMap 16 15 -10.18%
BenchmarkRepeatedLookupStrMapKey32 40 37 -8.15%
BenchmarkRepeatedLookupStrMapKey1M 287918 272980 -5.19%
BenchmarkNewEmptyMap 156 130 -16.67%
R=golang-dev, khr
CC=golang-dev
https://golang.org/cl/
7641057
Brad Fitzpatrick [Wed, 3 Apr 2013 00:55:49 +0000 (17:55 -0700)]
runtime: new map tests and benchmarks
Also, move an existing benchmark from map_test.go to
mapspeed_test.go.
R=golang-dev, khr
CC=golang-dev
https://golang.org/cl/
8294043
Rob Pike [Tue, 2 Apr 2013 23:49:45 +0000 (16:49 -0700)]
lib/time: update time zone to IANA version 2013b
Update #4553.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
8293043
Brad Fitzpatrick [Tue, 2 Apr 2013 23:27:23 +0000 (16:27 -0700)]
net/http: fewer allocations in chunkWriter.WriteHeader
It was unnecessarily cloning and then mutating a map that had
a very short lifetime (just that function).
No new tests, because they were added in revision
833bf2ef1527
(TestHeaderToWire). The benchmarks below are from the earlier
commit, revision
52e3407d .
I noticed this inefficiency when reviewing a change Peter Buhr
is looking into, which will also use these benchmarks.
benchmark old ns/op new ns/op delta
BenchmarkServerHandlerTypeLen 12547 12325 -1.77%
BenchmarkServerHandlerNoLen 12466 11167 -10.42%
BenchmarkServerHandlerNoType 12699 11800 -7.08%
BenchmarkServerHandlerNoHeader 11901 9210 -22.61%
benchmark old allocs new allocs delta
BenchmarkServerHandlerTypeLen 21 20 -4.76%
BenchmarkServerHandlerNoLen 20 18 -10.00%
BenchmarkServerHandlerNoType 20 18 -10.00%
BenchmarkServerHandlerNoHeader 17 13 -23.53%
benchmark old bytes new bytes delta
BenchmarkServerHandlerTypeLen 1930 1913 -0.88%
BenchmarkServerHandlerNoLen 1912 1879 -1.73%
BenchmarkServerHandlerNoType 1912 1878 -1.78%
BenchmarkServerHandlerNoHeader 1491 1086 -27.16%
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/
8268046
Keith Randall [Tue, 2 Apr 2013 23:26:15 +0000 (16:26 -0700)]
runtime: Implement faster equals for strings and bytes.
(amd64)
benchmark old ns/op new ns/op delta
BenchmarkEqual0 16 6 -63.15%
BenchmarkEqual9 22 7 -65.37%
BenchmarkEqual32 36 9 -74.91%
BenchmarkEqual4K 2187 120 -94.51%
benchmark old MB/s new MB/s speedup
BenchmarkEqual9 392.22 1134.38 2.89x
BenchmarkEqual32 866.72 3457.39 3.99x
BenchmarkEqual4K 1872.73 33998.87 18.15x
(386)
benchmark old ns/op new ns/op delta
BenchmarkEqual0 16 5 -63.85%
BenchmarkEqual9 22 7 -67.84%
BenchmarkEqual32 34 12 -64.94%
BenchmarkEqual4K 2196 113 -94.85%
benchmark old MB/s new MB/s speedup
BenchmarkEqual9 405.81 1260.18 3.11x
BenchmarkEqual32 919.55 2631.21 2.86x
BenchmarkEqual4K 1864.85 36072.54 19.34x
Update #3751
R=bradfitz, r, khr, dave, remyoudompheng, fullung, minux.ma, ality
CC=golang-dev
https://golang.org/cl/
8056043
Brad Fitzpatrick [Tue, 2 Apr 2013 22:42:06 +0000 (15:42 -0700)]
net/http: new server Handler benchmarks
For all the Content-Type & Content-Length cases.
R=golang-dev, pabuhr
CC=golang-dev
https://golang.org/cl/
8280046
David Symonds [Tue, 2 Apr 2013 21:26:08 +0000 (08:26 +1100)]
cmd/gc: preserve safe annotation of package def.
A package file may begin as either "package foo" or
"package foo safe". The latter is relevant when using -u.
https://golang.org/cl/
6903059 resulted in the distinction
being dropped when a package was read for the second or later time.
This CL records whether that "safe" tag was present,
and includes it in the dummy statement generated for the lexer.
R=golang-dev, r, minux.ma, daniel.morsing, iant
CC=golang-dev
https://golang.org/cl/
8255044
Carl Shapiro [Tue, 2 Apr 2013 20:45:56 +0000 (13:45 -0700)]
runtime: fix a comment regarding default floating point precision
The expected precision setting for the x87 on Win32 is 53-bit
but MinGW resets the floating point unit to 64-bit. Win32
object code generally expects values to be rounded to double,
not double extended, precision.
R=golang-dev, khr
CC=golang-dev
https://golang.org/cl/
8175044
Brad Fitzpatrick [Tue, 2 Apr 2013 20:24:16 +0000 (13:24 -0700)]
net: delete DialOpt and DialOption; add struct Dialer
Per discussions on golang-nuts and golang-dev:
"Some concerns with DialOpt"
https://groups.google.com/d/msg/golang-nuts/Hfh9aqhXyUw/W3uYi8lOdKcJ
https://groups.google.com/d/msg/golang-dev/37omSQeWv4Y/KASGIfPpXh0J
R=golang-dev, google, r
CC=golang-dev
https://golang.org/cl/
8274043
Robert Griesemer [Tue, 2 Apr 2013 20:18:32 +0000 (13:18 -0700)]
cmd/gofmt: handle ... in rewrite of calls
Fixes #5059.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
8284043
Shenghou Ma [Tue, 2 Apr 2013 19:34:04 +0000 (03:34 +0800)]
cmd/go: fix typo in docs
Fixes #5181.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
8277043
Brad Fitzpatrick [Tue, 2 Apr 2013 19:12:16 +0000 (12:12 -0700)]
net/http: remove useless named result arguments in type
R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/
8276043
Robert Griesemer [Tue, 2 Apr 2013 19:05:14 +0000 (12:05 -0700)]
cmd/godoc: don't linkify index entries
Fixes #5186.
R=bradfitz
CC=golang-dev
https://golang.org/cl/
8267044
Rob Pike [Tue, 2 Apr 2013 17:25:02 +0000 (10:25 -0700)]
sort: be consistent when describing "less: function in the multiKeys example
s/ordering/less/g
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
8267043
Rob Pike [Tue, 2 Apr 2013 16:35:30 +0000 (09:35 -0700)]
sort: new example: programmatic sort by multiple keys
Demonstrates one way to sort a slice of structs according
to different sort criteria, done in sequence.
One possible answer to a question that comes up often.
R=golang-dev, gri, bradfitz, adg, adg, rogpeppe
CC=golang-dev
https://golang.org/cl/
8182044
Brad Fitzpatrick [Tue, 2 Apr 2013 16:07:43 +0000 (09:07 -0700)]
compress/gzip: add Writer.Flush to call flate.Writer's Flush
From a discussion on golang-nuts.
R=golang-dev, dsymonds, nigeltao, coocood, adg
CC=golang-dev
https://golang.org/cl/
8251043
Nigel Tao [Tue, 2 Apr 2013 10:14:34 +0000 (21:14 +1100)]
cmd/gc: recognize (a.b[0]<<1 | a.b[0]>>31) as a rotate, not just
(x<<1 | x>>31).
Fixes #5084.
On the SHA3 benchmark proposals at
https://golang.org/cl/
7760044 /
benchmark old ns/op new ns/op delta
BenchmarkPermutationFunction 1288 1191 -7.53%
BenchmarkSingleByteWrite 5795 5811 +0.28%
BenchmarkBlockWrite512 178 179 +0.56%
BenchmarkBlockWrite384 230 233 +1.30%
BenchmarkBlockWrite256 282 286 +1.42%
BenchmarkBlockWrite224 301 306 +1.66%
BenchmarkBulkHashSHA3_512 326885 304548 -6.83%
BenchmarkBulkHashSHA3_384 234839 220074 -6.29%
BenchmarkBulkHashSHA3_256 186969 175790 -5.98%
BenchmarkBulkHashSHA3_224 178133 167489 -5.98%
For a function like
func g() {
x = a[3]<<20 | a[3]>>12
}
the asm goes from
0006 (main.go:10) TEXT g+0(SB),$0-0
0007 (main.go:10) MOVL a+12(SB),BP
0008 (main.go:10) LOCALS ,$0
0009 (main.go:11) MOVL BP,BX
0010 (main.go:11) SHLL $20,BX
0011 (main.go:11) SHRL $12,BP
0012 (main.go:11) ORL BP,BX
0013 (main.go:11) MOVL BX,x+0(SB)
0014 (main.go:12) RET ,
to
0006 (main.go:10) TEXT g+0(SB),$0-0
0007 (main.go:10) LOCALS ,$0
0008 (main.go:11) MOVL a+12(SB),BX
0009 (main.go:11) ROLL $20,BX
0010 (main.go:11) MOVL BX,x+0(SB)
0011 (main.go:12) RET ,
R=rsc, iant, remyoudompheng
CC=golang-dev, jcb
https://golang.org/cl/
7944043
Dave Cheney [Tue, 2 Apr 2013 04:08:28 +0000 (15:08 +1100)]
doc/go1.1.html: add a note about additional platforms
Mention support for NetBSD, OpenBSD, and cgo for linux/arm.
R=golang-dev, dvyukov, r, minux.ma, adg, bradfitz, adg
CC=golang-dev
https://golang.org/cl/
8152043
Keith Randall [Tue, 2 Apr 2013 01:59:58 +0000 (18:59 -0700)]
runtime: make map reads multithreaded safe.
Doing grow work on reads is not multithreaded safe.
Changed code to do grow work only on inserts & deletes.
This is a short-term fix, eventually we'll want to do
grow work in parallel to recover the space of the old
table.
Fixes #5120.
R=bradfitz, khr
CC=golang-dev
https://golang.org/cl/
8242043
Rob Pike [Mon, 1 Apr 2013 22:52:15 +0000 (15:52 -0700)]
doc/codewalk/markov: fix slice error in description
Fixes #5176.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
8118046
Rob Pike [Mon, 1 Apr 2013 22:17:00 +0000 (15:17 -0700)]
testing: document that Log and Logf do not usually produce output
The text is printed only if the test fails or -test.v is set.
Document this behavior in the testing package and 'go help test'.
Also put a 'go install' into mkdoc.sh so I don't get tricked by the
process of updating the documentation ever again.
Fixes #5174.
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/
8118047
Robert Griesemer [Mon, 1 Apr 2013 22:15:02 +0000 (15:15 -0700)]
cmd/godoc: better error message for missing index files
Fixes #5024.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
8222045
Rémy Oudompheng [Mon, 1 Apr 2013 22:00:16 +0000 (00:00 +0200)]
cmd/gc: use appropriate verb to print array type length.
Fixes #4730.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
8229043
Shenghou Ma [Mon, 1 Apr 2013 21:34:03 +0000 (14:34 -0700)]
sync/atomic: make unaligned 64-bit atomic operation panic on ARM
use MOVW.NE instead of BEQ and MOVW.
R=golang-dev, dave, rsc, daniel.morsing
CC=golang-dev
https://golang.org/cl/
7718043
Lucio De Re [Mon, 1 Apr 2013 21:21:15 +0000 (14:21 -0700)]
cmd/cc/cc.h: Add a #pragma for %S used (only) in cmd/cc/sub.c.
Eliminates a format consistency warning.
R=gloang-dev, r
CC=golang-dev
https://golang.org/cl/
8217043
Ian Lance Taylor [Mon, 1 Apr 2013 19:56:18 +0000 (12:56 -0700)]
cmd/ld: add -extld and -extldflags options
Permits specifying the linker to use, and trailing flags to
pass to that linker, when linking in external mode. External
mode linking is used when building a package that uses cgo, as
described in the cgo docs.
Also document -linkmode and -tmpdir.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/
8225043
Rémy Oudompheng [Mon, 1 Apr 2013 19:01:50 +0000 (21:01 +0200)]
cmd/gc: do not reuse bool temporaries for composite equality.
Reusing it when multiple comparisons occurred in the same
function call led to bad overwriting.
Fixes #5162.
R=golang-dev, daniel.morsing
CC=golang-dev
https://golang.org/cl/
8174047
Brad Fitzpatrick [Mon, 1 Apr 2013 18:49:24 +0000 (11:49 -0700)]
runtime: add concurrent map read test
Currently crashes, so disabled.
Update #5179
R=golang-dev, khr
CC=golang-dev
https://golang.org/cl/
8222044
Lucio De Re [Mon, 1 Apr 2013 17:01:12 +0000 (10:01 -0700)]
cmd/go: prevent packages from being cleaned more than once
If a package was listed as a dependency from multiple places, it
could have been cleaned repeatedly.
R=golang-dev, dave, rsc, seed, bradfitz
CC=golang-dev, minux.ma
https://golang.org/cl/
7482043
Ewan Chou [Mon, 1 Apr 2013 11:36:41 +0000 (22:36 +1100)]
testing: report test as failed if the test panics.
Fixes #5149.
R=golang-dev, dave, minux.ma
CC=golang-dev
https://golang.org/cl/
8136043