]> Cypherpunks repositories - gostls13.git/log
gostls13.git
11 years agoruntime: fix finalizer test on amd64
Russ Cox [Wed, 2 Oct 2013 16:30:49 +0000 (12:30 -0400)]
runtime: fix finalizer test on amd64

Not scanning the stack by frames means we are reintroducing
a few false positives into the collection. Run the finalizer registration
in its own goroutine so that stack is guaranteed to be out of
consideration in a later collection.

This is working around a regression from yesterday's tip, but
it's not a regression from Go 1.1.

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

11 years agocmd/gc: qualified embedded fields with owner package.
Rémy Oudompheng [Wed, 2 Oct 2013 16:27:33 +0000 (12:27 -0400)]
cmd/gc: qualified embedded fields with owner package.

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

11 years agocrypto/tls: Update reference to the TLS 1.2 RFC.
Frithjof Schulze [Wed, 2 Oct 2013 16:09:13 +0000 (12:09 -0400)]
crypto/tls: Update reference to the TLS 1.2 RFC.

Ticket 13740047 updated the documented TLS version to 1.2.
This also updates the RFC refered to.

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

11 years agoruntime: do not scan stack by frames during garbage collection
Russ Cox [Wed, 2 Oct 2013 15:59:53 +0000 (11:59 -0400)]
runtime: do not scan stack by frames during garbage collection

Walking the stack by frames is ~3x more expensive
than not, and since it didn't end up being precise,
there is not enough benefit to outweigh the cost.

This is the conservative choice: this CL makes the
stack scanning behavior the same as it was in Go 1.1.

Add benchmarks to package runtime so that we have
them when we re-enable this feature during the
Go 1.3 development.

benchmark                     old ns/op    new ns/op    delta
BenchmarkGoroutineSelect        3194909      1272092  -60.18%
BenchmarkGoroutineBlocking      3120282       866366  -72.23%
BenchmarkGoroutineForRange      3256179       939902  -71.13%
BenchmarkGoroutineIdle          2005571       482982  -75.92%

The Go 1 benchmarks, just to add more data.
As far as I can tell the changes are mainly noise.

benchmark                         old ns/op    new ns/op    delta
BenchmarkBinaryTree17            4409403046   4414734932   +0.12%
BenchmarkFannkuch11              3407708965   3378306120   -0.86%
BenchmarkFmtFprintfEmpty                100           99   -0.60%
BenchmarkFmtFprintfString               242          239   -1.24%
BenchmarkFmtFprintfInt                  204          206   +0.98%
BenchmarkFmtFprintfIntInt               320          316   -1.25%
BenchmarkFmtFprintfPrefixedInt          295          299   +1.36%
BenchmarkFmtFprintfFloat                442          435   -1.58%
BenchmarkFmtManyArgs                   1246         1216   -2.41%
BenchmarkGobDecode                 10186951     10051210   -1.33%
BenchmarkGobEncode                 16504381     16445650   -0.36%
BenchmarkGzip                     447030885    447056865   +0.01%
BenchmarkGunzip                   111056154    111696305   +0.58%
BenchmarkHTTPClientServer             89973        93040   +3.41%
BenchmarkJSONEncode                28174182     27933893   -0.85%
BenchmarkJSONDecode               106353777    110443817   +3.85%
BenchmarkMandelbrot200              4822289      4806083   -0.34%
BenchmarkGoParse                    6102436      6142734   +0.66%
BenchmarkRegexpMatchEasy0_32            133          132   -0.75%
BenchmarkRegexpMatchEasy0_1K            372          373   +0.27%
BenchmarkRegexpMatchEasy1_32            113          111   -1.77%
BenchmarkRegexpMatchEasy1_1K            964          940   -2.49%
BenchmarkRegexpMatchMedium_32           202          205   +1.49%
BenchmarkRegexpMatchMedium_1K         68862        68858   -0.01%
BenchmarkRegexpMatchHard_32            3480         3407   -2.10%
BenchmarkRegexpMatchHard_1K          108255       112614   +4.03%
BenchmarkRevcomp                  751393035    743929976   -0.99%
BenchmarkTemplate                 139637041    135402220   -3.03%
BenchmarkTimeParse                      479          475   -0.84%
BenchmarkTimeFormat                     460          466   +1.30%

benchmark                          old MB/s     new MB/s  speedup
BenchmarkGobDecode                    75.34        76.36    1.01x
BenchmarkGobEncode                    46.50        46.67    1.00x
BenchmarkGzip                         43.41        43.41    1.00x
BenchmarkGunzip                      174.73       173.73    0.99x
BenchmarkJSONEncode                   68.87        69.47    1.01x
BenchmarkJSONDecode                   18.25        17.57    0.96x
BenchmarkGoParse                       9.49         9.43    0.99x
BenchmarkRegexpMatchEasy0_32         239.58       241.74    1.01x
BenchmarkRegexpMatchEasy0_1K        2749.74      2738.00    1.00x
BenchmarkRegexpMatchEasy1_32         282.49       286.32    1.01x
BenchmarkRegexpMatchEasy1_1K        1062.00      1088.96    1.03x
BenchmarkRegexpMatchMedium_32          4.93         4.86    0.99x
BenchmarkRegexpMatchMedium_1K         14.87        14.87    1.00x
BenchmarkRegexpMatchHard_32            9.19         9.39    1.02x
BenchmarkRegexpMatchHard_1K            9.46         9.09    0.96x
BenchmarkRevcomp                     338.26       341.65    1.01x
BenchmarkTemplate                     13.90        14.33    1.03x

Fixes #6482.

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

11 years agocmd/dist, build: support building statically linked toolchain
Shenghou Ma [Wed, 2 Oct 2013 03:44:20 +0000 (23:44 -0400)]
cmd/dist, build: support building statically linked toolchain

Added a new $GO_DISTFLAGS to make.bash, and while we're here,
added mention $CXX in make.bash (CL 13704044).

Fixes #6448.
Update #3564
We can pass GO_DISTFLAGS=-s from misc/dist to make.bash so that
it will build a statically linked toolchain.
(Note: OS X doesn't have the concept of static linking, so don't
pass GO_DISTFLAGS=-s for OS X builds)

R=adg, rsc, iant
CC=golang-dev
https://golang.org/cl/13887043

11 years agodoc: rename @go_nuts to @golang
Andrew Gerrand [Wed, 2 Oct 2013 01:46:44 +0000 (11:46 +1000)]
doc: rename @go_nuts to @golang

Yay!

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

11 years agocmd/go: use -installsuffix to determine the includes directory list
Dave Day [Wed, 2 Oct 2013 00:44:57 +0000 (20:44 -0400)]
cmd/go: use -installsuffix to determine the includes directory list

Currently, the directories generaed by includeArgs can have the "_race"
suffix added if invoked with -race flag, but ignores -installsuffix if
set.

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

11 years agomisc/vim: Separate package and package members.
Yasuhiro Matsumoto [Tue, 1 Oct 2013 22:52:51 +0000 (08:52 +1000)]
misc/vim: Separate package and package members.
This change allow to godoc:
    :Godoc github.com/mattn/go-gtk/gtk
    :Godoc github.com/mattn/go-gtk/gtk NewWindow
    :Godoc encoding/json
    :Godoc encoding/json Marshal

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

11 years agoC: add Dave Day (Google CLA).
David Symonds [Tue, 1 Oct 2013 01:24:24 +0000 (11:24 +1000)]
C: add Dave Day (Google CLA).

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

11 years agoundo CL 14154043 / 3e485428767e
Carl Shapiro [Mon, 30 Sep 2013 23:02:12 +0000 (16:02 -0700)]
undo CL 14154043 / 3e485428767e

««« original CL description
encoding/gob: do not hide pointer argument for the garbage collector

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

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

11 years agoencoding/gob: do not hide pointer argument for the garbage collector
Carl Shapiro [Mon, 30 Sep 2013 22:54:21 +0000 (15:54 -0700)]
encoding/gob: do not hide pointer argument for the garbage collector

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

11 years agorace.bash, race.bat: build a race enabled cmd/cgo before trying to use it
Dave Cheney [Sun, 29 Sep 2013 00:34:41 +0000 (10:34 +1000)]
race.bash, race.bat: build a race enabled cmd/cgo before trying to use it

Fixes #5537.

To avoid `go install -v race std` replacing cmd/cgo with a race enabled version and another package trying to build a cgo enabled package, always build cmd/cgo race enabled before doing the rest of the build.

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

11 years agotest: match gccgo error messages for blank1.go
Ian Lance Taylor [Sat, 28 Sep 2013 22:19:05 +0000 (15:19 -0700)]
test: match gccgo error messages for blank1.go

blank1.go:10:9: error: invalid package name _
blank1.go:17:2: error: cannot use _ as value
blank1.go:18:7: error: cannot use _ as value
blank1.go:20:8: error: invalid use of ‘_’

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

11 years agotest: recognize gccgo error message in index.go
Ian Lance Taylor [Sat, 28 Sep 2013 03:38:52 +0000 (20:38 -0700)]
test: recognize gccgo error message in index.go

When a floating point constant is used as an array/slice
index, gccgo prints "error: index must be integer"; gc prints
"constant 2.1 truncated to integer".

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

11 years agosyscall: Fix one issue detected by vet.
Robin Eklind [Sat, 28 Sep 2013 01:06:50 +0000 (11:06 +1000)]
syscall: Fix one issue detected by vet.

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

11 years agoencoding/json: Tweak documentation for Encoder.Encode.
Kamil Kisiel [Fri, 27 Sep 2013 05:38:39 +0000 (15:38 +1000)]
encoding/json: Tweak documentation for Encoder.Encode.

The documentation for the Encoder type calls it a stream,
not a connection.

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

11 years agoreflect: expose reflect.call argument slice to the garbage collector
Carl Shapiro [Fri, 27 Sep 2013 04:59:13 +0000 (21:59 -0700)]
reflect: expose reflect.call argument slice to the garbage collector

The argument slice was kept hidden from the garbage collector
by destroying its referent in an unsafe.Pointer to uintptr
conversion.  This change preserves the unsafe.Pointer referent
and only performs an unsafe.Pointer to uintptr conversions
within expressions that construct new unsafe.Pointer values.

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

11 years agomisc/vim: "PACKAGE DOCUMENTATION" is not hilighted
Yasuhiro Matsumoto [Fri, 27 Sep 2013 02:57:09 +0000 (12:57 +1000)]
misc/vim: "PACKAGE DOCUMENTATION" is not hilighted

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

11 years agomisc/vim: godoc is optional. so should point installation instruction.
Yasuhiro Matsumoto [Fri, 27 Sep 2013 02:35:03 +0000 (12:35 +1000)]
misc/vim: godoc is optional. so should point installation instruction.

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

11 years agoall: fix some mistakes found by go tool vet .
Rob Pike [Fri, 27 Sep 2013 00:09:15 +0000 (10:09 +1000)]
all: fix some mistakes found by go tool vet .

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

11 years agodoc: update links to spec and memory model
Andrew Gerrand [Thu, 26 Sep 2013 23:46:36 +0000 (09:46 +1000)]
doc: update links to spec and memory model

Fixes #6488.

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

11 years agocrypto/tls: don't select TLS 1.2 cipher suites in prior versions.
Adam Langley [Thu, 26 Sep 2013 21:09:56 +0000 (17:09 -0400)]
crypto/tls: don't select TLS 1.2 cipher suites in prior versions.

AES-GCM cipher suites are only defined for TLS 1.2, although there's
nothing really version specific about them. However, development
versions of NSS (meaning Firefox and Chrome) have an issue where
they'll advertise TLS 1.2-only cipher suites in a TLS 1.1 ClientHello
but then balk when the server selects one.

This change causes Go clients not to advertise TLS 1.2 cipher suites
unless TLS 1.2 is being used, and prevents servers from selecting them
unless TLS 1.2 has been negotiated.

https://code.google.com/p/chromium/issues/detail?id=297151
https://bugzilla.mozilla.org/show_bug.cgi?id=919677

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

11 years agoruntime, syscall: update freebsd/arm calling convention to match EABI
Dave Cheney [Thu, 26 Sep 2013 11:35:49 +0000 (21:35 +1000)]
runtime, syscall: update freebsd/arm calling convention to match EABI

Fixes #6451.

There is still some breakages unrelated to the syscall change.

[root@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap version
go version devel freebsd/arm
a std@beaglebone ~/go/src]# /root/go/pkg/tool/freebsd_arm/go_bootstrap install -
fatal error: mark - finalizer inconsistency

runtime stack:
runtime.throw(0x3e80ac)
        /root/go/src/pkg/runtime/panic.c:464 +0x5c
addfinroots(0x2)
        /root/go/src/pkg/runtime/mgc0.c:1501 +0x74
runtime.walkfintab(0x6c200)
        /root/go/src/pkg/runtime/mfinal.c:216 +0xa0
addroots()
        /root/go/src/pkg/runtime/mgc0.c:1561 +0x188
gc(0x50632f78)
        /root/go/src/pkg/runtime/mgc0.c:2098 +0x19c
mgc(0x306170a0)
        /root/go/src/pkg/runtime/mgc0.c:2049 +0x30
runtime.mcall(0x3e97b0)
        /root/go/src/pkg/runtime/asm_arm.s:165 +0x3c

goroutine 1 [garbage collection]:
runtime.gc(0x0)
        /root/go/src/pkg/runtime/mgc0.c:2020 +0x1a0 fp=0x50632f80
runtime.mallocgc(0x680, 0x1b1971, 0x1)
        /root/go/src/pkg/runtime/malloc.goc:143 +0x210 fp=0x50632fbc
----- stack segment boundary -----
cnew(0x1b1970, 0x640, 0x1)
        /root/go/src/pkg/runtime/malloc.goc:718 +0xc4 fp=0x50626110
runtime.cnewarray(0x1b1970, 0x640)
        /root/go/src/pkg/runtime/malloc.goc:731 +0x3c fp=0x50626120
makeslice1(0x1ac6d0, 0x500, 0x640, 0x50626190)
        /root/go/src/pkg/runtime/slice.c:57 +0x50 fp=0x5062612c
growslice1(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x501, ...)
        /root/go/src/pkg/runtime/slice.c:113 +0x8c fp=0x50626144
runtime.growslice(0x1ac6d0, 0x30714a00, 0x500, 0x500, 0x1, ...)
        /root/go/src/pkg/runtime/slice.c:80 +0x19c fp=0x50626174
go/build.(*importReader).readByte(0x3070d1b0, 0xb384e)
        /root/go/src/pkg/go/build/read.go:43 +0xbc fp=0x506261b4
go/build.(*importReader).peekByte(0x3070d1b0, 0x3070d101, 0x3070d180)
        /root/go/src/pkg/go/build/read.go:89 +0x210 fp=0x506261d0
go/build.readComments(0x203e2560, 0x306f79a8, 0x306f79a8, 0x203e2560, 0x306f79a8, ...)
        /root/go/src/pkg/go/build/read.go:194 +0x84 fp=0x506261f4
go/build.(*Context).matchFile(0x3e9730, 0x306209c0, 0x13, 0x306c42b4, 0x5, ...)
        /root/go/src/pkg/go/build/build.go:812 +0x74c fp=0x5062629c
go/build.(*Context).Import(0x3e9730, 0x1f95c8, 0x1, 0x30620960, 0x13, ...)
        /root/go/src/pkg/go/build/build.go:580 +0xd64 fp=0x506268dc
go/build.(*Context).ImportDir(0x3e9730, 0x30620960, 0x13, 0x0, 0x24d901, ...)
        /root/go/src/pkg/go/build/build.go:397 +0x5c fp=0x50626904
main.func·021(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x0, ...)
        /root/go/src/cmd/go/main.go:521 +0x2cc fp=0x5062696c
path/filepath.walk(0x30620960, 0x13, 0x203e2200, 0x30680330, 0x50626ae8, ...)
        /root/go/src/pkg/path/filepath/path.go:341 +0x5c fp=0x506269d8
path/filepath.walk(0x3067e720, 0x11, 0x203e2200, 0x30680210, 0x50626ae8, ...)
        /root/go/src/pkg/path/filepath/path.go:359 +0x308 fp=0x50626a44
path/filepath.Walk(0x3067e720, 0x11, 0x50626ae8, 0x1f9728, 0x1)
        /root/go/src/pkg/path/filepath/path.go:380 +0xb4 fp=0x50626a68
main.matchPackages(0xbfffedea, 0x3, 0x1b1190, 0x3067e600, 0x10)
        /root/go/src/cmd/go/main.go:530 +0x2c0 fp=0x50626b1c
main.allPackages(0xbfffedea, 0x3, 0x1fadc8, 0x3, 0x1)
        /root/go/src/cmd/go/main.go:474 +0x34 fp=0x50626b70
main.importPathsNoDotExpansion(0x30620018, 0x1, 0x1, 0x0, 0xffffffff, ...)
        /root/go/src/cmd/go/main.go:305 +0x2f8 fp=0x50626c04
main.importPaths(0x30620018, 0x1, 0x1, 0x3, 0x0, ...)
        /root/go/src/cmd/go/main.go:315 +0x44 fp=0x50626c88
main.packagesAndErrors(0x30620018, 0x1, 0x1, 0x50626d60, 0x90f44, ...)
        /root/go/src/cmd/go/pkg.go:798 +0x1bc fp=0x50626d1c
main.packagesForBuild(0x30620018, 0x1, 0x1, 0x53490, 0x0, ...)
        /root/go/src/cmd/go/pkg.go:818 +0x44 fp=0x50626dac
main.runInstall(0x3e46e0, 0x30620018, 0x1, 0x1)
        /root/go/src/cmd/go/build.go:311 +0x48 fp=0x50626e60
main.main()
        /root/go/src/cmd/go/main.go:161 +0x518 fp=0x50626f8c
runtime.main()
        /root/go/src/pkg/runtime/proc.c:222 +0x100 fp=0x50626fc0
runtime.goexit()
        /root/go/src/pkg/runtime/proc.c:1396 fp=0x50626fc0

goroutine 3 [syscall]:
os/signal.loop()
        /root/go/src/pkg/os/signal/signal_unix.go:21 +0x24
created by os/signal.init·1
        /root/go/src/pkg/os/signal/signal_unix.go:27 +0x48

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

11 years agocmd/go: "go test -c -test.bench=XX fmt" shouldn't hang
Shenghou Ma [Wed, 25 Sep 2013 20:18:33 +0000 (16:18 -0400)]
cmd/go: "go test -c -test.bench=XX fmt" shouldn't hang
Fixes #6480.

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

11 years agodoc: mention the install locations for godoc, cover, and vet
Andrew Gerrand [Wed, 25 Sep 2013 08:15:29 +0000 (18:15 +1000)]
doc: mention the install locations for godoc, cover, and vet

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

11 years agodoc/go1.2.html: add go/ast.SliceExpr.Slice3
Rob Pike [Wed, 25 Sep 2013 06:17:54 +0000 (16:17 +1000)]
doc/go1.2.html: add go/ast.SliceExpr.Slice3

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

11 years agodoc: fix typo in install-source.html
Andrew Gerrand [Wed, 25 Sep 2013 04:27:23 +0000 (14:27 +1000)]
doc: fix typo in install-source.html

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

11 years agodoc: document installation of go.tools commands
Andrew Gerrand [Wed, 25 Sep 2013 04:10:49 +0000 (14:10 +1000)]
doc: document installation of go.tools commands

Fixes #5663.

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

11 years agocmd/cgo: fix so that tests pass again when using gccgo
Ian Lance Taylor [Wed, 25 Sep 2013 01:11:13 +0000 (18:11 -0700)]
cmd/cgo: fix so that tests pass again when using gccgo

Use the symbol prefixes with the prologue functions when using
gccgo.

Use an & when referring to a function declared as a variable.

Fix the malloc prologue function.

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

11 years agohtml/template: update the Tree field after parsing new templates
Rob Pike [Wed, 25 Sep 2013 00:00:09 +0000 (10:00 +1000)]
html/template: update the Tree field after parsing new templates
After text/template.Parse, all the templates may have changed, so
we need to set them all back to their unescaped state. The code
did this but (mea culpa) forgot to set the Tree field of the html/template
struct.

Since the Tree is reset during escaping, this only matters if an error
arises during escaping and we want to print a message.

Fixes #6459.

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

11 years agogo/ast: add Slice3 field to SliceExpr
Robert Griesemer [Tue, 24 Sep 2013 23:35:35 +0000 (16:35 -0700)]
go/ast: add Slice3 field to SliceExpr

If Slice3 is set, the expression is
a 3-index slice expression (2 colons).
Required for type-checking.

Backward-compatible API extension.

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

11 years agomath/big: Fix variable name in documentation for *Int.Bytes and BitLen.
Kamil Kisiel [Tue, 24 Sep 2013 23:32:23 +0000 (16:32 -0700)]
math/big: Fix variable name in documentation for *Int.Bytes and BitLen.

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

11 years agosync/atomic: adjust for new runtime.cas64 prototype
Russ Cox [Tue, 24 Sep 2013 19:54:48 +0000 (15:54 -0400)]
sync/atomic: adjust for new runtime.cas64 prototype

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

11 years agocmd/cgo: retain Go pointer passed to C call for duration of call
Russ Cox [Tue, 24 Sep 2013 19:52:48 +0000 (15:52 -0400)]
cmd/cgo: retain Go pointer passed to C call for duration of call

Fixes #6397.

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

11 years agocmd/dist, cmd/go: embed default C++ compiler into cmd/go
Shenghou Ma [Tue, 24 Sep 2013 04:17:08 +0000 (00:17 -0400)]
cmd/dist, cmd/go: embed default C++ compiler into cmd/go
Fixes #6426.

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

11 years agonet: re-enable raw socket tests on windows
Alex Brainman [Tue, 24 Sep 2013 03:15:49 +0000 (13:15 +1000)]
net: re-enable raw socket tests on windows

Since CL 38bf89161a72 raw socket tests are not executed
on windows builders. This change re-enable them again.
It will attempt to run raw socket tests only if user
is permitted to create raw socket by OS.

Fixes #6392

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

11 years agoencoding/json: don't cache value addressability when building first encoder
Brad Fitzpatrick [Tue, 24 Sep 2013 02:57:19 +0000 (19:57 -0700)]
encoding/json: don't cache value addressability when building first encoder

newTypeEncoder (called once per type and then cached) was
looking at the first value seen of that type's addressability
and caching the encoder decision.  If the first value seen was
addressable and a future one wasn't, it would panic.

Instead, introduce a new wrapper encoder type that checks
CanAddr at runtime.

Fixes #6458

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

11 years agonet: ensure that ResolveTCPAddr(addr.String()) reproduces addr
Russ Cox [Tue, 24 Sep 2013 02:40:24 +0000 (22:40 -0400)]
net: ensure that ResolveTCPAddr(addr.String()) reproduces addr

And same for UDP.

Fixes #6465.

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

11 years agonet: fix Close of autobind unix listener
Albert Strasheim [Tue, 24 Sep 2013 02:33:42 +0000 (22:33 -0400)]
net: fix Close of autobind unix listener

Fixes #6455.

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

11 years agoreflect: update docs; Interface can return a method value
Andrew Gerrand [Tue, 24 Sep 2013 00:49:54 +0000 (10:49 +1000)]
reflect: update docs; Interface can return a method value

Fixes #6460.

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

11 years agonet/http: accept Content-Range for entire file
Russ Cox [Mon, 23 Sep 2013 21:16:59 +0000 (17:16 -0400)]
net/http: accept Content-Range for entire file

Fixes a bug reported privately.

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

11 years agomisc/pprof: support block profile
Dmitriy Vyukov [Mon, 23 Sep 2013 21:15:20 +0000 (14:15 -0700)]
misc/pprof: support block profile
Fixes #6347.

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

11 years agoapi: update next.txt
Brad Fitzpatrick [Mon, 23 Sep 2013 20:56:21 +0000 (13:56 -0700)]
api: update next.txt

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

11 years agocmd/cgo: update #cgo docs to reflect reality
Russ Cox [Mon, 23 Sep 2013 20:29:53 +0000 (16:29 -0400)]
cmd/cgo: update #cgo docs to reflect reality

The syntax accepted is full build constraints, not just
GOOS, GOARCH, and GOOS/GOARCH.

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

11 years agoruntime/pprof: fix profile parser in test
Russ Cox [Mon, 23 Sep 2013 20:05:36 +0000 (16:05 -0400)]
runtime/pprof: fix profile parser in test

Fixes #6417.

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

11 years agocrypto/tls: document that the package supports TLS 1.2
Russ Cox [Mon, 23 Sep 2013 20:05:23 +0000 (16:05 -0400)]
crypto/tls: document that the package supports TLS 1.2

Fixes #6456.

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

11 years agoundo CL 13321048 / 9567c5da6e25
Russ Cox [Mon, 23 Sep 2013 19:58:35 +0000 (15:58 -0400)]
undo CL 13321048 / 9567c5da6e25

Makes build unnecessarily slower. Will fix the parser instead.

««« original CL description
runtime/pprof: run TestGoroutineSwitch for longer

Short test now takes about 0.5 second here.

Fixes #6417.

The failure was also seen on our builders.

R=golang-dev, minux.ma, r
CC=golang-dev
https://golang.org/cl/13321048
»»»

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

11 years agoreflect: add example for StructTag
Kamil Kisiel [Mon, 23 Sep 2013 17:19:08 +0000 (13:19 -0400)]
reflect: add example for StructTag

Fix a few minor vet quibbles while I'm here.

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

11 years agocmd/ld: fix "_image_base__ not defined" problem for cmd/8l.
Shenghou Ma [Mon, 23 Sep 2013 17:08:00 +0000 (13:08 -0400)]
cmd/ld: fix "_image_base__ not defined" problem for cmd/8l.
Fixes #6431.

Change suggested by kin.wilson.za.

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

11 years agogo/build: add go1.2 build tag
Péter Surányi [Mon, 23 Sep 2013 08:11:25 +0000 (18:11 +1000)]
go/build: add go1.2 build tag

Fixes #6449.

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

11 years agofmt: one bad index shouldn't spoil them all
Rob Pike [Mon, 23 Sep 2013 06:03:57 +0000 (16:03 +1000)]
fmt: one bad index shouldn't spoil them all

In an indexed verb such as %[3]d, if the index is out of range, don't
skip processing the rest of the verbs. The bug was that the bad
index set a bit for the whole format instead of just the verb.

Ok for 1.2 because this is a bug in a 1.2 feature.

Fixes #6434

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

11 years agodoc/go1.2: document that godoc and vet will always be installed to their old location...
Shenghou Ma [Mon, 23 Sep 2013 05:23:42 +0000 (01:23 -0400)]
doc/go1.2: document that godoc and vet will always be installed to their old locations (not $GOPATH/bin).

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

11 years agodoc: mention os/exec StdinPipe change in Go 1.2 doc
Andrew Gerrand [Mon, 23 Sep 2013 05:14:26 +0000 (15:14 +1000)]
doc: mention os/exec StdinPipe change in Go 1.2 doc

Fixes #6439.

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

11 years agodoc/go1.2.html: fix 3-index slice example
Rob Pike [Mon, 23 Sep 2013 04:41:20 +0000 (14:41 +1000)]
doc/go1.2.html: fix 3-index slice example
A number was wrong; adjust as suggested to make things clearer.
Fixes #6452

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

11 years agonet/http: send correct time in Date header.
Dmitry Chestnykh [Mon, 23 Sep 2013 02:53:55 +0000 (19:53 -0700)]
net/http: send correct time in Date header.

Date header indicated that it contained GMT time,
however it actually sent local time. Fixed by
converting time to UTC.

Also fixes incorrect comment in appendTime().

Regression since CL 9432046.

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

11 years agomisc/notepadplus: fix some number syntax highlight issue
ChaiShushan [Mon, 23 Sep 2013 01:35:17 +0000 (11:35 +1000)]
misc/notepadplus: fix some number syntax highlight issue

notepadplus can only support some normal golang's hex and imaginary numbers.
it can't detect some special number, eg. 1./1.e/1.i/1+0.1i (omit "0" in ".0").

R=golang-dev, gvdschoot
CC=ajstarks, golang-dev
https://golang.org/cl/13401047

11 years agoA+C: Nathan John Youngman (individual CLA)
Andrew Gerrand [Sun, 22 Sep 2013 23:35:52 +0000 (09:35 +1000)]
A+C: Nathan John Youngman (individual CLA)

Generated by addca.

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

11 years agoruntime/race: update runtime to r191161.
Dmitriy Vyukov [Sun, 22 Sep 2013 17:56:06 +0000 (10:56 -0700)]
runtime/race: update runtime to r191161.
Fixes #6305.

R=golang-dev, dave, alex.brainman, r
CC=golang-dev
https://golang.org/cl/13359046

11 years agoruntime/pprof: run TestGoroutineSwitch for longer
Alex Brainman [Sun, 22 Sep 2013 07:31:08 +0000 (17:31 +1000)]
runtime/pprof: run TestGoroutineSwitch for longer

Short test now takes about 0.5 second here.

Fixes #6417.

The failure was also seen on our builders.

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

11 years agocmd/api: always do API check if hg is available
Brad Fitzpatrick [Sun, 22 Sep 2013 07:01:17 +0000 (08:01 +0100)]
cmd/api: always do API check if hg is available

Fixes #6124

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

11 years agodoc/go1.2.html: Go 1.2, not Go1.2
Dominik Honnef [Sat, 21 Sep 2013 21:28:52 +0000 (07:28 +1000)]
doc/go1.2.html: Go 1.2, not Go1.2

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

11 years agodoc/go1.2.html: pre-emption; cgo and C++
Rob Pike [Sat, 21 Sep 2013 07:53:44 +0000 (17:53 +1000)]
doc/go1.2.html: pre-emption; cgo and C++

These were bullet points that I had neglected to flesh out.

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

11 years agotest/chan: avoid wrap-around in memstats comparison
Carl Shapiro [Sat, 21 Sep 2013 00:27:56 +0000 (17:27 -0700)]
test/chan: avoid wrap-around in memstats comparison

The select2.go test assumed that the memory allocated between
its two samplings of runtime.ReadMemStats is strictly
increasing.  To avoid failing the tests when this is not true,
a greater-than check is introduced before computing the
difference in allocated memory.

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

11 years agocmd/yacc: report correct line for 'default action causes potential type clash'
Russ Cox [Fri, 20 Sep 2013 20:00:13 +0000 (16:00 -0400)]
cmd/yacc: report correct line for 'default action causes potential type clash'

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

11 years agotest/run: print command line for running an individual test
Russ Cox [Fri, 20 Sep 2013 19:25:59 +0000 (15:25 -0400)]
test/run: print command line for running an individual test

Fixes #5087.

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

11 years agocmd/gc: fix imported and not used error for import .
Russ Cox [Fri, 20 Sep 2013 19:25:43 +0000 (15:25 -0400)]
cmd/gc: fix imported and not used error for import .

Fixes issues 6420.

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

11 years agocmd/gc: print expression in 'duplicate case in switch' error
Russ Cox [Fri, 20 Sep 2013 19:15:43 +0000 (15:15 -0400)]
cmd/gc: print expression in 'duplicate case in switch' error

The line number alone does not help when the line is
case '~', '*', '(', ')', '[', ']', '{', '}', '?', ':', ';', ',', '*', '%', '^', '!', '=', '<', '>', '+', '-', '&', '|':

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

11 years agoruntime: avoid allocation of internal panic values
Russ Cox [Fri, 20 Sep 2013 19:15:25 +0000 (15:15 -0400)]
runtime: avoid allocation of internal panic values

If a fault happens in malloc, inevitably the next thing that happens
is a deadlock trying to allocate the panic value that says the fault
happened. Stop doing that, two ways.

First, reject panic in malloc just as we reject panic in garbage collection.

Second, runtime.panicstring was using an error implementation
backed by a Go string, so the interface held an allocated *string.
Since the actual errors are C strings, define a new error
implementation backed by a C char*, which needs no indirection
and therefore no allocation.

This second fix will avoid allocation for errors like nil panic derefs
or division by zero, so it is worth doing even though the first fix
should take care of faults during malloc.

Update #6419

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

11 years agotest/fixedbugs/bug295.go: fix test in anticipation of future gc fix
Robert Griesemer [Fri, 20 Sep 2013 16:40:56 +0000 (09:40 -0700)]
test/fixedbugs/bug295.go: fix test in anticipation of future gc fix

See also issue 6428.

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

11 years agocmd/ld: fix "ld -s" to not discard pclntab.
Shenghou Ma [Fri, 20 Sep 2013 14:04:52 +0000 (10:04 -0400)]
cmd/ld: fix "ld -s" to not discard pclntab.
Fixes #6245.

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

11 years agocrypto/x509: update comment on system root cert locations.
David Symonds [Fri, 20 Sep 2013 05:49:26 +0000 (15:49 +1000)]
crypto/x509: update comment on system root cert locations.

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

11 years agotest: add a test that causes gccgo to get a failure at link time
Ian Lance Taylor [Thu, 19 Sep 2013 22:20:39 +0000 (15:20 -0700)]
test: add a test that causes gccgo to get a failure at link time

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

11 years agountag go1.2rc1
Andrew Gerrand [Thu, 19 Sep 2013 12:34:33 +0000 (22:34 +1000)]
untag go1.2rc1

Looks like the dist tool really doesn't like tags.

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

11 years agocmd/gc: cleanup SWITCH nodes after walk.
Rémy Oudompheng [Thu, 19 Sep 2013 07:23:04 +0000 (09:23 +0200)]
cmd/gc: cleanup SWITCH nodes after walk.

Keeping pointers from the pre-walk phase confuses
the race detection instrumentation.

Fixes #6418.

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

11 years agotag go1.2rc1
Andrew Gerrand [Thu, 19 Sep 2013 07:12:00 +0000 (17:12 +1000)]
tag go1.2rc1

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

11 years agomisc/dist: add 'label' part of distro name, include blog content
Andrew Gerrand [Thu, 19 Sep 2013 06:51:29 +0000 (16:51 +1000)]
misc/dist: add 'label' part of distro name, include blog content

This will allow us to cut binaries with names like:
        go1.2rc1.darwin-amd64-osx10.6.pkg
        go1.2rc1.darwin-amd64-osx10.8.pkg

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

11 years agocmd/ld: handle IMAGE_SYM_CLASS_LABEL symbols.
Shenghou Ma [Thu, 19 Sep 2013 06:27:53 +0000 (02:27 -0400)]
cmd/ld: handle IMAGE_SYM_CLASS_LABEL symbols.
Was causing "invalid symbol binding" and thus "malformed pe file" error.

R=golang-dev, alex.brainman, adg
CC=golang-dev
https://golang.org/cl/13722050

11 years agocmd/go: fix missing __mingw_fprintf symbol for cgo on windows
Shenghou Ma [Thu, 19 Sep 2013 05:20:02 +0000 (01:20 -0400)]
cmd/go: fix missing __mingw_fprintf symbol for cgo on windows

Fixes #5986.

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

11 years agocmd/ld: handle duplicate static symbols in COFF and Mach-O files.
Shenghou Ma [Thu, 19 Sep 2013 02:27:25 +0000 (22:27 -0400)]
cmd/ld: handle duplicate static symbols in COFF and Mach-O files.
Fixes #5740.

R=iant, rsc, luisbebop
CC=gobot, golang-dev
https://golang.org/cl/10345046

11 years agocmd/go: write the WORK=/tmp/... line to stderr
Rob Pike [Thu, 19 Sep 2013 01:19:11 +0000 (11:19 +1000)]
cmd/go: write the WORK=/tmp/... line to stderr
Unlike the other output from the -x flag, it was going to stdout.
Fixes #6362.

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

11 years agotest: add a test that gccgo failed to compile
Ian Lance Taylor [Wed, 18 Sep 2013 23:30:38 +0000 (16:30 -0700)]
test: add a test that gccgo failed to compile

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

11 years agotest: add a test that gccgo failed to compile
Ian Lance Taylor [Wed, 18 Sep 2013 22:47:50 +0000 (15:47 -0700)]
test: add a test that gccgo failed to compile

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

11 years agotest: disable failing tests under ssa/interp.
Alan Donovan [Wed, 18 Sep 2013 18:44:57 +0000 (14:44 -0400)]
test: disable failing tests under ssa/interp.

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

11 years agotest: add a test that crashed gccgo
Ian Lance Taylor [Wed, 18 Sep 2013 01:06:58 +0000 (18:06 -0700)]
test: add a test that crashed gccgo

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

11 years agonet/http/cgi: use 'https://' for urls if HTTPS is set.
Thomas Habets [Wed, 18 Sep 2013 00:48:28 +0000 (10:48 +1000)]
net/http/cgi: use 'https://' for urls if HTTPS is set.

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

11 years agoC: add Thomas Habets (Google CLA)
Andrew Gerrand [Wed, 18 Sep 2013 00:48:11 +0000 (10:48 +1000)]
C: add Thomas Habets (Google CLA)

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

11 years agocmd/gc: fix set but not used error
Dave Cheney [Wed, 18 Sep 2013 00:15:52 +0000 (10:15 +1000)]
cmd/gc: fix set but not used error

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

11 years agocmd/go: add basic docs on calling between Go and C/C++
Ian Lance Taylor [Wed, 18 Sep 2013 00:10:48 +0000 (17:10 -0700)]
cmd/go: add basic docs on calling between Go and C/C++

This is a framework for docs on the subject more than it is
actual docs.

The section header in go/doc.go just says "C", not "C/C++,"
because otherwise godoc doesn't recognize the line as a
section header.

Fixes #5473.

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

11 years agotest: avoid future 'declared and not used' error
Robert Griesemer [Tue, 17 Sep 2013 22:24:54 +0000 (15:24 -0700)]
test: avoid future 'declared and not used' error

See also issue 6414.

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

11 years agoencoding/xml: remove dead code
Robert Griesemer [Tue, 17 Sep 2013 22:24:40 +0000 (15:24 -0700)]
encoding/xml: remove dead code

Avoid future 'declared and not used error'.
See also issue 6414.

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

11 years agoreflect: test method calls on pointers to pointers
Ian Lance Taylor [Tue, 17 Sep 2013 22:22:42 +0000 (15:22 -0700)]
reflect: test method calls on pointers to pointers

Gccgo got this wrong, and evidently nothing else tests it.

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

11 years agocmd/gc: eliminate redundant &x.Field nil checks
Russ Cox [Tue, 17 Sep 2013 20:54:22 +0000 (16:54 -0400)]
cmd/gc: eliminate redundant &x.Field nil checks

This eliminates ~75% of the nil checks being emitted,
on all architectures. We can do better, but we need
a bit more general support from the compiler, and
I don't want to do that so close to Go 1.2.
What's here is simple but effective and safe.

A few small code generation cleanups were required
to make the analysis consistent on all systems about
which nil checks are omitted, at least in the test.

Fixes #6019.

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

11 years agocrypto/tls: don't select ECDSA ciphersuites with only an RSA certificate.
Adam Langley [Tue, 17 Sep 2013 17:30:36 +0000 (13:30 -0400)]
crypto/tls: don't select ECDSA ciphersuites with only an RSA certificate.

47ec7a68b1a2 added support for ECDSA ciphersuites but didn't alter the
cipher suite selection to take that into account. Thus Go servers could
try and select an ECDSA cipher suite while only having an RSA
certificate, leading to connection failures.

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

11 years agocmd/cgo: rearrange and update documentation
Ian Lance Taylor [Tue, 17 Sep 2013 14:11:40 +0000 (07:11 -0700)]
cmd/cgo: rearrange and update documentation

In particular document that the Go tool will look for certain
file extensions and compile with them with either the C or the
C++ compiler.

Fixes #6393.

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

11 years agotext/template/parse, html/template: copy Tree.text during html template clone
Josh Bleecher Snyder [Tue, 17 Sep 2013 04:19:44 +0000 (14:19 +1000)]
text/template/parse, html/template: copy Tree.text during html template clone

The root cause of the panic reported in https://code.google.com/p/go/issues/detail?id=5980
is that parse's Tree.Text wasn't being copied during the clone.

Fix this by adding and using a Copy method for parse.Tree.

Fixes #5980.

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

11 years agocmd/6c, cmd/6g, cmd/cc: fix undefined behavior warnings
Dave Cheney [Tue, 17 Sep 2013 03:43:27 +0000 (13:43 +1000)]
cmd/6c, cmd/6g, cmd/cc: fix undefined behavior warnings

Update #5764

Like Tribbles, the more you kill, the more spring up in their place.

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

11 years agoruntime: export PCDATA value reader
Carl Shapiro [Tue, 17 Sep 2013 02:03:19 +0000 (19:03 -0700)]
runtime: export PCDATA value reader

This interface is required to use the PCDATA interface
implemented in Go 1.2.  While initially entirely private, the
FUNCDATA side of the interface has been made public.  This
change completes the FUNCDATA/PCDATA interface.

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

11 years agocmd/gc, runtime: inline append in frontend.
Rémy Oudompheng [Tue, 17 Sep 2013 00:31:21 +0000 (20:31 -0400)]
cmd/gc, runtime: inline append in frontend.

A new transformation during walk turns append calls
into a combination of growslice and memmove.

benchmark                     old ns/op    new ns/op    delta
BenchmarkAppend                     141          141   +0.00%
BenchmarkAppend1Byte                 18           11  -39.56%
BenchmarkAppend4Bytes                19           10  -42.63%
BenchmarkAppend7Bytes                18           10  -42.16%
BenchmarkAppend8Bytes                18           10  -40.44%
BenchmarkAppend15Bytes               19           11  -41.67%
BenchmarkAppend16Bytes               19           11  -41.97%
BenchmarkAppend32Bytes               23           14  -38.82%
BenchmarkAppendStr1Byte              14           10  -23.78%
BenchmarkAppendStr4Bytes             14           11  -21.13%
BenchmarkAppendStr8Bytes             14           10  -25.17%
BenchmarkAppendStr16Bytes            19           11  -41.45%
BenchmarkAppendStr32Bytes            18           14  -19.44%
BenchmarkAppendSpecialCase           62           63   +1.77%

R=golang-dev, khr, cshapiro, rsc, dave
CC=golang-dev
https://golang.org/cl/12815046

11 years agocmd/nm: make -S listing a bit more accurate
Russ Cox [Tue, 17 Sep 2013 00:27:57 +0000 (20:27 -0400)]
cmd/nm: make -S listing a bit more accurate

Hide container symbols like text and etext so that
the individual pieces inside are shown instead.
For example, if text and main.init have the same
address, it was a toss-up which name was printed.

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

11 years agobuild: disable precise collection of stack frames
Russ Cox [Tue, 17 Sep 2013 00:26:10 +0000 (20:26 -0400)]
build: disable precise collection of stack frames

The code for call site-specific pointer bitmaps was not ready in time,
but the zeroing required without it is too expensive to use by default.
We will have to wait for precise collection of stack frames until Go 1.3.

The precise collection can be re-enabled by

        GOEXPERIMENT=precisestack ./all.bash

but that will not be the default for a Go 1.2 build.

Fixes #6087.

R=golang-dev, jeremyjackins, dan.kortschak, r
CC=golang-dev
https://golang.org/cl/13677045