]> Cypherpunks repositories - gostls13.git/log
gostls13.git
12 years agocrypto/rc4: faster amd64 implementation
Russ Cox [Thu, 21 Mar 2013 20:38:57 +0000 (16:38 -0400)]
crypto/rc4: faster amd64 implementation

XOR key into data 128 bits at a time instead of 64 bits
and pipeline half of state loads. Rotate loop to allow
single-register indexing for state[i].

On a MacBookPro10,2 (Core i5):

benchmark           old ns/op    new ns/op    delta
BenchmarkRC4_128          412          224  -45.63%
BenchmarkRC4_1K          3179         1613  -49.26%
BenchmarkRC4_8K         25223        12545  -50.26%

benchmark            old MB/s     new MB/s  speedup
BenchmarkRC4_128       310.51       570.42    1.84x
BenchmarkRC4_1K        322.09       634.48    1.97x
BenchmarkRC4_8K        320.97       645.32    2.01x

For comparison, on the same machine, openssl 0.9.8r reports
its rc4 speed as somewhat under 350 MB/s for both 1K and 8K
(it is operating 64 bits at a time).

On an Intel Xeon E5520:

benchmark           old ns/op    new ns/op    delta
BenchmarkRC4_128          418          259  -38.04%
BenchmarkRC4_1K          3200         1884  -41.12%
BenchmarkRC4_8K         25173        14529  -42.28%

benchmark            old MB/s     new MB/s  speedup
BenchmarkRC4_128       306.04       492.48    1.61x
BenchmarkRC4_1K        319.93       543.26    1.70x
BenchmarkRC4_8K        321.61       557.20    1.73x

For comparison, on the same machine, openssl 1.0.1
reports its rc4 speed as 587 MB/s for 1K and 601 MB/s for 8K.

R=agl
CC=golang-dev
https://golang.org/cl/7865046

12 years agocmd/ld: portability fixes
Shenghou Ma [Thu, 21 Mar 2013 20:00:54 +0000 (04:00 +0800)]
cmd/ld: portability fixes
fix code that implicitly assumes little-endian machines.

R=golang-dev, bradfitz, rsc, alex.brainman
CC=golang-dev
https://golang.org/cl/6792043

12 years agocmd/ld: don't generate DW_AT_type attr for unsafe.Pointer to match gcc behavior
Shenghou Ma [Thu, 21 Mar 2013 19:58:35 +0000 (03:58 +0800)]
cmd/ld: don't generate DW_AT_type attr for unsafe.Pointer to match gcc behavior
gcc generates only attr DW_AT_byte_size for DW_TAG_pointer_type of "void *",
but we used to also generate DW_AT_type pointing to imaginary unspecified
type "void", which confuses some gdb.
This change makes old Apple gdb 6.x (specifically, Apple version gdb-1515)
accepts our binary without issue like this:
(gdb) b 'main.main'
Die: DW_TAG_unspecified_type (abbrev = 10, offset = 47079)
    has children: FALSE
    attributes:
        DW_AT_name (DW_FORM_string) string: "void"
Dwarf Error: Cannot find type of die [in module /Users/minux/go/go2.hg/bin/go]

Special thanks to Russ Cox for pointing out the problem in comment #6 of
CL 7891044.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/7744051

12 years agocmd/ld: fix bad merge
Shenghou Ma [Thu, 21 Mar 2013 19:54:14 +0000 (03:54 +0800)]
cmd/ld: fix bad merge
CL 7504044 accidentally reverted part of CL 7891044 and 7552045, this CL
bring those part back.

R=golang-dev
TBR=rsc
CC=golang-dev
https://golang.org/cl/7950045

12 years agoruntime: mark strings without going through an intermediate buffer
Jan Ziak [Thu, 21 Mar 2013 18:00:02 +0000 (19:00 +0100)]
runtime: mark strings without going through an intermediate buffer

R=rsc
CC=golang-dev
https://golang.org/cl/7949043

12 years agogo/format: fix documentation
Robert Griesemer [Thu, 21 Mar 2013 15:47:34 +0000 (08:47 -0700)]
go/format: fix documentation

R=r
CC=golang-dev
https://golang.org/cl/7920048

12 years agocrypto/sha1: faster amd64, 386 implementations
Russ Cox [Thu, 21 Mar 2013 15:32:02 +0000 (11:32 -0400)]
crypto/sha1: faster amd64, 386 implementations

-- amd64 --

On a MacBookPro10,2 (Core i5):

benchmark              old ns/op    new ns/op    delta
BenchmarkHash8Bytes          785          592  -24.59%
BenchmarkHash1K             8727         3014  -65.46%
BenchmarkHash8K            64926        20723  -68.08%

benchmark               old MB/s     new MB/s  speedup
BenchmarkHash8Bytes        10.19        13.50    1.32x
BenchmarkHash1K           117.34       339.71    2.90x
BenchmarkHash8K           126.17       395.31    3.13x

For comparison, on the same machine, openssl 0.9.8r reports
its sha1 speed as 341 MB/s for 1K and 404 MB/s for 8K.

On an Intel Xeon E5520:

benchmark              old ns/op    new ns/op    delta
BenchmarkHash8Bytes          984          707  -28.15%
BenchmarkHash1K            11141         3466  -68.89%
BenchmarkHash8K            82435        23411  -71.60%

benchmark               old MB/s     new MB/s  speedup
BenchmarkHash8Bytes         8.13        11.31    1.39x
BenchmarkHash1K            91.91       295.36    3.21x
BenchmarkHash8K            99.37       349.91    3.52x

For comparison, on the same machine, openssl 1.0.1 reports
its sha1 speed as 286 MB/s for 1K and 394 MB/s for 8K.

-- 386 --

On a MacBookPro10,2 (Core i5):

benchmark              old ns/op    new ns/op    delta
BenchmarkHash8Bytes         1041          713  -31.51%
BenchmarkHash1K            15612         3382  -78.34%
BenchmarkHash8K           110152        22733  -79.36%

benchmark               old MB/s     new MB/s  speedup
BenchmarkHash8Bytes         7.68        11.21    1.46x
BenchmarkHash1K            65.59       302.76    4.62x
BenchmarkHash8K            74.37       360.36    4.85x

On an Intel Xeon E5520:

benchmark              old ns/op    new ns/op    delta
BenchmarkHash8Bytes         1221          842  -31.04%
BenchmarkHash1K            14643         4137  -71.75%
BenchmarkHash8K           108722        27394  -74.80%

benchmark               old MB/s     new MB/s  speedup
BenchmarkHash8Bytes         6.55         9.49    1.45x
BenchmarkHash1K            69.93       247.51    3.54x
BenchmarkHash8K            75.35       299.04    3.97x

R=agl, dave
CC=golang-dev
https://golang.org/cl/7763049

12 years agocrypto/md5: faster amd64, 386 implementations
Russ Cox [Thu, 21 Mar 2013 15:26:00 +0000 (11:26 -0400)]
crypto/md5: faster amd64, 386 implementations

-- amd64 --

On a MacBookPro10,2 (Core i5):

benchmark                       old ns/op    new ns/op    delta
BenchmarkHash8Bytes                   471          524  +11.25%
BenchmarkHash1K                      3018         2220  -26.44%
BenchmarkHash8K                     20634        14604  -29.22%
BenchmarkHash8BytesUnaligned          468          523  +11.75%
BenchmarkHash1KUnaligned             3006         2212  -26.41%
BenchmarkHash8KUnaligned            20820        14652  -29.63%

benchmark                        old MB/s     new MB/s  speedup
BenchmarkHash8Bytes                 16.98        15.26    0.90x
BenchmarkHash1K                    339.26       461.19    1.36x
BenchmarkHash8K                    397.00       560.92    1.41x
BenchmarkHash8BytesUnaligned        17.08        15.27    0.89x
BenchmarkHash1KUnaligned           340.65       462.75    1.36x
BenchmarkHash8KUnaligned           393.45       559.08    1.42x

For comparison, on the same machine, openssl 0.9.8r reports
its md5 speed as 350 MB/s for 1K and 410 MB/s for 8K.

On an Intel Xeon E5520:

benchmark                       old ns/op    new ns/op    delta
BenchmarkHash8Bytes                   565          607   +7.43%
BenchmarkHash1K                      3753         2475  -34.05%
BenchmarkHash8K                     25945        16250  -37.37%
BenchmarkHash8BytesUnaligned          559          594   +6.26%
BenchmarkHash1KUnaligned             3754         2474  -34.10%
BenchmarkHash8KUnaligned            26011        16359  -37.11%

benchmark                        old MB/s     new MB/s  speedup
BenchmarkHash8Bytes                 14.15        13.17    0.93x
BenchmarkHash1K                    272.83       413.58    1.52x
BenchmarkHash8K                    315.74       504.11    1.60x
BenchmarkHash8BytesUnaligned        14.31        13.46    0.94x
BenchmarkHash1KUnaligned           272.73       413.78    1.52x
BenchmarkHash8KUnaligned           314.93       500.73    1.59x

For comparison, on the same machine, openssl 1.0.1 reports
its md5 speed as 443 MB/s for 1K and 513 MB/s for 8K.

-- 386 --

On a MacBookPro10,2 (Core i5):

benchmark                       old ns/op    new ns/op    delta
BenchmarkHash8Bytes                   602          670  +11.30%
BenchmarkHash1K                      4038         2549  -36.87%
BenchmarkHash8K                     27879        16690  -40.13%
BenchmarkHash8BytesUnaligned          602          670  +11.30%
BenchmarkHash1KUnaligned             4025         2546  -36.75%
BenchmarkHash8KUnaligned            27844        16692  -40.05%

benchmark                        old MB/s     new MB/s  speedup
BenchmarkHash8Bytes                 13.28        11.93    0.90x
BenchmarkHash1K                    253.58       401.69    1.58x
BenchmarkHash8K                    293.83       490.81    1.67x
BenchmarkHash8BytesUnaligned        13.27        11.94    0.90x
BenchmarkHash1KUnaligned           254.40       402.05    1.58x
BenchmarkHash8KUnaligned           294.21       490.77    1.67x

On an Intel Xeon E5520:

benchmark                       old ns/op    new ns/op    delta
BenchmarkHash8Bytes                   752          716   -4.79%
BenchmarkHash1K                      5307         2799  -47.26%
BenchmarkHash8K                     36993        18042  -51.23%
BenchmarkHash8BytesUnaligned          748          730   -2.41%
BenchmarkHash1KUnaligned             5301         2795  -47.27%
BenchmarkHash8KUnaligned            36983        18085  -51.10%

benchmark                        old MB/s     new MB/s  speedup
BenchmarkHash8Bytes                 10.64        11.16    1.05x
BenchmarkHash1K                    192.93       365.80    1.90x
BenchmarkHash8K                    221.44       454.03    2.05x
BenchmarkHash8BytesUnaligned        10.69        10.95    1.02x
BenchmarkHash1KUnaligned           193.15       366.36    1.90x
BenchmarkHash8KUnaligned           221.51       452.96    2.04x

R=agl
CC=golang-dev
https://golang.org/cl/7621049

12 years agocrypto/rc4: faster amd64, 386 implementations
Russ Cox [Thu, 21 Mar 2013 15:25:09 +0000 (11:25 -0400)]
crypto/rc4: faster amd64, 386 implementations

-- amd64 --

On a MacBookPro10,2 (Core i5):

benchmark           old ns/op    new ns/op    delta
BenchmarkRC4_128          470          421  -10.43%
BenchmarkRC4_1K          3123         3275   +4.87%
BenchmarkRC4_8K         26351        25866   -1.84%

benchmark            old MB/s     new MB/s  speedup
BenchmarkRC4_128       272.22       303.40    1.11x
BenchmarkRC4_1K        327.80       312.58    0.95x
BenchmarkRC4_8K        307.24       313.00    1.02x

For comparison, on the same machine, openssl 0.9.8r reports
its rc4 speed as somewhat under 350 MB/s for both 1K and 8K.
The Core i5 performance can be boosted another 20%, but only
by making the Xeon performance significantly slower.

On an Intel Xeon E5520:

benchmark           old ns/op    new ns/op    delta
BenchmarkRC4_128          774          417  -46.12%
BenchmarkRC4_1K          6121         3200  -47.72%
BenchmarkRC4_8K         48394        25151  -48.03%

benchmark            old MB/s     new MB/s  speedup
BenchmarkRC4_128       165.18       306.84    1.86x
BenchmarkRC4_1K        167.28       319.92    1.91x
BenchmarkRC4_8K        167.29       321.89    1.92x

For comparison, on the same machine, openssl 1.0.1
(which uses a different implementation than 0.9.8r)
reports its rc4 speed as 587 MB/s for 1K and 601 MB/s for 8K.
It is using SIMD instructions to do more in parallel.

So there's still some improvement to be had, but even so,
this is almost 2x faster than what it replaced.

-- 386 --

On a MacBookPro10,2 (Core i5):

benchmark           old ns/op    new ns/op    delta
BenchmarkRC4_128         3491          421  -87.94%
BenchmarkRC4_1K         28063         3205  -88.58%
BenchmarkRC4_8K        220392        25228  -88.55%

benchmark            old MB/s     new MB/s  speedup
BenchmarkRC4_128        36.66       303.81    8.29x
BenchmarkRC4_1K         36.49       319.42    8.75x
BenchmarkRC4_8K         36.73       320.90    8.74x

On an Intel Xeon E5520:

benchmark           old ns/op    new ns/op    delta
BenchmarkRC4_128         2268          524  -76.90%
BenchmarkRC4_1K         18161         4137  -77.22%
BenchmarkRC4_8K        142396        32350  -77.28%

benchmark            old MB/s     new MB/s  speedup
BenchmarkRC4_128        56.42       244.13    4.33x
BenchmarkRC4_1K         56.38       247.46    4.39x
BenchmarkRC4_8K         56.86       250.26    4.40x

R=agl
CC=golang-dev
https://golang.org/cl/7547050

12 years agoruntime: explicitly remove fd's from epoll waitset before close()
Dmitriy Vyukov [Thu, 21 Mar 2013 08:54:19 +0000 (12:54 +0400)]
runtime: explicitly remove fd's from epoll waitset before close()
Fixes #5061.

Current code relies on the fact that fd's are automatically removed from epoll set when closed. However, it is not true. Underlying file description is removed from epoll set only when *all* fd's referring to it are closed.

There are 2 bad consequences:
1. Kernel delivers notifications on already closed fd's.
2. The following sequence of events leads to error:
   - add fd1 to epoll
   - dup fd1 = fd2
   - close fd1 (not removed from epoll since we've dup'ed the fd)
   - dup fd2 = fd1 (get the same fd as fd1)
   - add fd1 to epoll = EEXIST

So, if fd can be potentially dup'ed of fork'ed, it's necessary to explicitly remove the fd from epoll set.

R=golang-dev, bradfitz, dave
CC=golang-dev
https://golang.org/cl/7870043

12 years agoruntime: faster parallel GC
Dmitriy Vyukov [Thu, 21 Mar 2013 08:48:02 +0000 (12:48 +0400)]
runtime: faster parallel GC
Use per-thread work buffers instead of global mutex-protected pool. This eliminates contention from parallel scan phase.

benchmark                             old ns/op    new ns/op    delta
garbage.BenchmarkTree2-8               97100768     71417553  -26.45%
garbage.BenchmarkTree2LastPause-8     970931485    714103692  -26.45%
garbage.BenchmarkTree2Pause-8         469127802    345029253  -26.45%
garbage.BenchmarkParser-8            2880950854   2715456901   -5.74%
garbage.BenchmarkParserLastPause-8    137047399    103336476  -24.60%
garbage.BenchmarkParserPause-8         80686028     58922680  -26.97%

R=golang-dev, 0xe2.0x9a.0x9b, dave, adg, rsc, iant
CC=golang-dev
https://golang.org/cl/7816044

12 years agocmd/gc: implement more cases in racewalk.
Rémy Oudompheng [Thu, 21 Mar 2013 07:53:52 +0000 (08:53 +0100)]
cmd/gc: implement more cases in racewalk.

Add missing CLOSUREVAR in switch.
Mark MAKE, string conversion nodes as impossible.
Control statements do not need instrumentation.
Instrument COM and LROT nodes.
Instrument map length.

Update #4228

R=dvyukov, golang-dev
CC=golang-dev
https://golang.org/cl/7504047

12 years agocrypto/tls: use method values
Brad Fitzpatrick [Thu, 21 Mar 2013 03:53:38 +0000 (23:53 -0400)]
crypto/tls: use method values

Currently fails with a compiler error, though.

R=golang-dev, agl, rsc
CC=golang-dev
https://golang.org/cl/7933043

12 years agocmd/gc: fix escape analysis of method values
Russ Cox [Thu, 21 Mar 2013 03:53:27 +0000 (23:53 -0400)]
cmd/gc: fix escape analysis of method values

R=ken2
CC=golang-dev
https://golang.org/cl/7518050

12 years agosrc/pkg: fixed various typos
Robert Griesemer [Wed, 20 Mar 2013 23:32:37 +0000 (16:32 -0700)]
src/pkg: fixed various typos

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7936043

12 years agoruntime: free map structures more aggressively
Keith Randall [Wed, 20 Mar 2013 22:38:51 +0000 (15:38 -0700)]
runtime: free map structures more aggressively

R=rsc, bradfitz, khr
CC=golang-dev
https://golang.org/cl/7849047

12 years agospec: fix description of initialization
Rob Pike [Wed, 20 Mar 2013 22:05:28 +0000 (15:05 -0700)]
spec: fix description of initialization
The analysis does not depend on the values of the items.
Fixes #4648.

R=golang-dev, gri, rsc
CC=golang-dev
https://golang.org/cl/7593050

12 years agogo/parser: use method values
Robert Griesemer [Wed, 20 Mar 2013 22:03:30 +0000 (15:03 -0700)]
go/parser: use method values

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/7858045

12 years agoruntime: Use aligned loads for AES key schedule.
Keith Randall [Wed, 20 Mar 2013 21:34:26 +0000 (14:34 -0700)]
runtime: Use aligned loads for AES key schedule.

R=rsc, minux.ma, khr
CC=golang-dev
https://golang.org/cl/7763050

12 years agocmd/gc: add OCHECKNOTNIL to race walker (fix build)
Russ Cox [Wed, 20 Mar 2013 21:20:32 +0000 (17:20 -0400)]
cmd/gc: add OCHECKNOTNIL to race walker (fix build)

TBR=dvyukov
CC=golang-dev
https://golang.org/cl/7635046

12 years agocmd/gc: reject methods on non-locals, even if symbol exists
Daniel Morsing [Wed, 20 Mar 2013 21:18:20 +0000 (22:18 +0100)]
cmd/gc: reject methods on non-locals, even if symbol exists

Fixes #5089.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/7767044

12 years agocmd/gc: implement method values
Russ Cox [Wed, 20 Mar 2013 21:11:09 +0000 (17:11 -0400)]
cmd/gc: implement method values

R=ken2, ken
CC=golang-dev
https://golang.org/cl/7546052

12 years agospec: define method values
Russ Cox [Wed, 20 Mar 2013 20:54:07 +0000 (16:54 -0400)]
spec: define method values

Fixes #2280.

R=golang-dev, r, bradfitz, iant, andybalholm, gri
CC=golang-dev
https://golang.org/cl/7816045

12 years agoruntime: faster hashmap implementation.
Keith Randall [Wed, 20 Mar 2013 20:51:29 +0000 (13:51 -0700)]
runtime: faster hashmap implementation.

Hashtable is arranged as an array of
8-entry buckets with chained overflow.
Each bucket has 8 extra hash bits
per key to provide quick lookup within
a bucket.  Table is grown incrementally.

Update #3885
Go time drops from 0.51s to 0.34s.

R=r, rsc, m3b, dave, bradfitz, khr, ugorji, remyoudompheng
CC=golang-dev
https://golang.org/cl/7504044

12 years agoruntime: prevent garbage collection during hashmap insertion (fix 2)
Jan Ziak [Wed, 20 Mar 2013 19:36:33 +0000 (20:36 +0100)]
runtime: prevent garbage collection during hashmap insertion (fix 2)

Fixes #5074 in multi-threaded scenarios.

R=golang-dev, daniel.morsing, dave, dvyukov, bradfitz, rsc
CC=golang-dev, remyoudompheng
https://golang.org/cl/7916043

12 years agonet/http/fcgi: Request.Body should always be non-nil
Brad Fitzpatrick [Wed, 20 Mar 2013 16:06:33 +0000 (09:06 -0700)]
net/http/fcgi: Request.Body should always be non-nil

Found this inconsistency from net/http's Server while
debugging Issue 4183

Unfortunately this package lacks testing around this,
or most of child.go. :/

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/7735046

12 years agomisc/swig: remove old broken Makefile
Ian Lance Taylor [Wed, 20 Mar 2013 15:06:58 +0000 (08:06 -0700)]
misc/swig: remove old broken Makefile

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7786046

12 years agocmd/6c, cmd/8c: fix stack allocated Biobuf leaking at exit
Dave Cheney [Wed, 20 Mar 2013 12:42:00 +0000 (23:42 +1100)]
cmd/6c, cmd/8c: fix stack allocated Biobuf leaking at exit

Fixes #5085.

{6,8}c/swt.c allocates a third Biobuf in automatic memory which is not terminated at the end of the function. This causes the buffer to be 'in use' when the batexit handler fires, confusing valgrind.

Huge thanks to DMorsing for the diagnosis.

R=golang-dev, daniel.morsing, rsc
CC=golang-dev
https://golang.org/cl/7844044

12 years agocmd/ld: remove remaining occurrence of isobj.
Rémy Oudompheng [Wed, 20 Mar 2013 07:32:11 +0000 (08:32 +0100)]
cmd/ld: remove remaining occurrence of isobj.

Fixes cgo builds.

R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/7784044

12 years agonet/http: new benchmark to measure server without network
Brad Fitzpatrick [Wed, 20 Mar 2013 06:32:28 +0000 (23:32 -0700)]
net/http: new benchmark to measure server without network

No net package involved. And with ReportAllocs we can see
how much garbage is created per request.

R=adg, dave
CC=golang-dev
https://golang.org/cl/7913044

12 years agocmd/5l: fix arm build
Dave Cheney [Wed, 20 Mar 2013 01:05:52 +0000 (12:05 +1100)]
cmd/5l: fix arm build

Fixes build. One part of ../misc/cgo/test appears to be unhappy but this does not cause the build to fail.

R=rsc, r
CC=golang-dev
https://golang.org/cl/7769047

12 years agodoc/go1.1.html: add links to the text, write some new sections
Rob Pike [Tue, 19 Mar 2013 23:40:19 +0000 (16:40 -0700)]
doc/go1.1.html: add links to the text, write some new sections

R=golang-dev, rsc, dave
CC=golang-dev
https://golang.org/cl/7914043

12 years agocmd/gc: implement revised rule for shifts in equality.
Rémy Oudompheng [Tue, 19 Mar 2013 23:19:11 +0000 (00:19 +0100)]
cmd/gc: implement revised rule for shifts in equality.

R=rsc, daniel.morsing
CC=golang-dev
https://golang.org/cl/7613046

12 years agobytes,strings: remove user name from BUG in comment
Rob Pike [Tue, 19 Mar 2013 22:04:18 +0000 (15:04 -0700)]
bytes,strings: remove user name from BUG in comment

R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/7856048

12 years agoruntime: prevent garbage collection during hashmap insertion
Jan Ziak [Tue, 19 Mar 2013 21:17:39 +0000 (22:17 +0100)]
runtime: prevent garbage collection during hashmap insertion

Inserting a key-value pair into a hashmap storing keys or values
indirectly can cause the garbage collector to find the hashmap in
an inconsistent state.

Fixes #5074.

R=golang-dev, minux.ma, rsc
CC=golang-dev
https://golang.org/cl/7913043

12 years agodebug/dwarf: support for DWARF 3
Ian Lance Taylor [Tue, 19 Mar 2013 20:59:37 +0000 (13:59 -0700)]
debug/dwarf: support for DWARF 3

R=rsc
CC=golang-dev
https://golang.org/cl/7662045

12 years agocmd/ld: fix typo
Russ Cox [Tue, 19 Mar 2013 20:53:07 +0000 (16:53 -0400)]
cmd/ld: fix typo

R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/7552045

12 years agocmd/ld: generate relocated DWARF in hostobj mode
Russ Cox [Tue, 19 Mar 2013 20:31:52 +0000 (16:31 -0400)]
cmd/ld: generate relocated DWARF in hostobj mode

While we're here, downgrade DWARF to version 2.
We're not using any version 3 features, and OS X gdb
only supports version 2.

Fixes #3436.

R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/7891044

12 years agomisc/dashboard: show correct dir name in README
Robert Griesemer [Tue, 19 Mar 2013 19:49:46 +0000 (12:49 -0700)]
misc/dashboard: show correct dir name in README

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7909043

12 years agocmd/ld: replace -hostobj with -linkmode
Russ Cox [Tue, 19 Mar 2013 19:45:42 +0000 (15:45 -0400)]
cmd/ld: replace -hostobj with -linkmode

Still disabled. Need to fix TLS.

R=golang-dev, minux.ma, bradfitz
CC=golang-dev
https://golang.org/cl/7783044

12 years agoruntime: optimize calls to addroot()
Jan Ziak [Tue, 19 Mar 2013 18:57:15 +0000 (19:57 +0100)]
runtime: optimize calls to addroot()

R=golang-dev, rsc
CC=dvyukov, golang-dev
https://golang.org/cl/7879043

12 years agocmd/gc: support channel types in the garbage collector
Jan Ziak [Tue, 19 Mar 2013 18:51:03 +0000 (19:51 +0100)]
cmd/gc: support channel types in the garbage collector

R=golang-dev, dvyukov, rsc
CC=golang-dev
https://golang.org/cl/7473044

12 years agounicode: modify a comment to the convention format.
Oling Cat [Tue, 19 Mar 2013 18:47:41 +0000 (14:47 -0400)]
unicode: modify a comment to the convention format.

R=golang-dev, r, rsc
CC=golang-dev
https://golang.org/cl/7869043

12 years agogo/doc, godoc: improved note reading
Robert Griesemer [Tue, 19 Mar 2013 18:14:35 +0000 (11:14 -0700)]
go/doc, godoc: improved note reading

- A note doesn't have to be in the first
comment of a comment group anymore, and
several notes may appear in the same comment
group (e.g., it is fairly common to have a
TODO(uid) note immediately following another
comment).

- Define a doc.Note type which also contains
note uid and position info.

- Better formatting in godoc output. The position
information is not yet used, but could be used to
locate the note in the source text if desired.

Fixes #4843.

R=r, cnicolaou
CC=gobot, golang-dev
https://golang.org/cl/7496048

12 years agounicode: remove an extra space
Oling Cat [Tue, 19 Mar 2013 17:48:07 +0000 (13:48 -0400)]
unicode: remove an extra space

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/7856044

12 years agoruntime: add missing copyright
Mikio Hara [Tue, 19 Mar 2013 17:40:29 +0000 (02:40 +0900)]
runtime: add missing copyright

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/7884045

12 years agonet: make use of reflect.DeepEqual in IP manipulation tests
Mikio Hara [Tue, 19 Mar 2013 16:07:18 +0000 (01:07 +0900)]
net: make use of reflect.DeepEqual in IP manipulation tests

Also applies camel style to test case holders.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/7884043

12 years agocmd/fix: revert IPv6 scoped address zone support of IPNet
Mikio Hara [Tue, 19 Mar 2013 16:05:16 +0000 (01:05 +0900)]
cmd/fix: revert IPv6 scoped address zone support of IPNet

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7554051

12 years agomisc/emacs: Add support for godef
Dominik Honnef [Tue, 19 Mar 2013 15:29:28 +0000 (11:29 -0400)]
misc/emacs: Add support for godef

godef[1][2] is a third party tool for printing information about
expressions, especially the location of their definition. This can be
used to implement a "jump to definition" function. Unlike
cross-language solutions like ctags, godef does not require an index,
operates on the Go AST instead of symbols and works across packages,
including the standard library.

This patch implements two new public functions: godef-describe (C-c
C-d) and godef-jump (C-d C-j). godef-describe describes the expression
at point, printing its type, and godef-jump jumps to its definition.

[1]: https://code.google.com/p/rog-go/source/browse/exp/cmd/godef/
[2]: go get code.google.com/p/rog-go/exp/cmd/godef

R=adonovan, cw, patrick.allen.higgins, sameer
CC=golang-dev
https://golang.org/cl/7781043

12 years agolib/godoc: convert indentation to tabs.
Oling Cat [Tue, 19 Mar 2013 13:40:57 +0000 (09:40 -0400)]
lib/godoc: convert indentation to tabs.

R=golang-dev, dsymonds, rsc
CC=golang-dev
https://golang.org/cl/7497048

12 years agoruntime: fix erroneous overflow protection on netbsd/openbsd semasleep.
Rémy Oudompheng [Tue, 19 Mar 2013 06:08:26 +0000 (07:08 +0100)]
runtime: fix erroneous overflow protection on netbsd/openbsd semasleep.

On NetBSD tv_sec is already an int64 so no need for a test.

On OpenBSD, semasleep expects a Unix time as argument,
and 1<<30 is in 2004.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/7810044

12 years agodoc/go1.1.html: document the surrogate and BOM changes
Rob Pike [Tue, 19 Mar 2013 05:50:32 +0000 (22:50 -0700)]
doc/go1.1.html: document the surrogate and BOM changes

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/7853048

12 years agodatabase/sql: doc cleanup on the DB type
Brad Fitzpatrick [Mon, 18 Mar 2013 22:54:22 +0000 (15:54 -0700)]
database/sql: doc cleanup on the DB type

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/7865044

12 years agodatabase/sql: add DB.SetMaxIdleConns
Brad Fitzpatrick [Mon, 18 Mar 2013 22:33:04 +0000 (15:33 -0700)]
database/sql: add DB.SetMaxIdleConns

Update #4805

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/7634045

12 years agodoc/go1.1.html: document some of the library changes.
Rob Pike [Mon, 18 Mar 2013 22:27:05 +0000 (15:27 -0700)]
doc/go1.1.html: document some of the library changes.
Still much to do, but this is a start.

R=golang-dev, adg, bradfitz, remyoudompheng
CC=golang-dev
https://golang.org/cl/7729046

12 years agocmd/gc: steal escape analysis info when inlining
Daniel Morsing [Mon, 18 Mar 2013 21:22:35 +0000 (22:22 +0100)]
cmd/gc: steal escape analysis info when inlining

Usually, there is no esc info when inlining, but there will be when generating inlined wrapper functions.

If we don't use this information, we get invalid addresses on the stack.

Fixes #5056.

R=golang-dev, rsc
CC=golang-dev, remyoudompheng
https://golang.org/cl/7850045

12 years agonet/http: add StripPrefix example; simplify code
Brad Fitzpatrick [Mon, 18 Mar 2013 20:44:20 +0000 (13:44 -0700)]
net/http: add StripPrefix example; simplify code

The example is the same as the FileServer one, but
it's relevant for both.

Also use strings.TrimPrefix while I'm here.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/7598046

12 years agonet/http: shorten and clean up TestTransportConcurrency
Brad Fitzpatrick [Mon, 18 Mar 2013 20:32:42 +0000 (13:32 -0700)]
net/http: shorten and clean up TestTransportConcurrency

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/7817044

12 years agoruntime: fix tv_sec 32-bit overflows in sleep routines.
Rémy Oudompheng [Mon, 18 Mar 2013 19:11:11 +0000 (20:11 +0100)]
runtime: fix tv_sec 32-bit overflows in sleep routines.

Fixes #5063.

R=golang-dev, minux.ma, rsc
CC=golang-dev
https://golang.org/cl/7876043

12 years agoruntime: fix build for NetBSD/ARM
Shenghou Ma [Mon, 18 Mar 2013 18:47:04 +0000 (02:47 +0800)]
runtime: fix build for NetBSD/ARM

R=golang-dev, jsing
CC=golang-dev
https://golang.org/cl/7597046

12 years agodatabase/sql: allow simultaneous queries, etc in a Tx
Brad Fitzpatrick [Mon, 18 Mar 2013 18:39:00 +0000 (11:39 -0700)]
database/sql: allow simultaneous queries, etc in a Tx

Now that revision 0c029965805f is in, it's easy
to guarantee that we never access a driver.Conn
concurrently, per the database/sql/driver contract,
so we can remove this overlarge mutex.

Fixes #3857

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/7707047

12 years agoos/exec: fix fd leak with Std*Pipe + LookPath
Brad Fitzpatrick [Mon, 18 Mar 2013 16:52:39 +0000 (09:52 -0700)]
os/exec: fix fd leak with Std*Pipe + LookPath

If LookPath in Command fails, sets a sticky error, and then
StdinPipe, StdoutPipe, or StderrPipe were called, those pipe
fds were never cleaned up.

Fixes #5071

R=golang-dev, rogpeppe
CC=golang-dev
https://golang.org/cl/7799046

12 years agoruntime: correct mmap return value checking on netbsd/openbsd
Joel Sing [Mon, 18 Mar 2013 01:18:49 +0000 (12:18 +1100)]
runtime: correct mmap return value checking on netbsd/openbsd

The current SysAlloc implementation suffers from a signed vs unsigned
comparision bug. Since the error code from mmap is negated, the
unsigned comparision of v < 4096 is always false on error. Fix this
by switching to the darwin/freebsd/linux mmap model and leave the mmap
return value unmodified.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/7870044

12 years agomisc/dist: fix Windows breakage
Joe Poirier [Sun, 17 Mar 2013 21:56:38 +0000 (08:56 +1100)]
misc/dist: fix Windows breakage

The files could use some attention on the
Windows side but better to wait until after
the upcoming release.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/7621044

12 years agonet: revert Zone in IPNet temporally
Mikio Hara [Sun, 17 Mar 2013 10:50:01 +0000 (19:50 +0900)]
net: revert Zone in IPNet temporally

Update #4501.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/7853047

12 years agomake.bash: delete vestigial TODO, now resolved
Rob Pike [Sat, 16 Mar 2013 21:53:12 +0000 (14:53 -0700)]
make.bash: delete vestigial TODO, now resolved

R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/7789050

12 years agobytes,string: move the BUG to the comment of the function it's about
Rob Pike [Sat, 16 Mar 2013 00:08:07 +0000 (17:08 -0700)]
bytes,string: move the BUG to the comment of the function it's about
Avoids printing it every time we ask a question about the package from
the command line.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7789048

12 years agonet/http: don't test for goroutine leaks in short mode
Brad Fitzpatrick [Fri, 15 Mar 2013 23:50:54 +0000 (16:50 -0700)]
net/http: don't test for goroutine leaks in short mode

Too annoying and flaky to debug for now. Later. This
tangent has taken enough time.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/7863043

12 years agocmd/gc: missing type inference for untyped complex() calls.
Rémy Oudompheng [Fri, 15 Mar 2013 23:37:28 +0000 (00:37 +0100)]
cmd/gc: missing type inference for untyped complex() calls.

Fixes #5014.

R=golang-dev, r, rsc, daniel.morsing
CC=golang-dev
https://golang.org/cl/7664043

12 years agonet/http: fix test breakage on Windows
Brad Fitzpatrick [Fri, 15 Mar 2013 22:58:43 +0000 (15:58 -0700)]
net/http: fix test breakage on Windows

Treat the Windows net server as uninteresting for leak
purposes too.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/7818048

12 years agogo/doc: fix TODO
Robert Griesemer [Fri, 15 Mar 2013 22:55:31 +0000 (15:55 -0700)]
go/doc: fix TODO

R=r
CC=golang-dev
https://golang.org/cl/7716049

12 years agonet/http: less flaky leaking goroutine test
Brad Fitzpatrick [Fri, 15 Mar 2013 22:09:17 +0000 (15:09 -0700)]
net/http: less flaky leaking goroutine test

Fixes #5005

R=golang-dev, adg, fullung
CC=golang-dev
https://golang.org/cl/7777043

12 years agospec: remove special int rule for shifts
Robert Griesemer [Fri, 15 Mar 2013 20:55:50 +0000 (13:55 -0700)]
spec: remove special int rule for shifts

The rule is not concistently followed by gc.
It appears that gccgo is ignoring it. go/types
does not implement this rule. However, both
gccgo and now go/types can compile/type-check
the entire std library (and thus all the shift
expressions occuring in it) w/o errors. For
more details see the discussion in issue 4883.

Fixes #4880.
Fixes #4881.
Fixes #4883.

R=rsc, r, iant, ken, ken, mtj, rogpeppe
CC=golang-dev
https://golang.org/cl/7707043

12 years agoA+C: Herbert Georg Fischer (individual CLA)
Rob Pike [Fri, 15 Mar 2013 20:43:29 +0000 (13:43 -0700)]
A+C: Herbert Georg Fischer (individual CLA)

Generated by addca.

R=gobot
CC=golang-dev
https://golang.org/cl/7861044

12 years agodoc: explain why cmd/go uses https for repositories and how to work around it
Herbert Georg Fischer [Fri, 15 Mar 2013 20:43:10 +0000 (13:43 -0700)]
doc: explain why cmd/go uses https for repositories and how to work around it
Fixes #3418.

R=golang-dev, r
CC=adg, golang-dev
https://golang.org/cl/7712045

12 years agocodereview: re-enable 15-second status prints
Russ Cox [Fri, 15 Mar 2013 20:33:04 +0000 (16:33 -0400)]
codereview: re-enable 15-second status prints

Also print all status changes when using hg -v.

The start_status_thread call was lost during the refactoring in
https://golang.org/cl/5395044/diff/6006/lib/codereview/codereview.py
Oops.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/7834044

12 years agoruntime: scan the type of an interface value
Jan Ziak [Fri, 15 Mar 2013 20:07:52 +0000 (16:07 -0400)]
runtime: scan the type of an interface value

R=golang-dev, rsc, bradfitz
CC=golang-dev
https://golang.org/cl/7744047

12 years agonet, runtime: enable runtime-integrated pollster on Linux/ARM.
Shenghou Ma [Fri, 15 Mar 2013 20:01:56 +0000 (04:01 +0800)]
net, runtime: enable runtime-integrated pollster on Linux/ARM.

Results from linux/arm on a Samsung Chromebook (from dfc):
localhost(~/go/src/pkg/net) % ~/go/misc/benchcmp {old,new}.txt
benchmark                           old ns/op    new ns/op    delta
BenchmarkTCP4OneShot                   568840       350526  -38.38%
BenchmarkTCP4OneShot-2                 359054       206708  -42.43%
BenchmarkTCP4OneShotTimeout            637464       363550  -42.97%
BenchmarkTCP4OneShotTimeout-2          374255       216695  -42.10%
BenchmarkTCP4Persistent                184974        64984  -64.87%
BenchmarkTCP4Persistent-2              109902        47195  -57.06%
BenchmarkTCP4PersistentTimeout         210039        64789  -69.15%
BenchmarkTCP4PersistentTimeout-2       124284        43374  -65.10%
BenchmarkTCP6OneShot                   672278       362116  -46.14%
BenchmarkTCP6OneShot-2                 383631       216400  -43.59%
BenchmarkTCP6OneShotTimeout            680740       378306  -44.43%
BenchmarkTCP6OneShotTimeout-2          397524       230152  -42.10%
BenchmarkTCP6Persistent                172346        65292  -62.12%
BenchmarkTCP6Persistent-2              106229        42096  -60.37%
BenchmarkTCP6PersistentTimeout         161149        65138  -59.58%
BenchmarkTCP6PersistentTimeout-2       152276        44548  -70.75%

R=golang-dev, dave, bradfitz, dvyukov, rsc
CC=golang-dev
https://golang.org/cl/7820045

12 years agocmd/gc: ensure unique parameter and result names in function types
Russ Cox [Fri, 15 Mar 2013 19:24:13 +0000 (15:24 -0400)]
cmd/gc: ensure unique parameter and result names in function types

In addition to fixing the bug, the check is now linear instead of quadratic.

Fixes #4469.

R=ken2
CC=golang-dev
https://golang.org/cl/7773047

12 years agodoc/go_faq.html: add entry about pointer to interface
Rob Pike [Fri, 15 Mar 2013 18:38:50 +0000 (11:38 -0700)]
doc/go_faq.html: add entry about pointer to interface

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7546050

12 years agonet: fix build with CGO_ENABLED=0
Dmitriy Vyukov [Fri, 15 Mar 2013 18:23:35 +0000 (22:23 +0400)]
net: fix build with CGO_ENABLED=0

R=golang-dev, rsc, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/7857044

12 years agoruntime: use AES hash for compound objects.
Keith Randall [Fri, 15 Mar 2013 17:46:34 +0000 (10:46 -0700)]
runtime: use AES hash for compound objects.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/7716047

12 years agobuild: skip benchmarks on OpenBSD
Russ Cox [Fri, 15 Mar 2013 16:39:14 +0000 (12:39 -0400)]
build: skip benchmarks on OpenBSD

They are making the build die. I want to be able to see that everything else is okay.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7546049

12 years agoruntime: remove struct BitTarget
Jan Ziak [Fri, 15 Mar 2013 16:37:40 +0000 (12:37 -0400)]
runtime: remove struct BitTarget

R=golang-dev
CC=dvyukov, golang-dev, rsc
https://golang.org/cl/7845043

12 years agobuild: fix for 32-bit windows builds on 64-bit windows system
Russ Cox [Fri, 15 Mar 2013 16:30:14 +0000 (12:30 -0400)]
build: fix for 32-bit windows builds on 64-bit windows system

Thanks to jon.forums@ for the fix.

Fixes #5051.

R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/7813045

12 years agoruntime: unbreak netbsd builds
Joel Sing [Fri, 15 Mar 2013 15:43:43 +0000 (11:43 -0400)]
runtime: unbreak netbsd builds

Fix signal handling so that Go builds on NetBSD.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/7759048

12 years agocmd/gc: fix escape analysis bug.
Rémy Oudompheng [Fri, 15 Mar 2013 08:03:45 +0000 (09:03 +0100)]
cmd/gc: fix escape analysis bug.

It used to not mark parameters as escaping if only one of the
fields it points to leaks out of the function. This causes
problems when importing from another package.

Fixes #4964.

R=rsc, lvd, dvyukov, daniel.morsing
CC=golang-dev
https://golang.org/cl/7648045

12 years agoruntime: replace lock() with casp() in the GC
Jan Ziak [Fri, 15 Mar 2013 08:02:36 +0000 (09:02 +0100)]
runtime: replace lock() with casp() in the GC

Note: BitTarget will be removed by a forthcoming changeset.

R=golang-dev, dvyukov
CC=golang-dev, rsc
https://golang.org/cl/7837044

12 years agocmd/gc: unroll small array types
Jan Ziak [Fri, 15 Mar 2013 05:57:50 +0000 (06:57 +0100)]
cmd/gc: unroll small array types

R=golang-dev, rsc
CC=golang-dev, nigeltao
https://golang.org/cl/7812044

12 years agoruntime: accept GOTRACEBACK=crash to mean 'crash after panic'
Russ Cox [Fri, 15 Mar 2013 05:11:03 +0000 (01:11 -0400)]
runtime: accept GOTRACEBACK=crash to mean 'crash after panic'

This provides a way to generate core dumps when people need them.
The settings are:

        GOTRACEBACK=0  no traceback on panic, just exit
        GOTRACEBACK=1  default - traceback on panic, then exit
        GOTRACEBACK=2  traceback including runtime frames on panic, then exit
        GOTRACEBACK=crash traceback including runtime frames on panic, then crash

Fixes #3257.

R=golang-dev, devon.odell, r, daniel.morsing, ality
CC=golang-dev
https://golang.org/cl/7666044

12 years agocmd/gc: disallow fallthrough in final case of switch
Tyler Bunnell [Fri, 15 Mar 2013 04:35:09 +0000 (00:35 -0400)]
cmd/gc: disallow fallthrough in final case of switch

Small change to cmd/gc to catch a "fallthrough" in the final case of a switch.

R=golang-dev, rsc, mtj
CC=golang-dev
https://golang.org/cl/7841043

12 years agocmd/dist: instruct the user to bind $GOBIN on Plan 9
Anthony Martin [Fri, 15 Mar 2013 04:04:19 +0000 (05:04 +0100)]
cmd/dist: instruct the user to bind $GOBIN on Plan 9

R=seed, rminnich, bradfitz, r
CC=golang-dev
https://golang.org/cl/7395059

12 years agoos/signal: add Stop, be careful about SIGHUP
Russ Cox [Fri, 15 Mar 2013 04:00:02 +0000 (00:00 -0400)]
os/signal: add Stop, be careful about SIGHUP

Fixes #4268.
Fixes #4491.

R=golang-dev, nightlyone, fullung, r
CC=golang-dev
https://golang.org/cl/7546048

12 years agogo/build: allow ~ in middle of path, just not at beginning
Jonathan Nieder [Fri, 15 Mar 2013 03:59:49 +0000 (23:59 -0400)]
go/build: allow ~ in middle of path, just not at beginning

CL 7799045 relaxed the restriction in cmd/go on ~ in GOPATH
to allow paths with ~ in the middle while continuing to
protect against the common mistake of using GOPATH='~/home'
instead of GOPATH=~/home.  Unfortunately go/build still
filters these paths out:

        $ GOPATH=/tmp/test~ing go build
        test.go:22:2: cannot find package "test" in any of:
                /usr/lib/go/test (from $GOROOT)
                ($GOPATH not set)

So relax the requirement in go/build, too.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/7826043

12 years agoCONTRIBUTORS: add Jonathan Nieder (Google CLA)
Russ Cox [Fri, 15 Mar 2013 03:59:41 +0000 (23:59 -0400)]
CONTRIBUTORS: add Jonathan Nieder (Google CLA)

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7842043

12 years agomisc/dashboard/codereview: better debugging when some fetches fail.
David Symonds [Fri, 15 Mar 2013 03:45:00 +0000 (14:45 +1100)]
misc/dashboard/codereview: better debugging when some fetches fail.

R=rsc
CC=golang-dev
https://golang.org/cl/7836045

12 years agoruntime: use 64-bit negative error code on 64-bit machines
Russ Cox [Fri, 15 Mar 2013 03:42:11 +0000 (23:42 -0400)]
runtime: use 64-bit negative error code on 64-bit machines

NEGL does a negation of the bottom 32 bits and then zero-extends to 64 bits,
resulting in a negative 32-bit number but a positive 64-bit number.

NEGQ does a full 64-bit negation, so that the result is negative both as
a 32-bit and as a 64-bit number.

This doesn't matter for the functions that are declared to return int32.
It only matters for the ones that return int64 or void* [sic].

This will fix the current incorrect error in the OpenBSD/amd64 build.
The build will still be broken, but it won't report a bogus error.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7536046

12 years agomisc/dashboard/codereview: add more people.
David Symonds [Fri, 15 Mar 2013 03:33:00 +0000 (14:33 +1100)]
misc/dashboard/codereview: add more people.

I picked everyone who has committed a CL on behalf of someone else in recent times.

R=r, rsc
CC=golang-dev
https://golang.org/cl/7836044

12 years agodatabase/sql: associate a mutex with each driver interface
Brad Fitzpatrick [Thu, 14 Mar 2013 22:01:45 +0000 (15:01 -0700)]
database/sql: associate a mutex with each driver interface

The database/sql/driver docs make this promise:

   "Conn is a connection to a database. It is not used
   concurrently by multiple goroutines."

That promises exists as part of database/sql's overall
goal of making drivers relatively easy to write.

So far this promise has been kept without the use of locks by
being careful in the database/sql package, but sometimes too
careful. (cf. golang.org/issue/3857)

The CL associates a Mutex with each driver.Conn, and with the
interface value progeny thereof. (e.g. each driver.Tx,
driver.Stmt, driver.Rows, driver.Result, etc) Then whenever
those interface values are used, the Locker is locked.

This CL should be a no-op (aside from some new Lock/Unlock
pairs) and doesn't attempt to fix Issue 3857 or Issue 4459,
but should make it much easier in a subsequent CL.

Update #3857

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/7803043

12 years agoruntime: fix netbsd after reorg (again)
Russ Cox [Thu, 14 Mar 2013 21:59:45 +0000 (17:59 -0400)]
runtime: fix netbsd after reorg (again)

R=golang-dev
CC=golang-dev
https://golang.org/cl/7719046