]> Cypherpunks repositories - gostls13.git/log
gostls13.git
11 years agocompress/flate: reduce tiny allocs done by encoder.
Rémy Oudompheng [Sun, 28 Jul 2013 07:42:40 +0000 (09:42 +0200)]
compress/flate: reduce tiny allocs done by encoder.

benchmark                          old allocs   new allocs    delta
BenchmarkEncodeDigitsSpeed1e4             942           91  -90.34%
BenchmarkEncodeDigitsSpeed1e5            1919          178  -90.72%
BenchmarkEncodeDigitsSpeed1e6           18539         1517  -91.82%
BenchmarkEncodeDigitsDefault1e4           734          100  -86.38%
BenchmarkEncodeDigitsDefault1e5          1958          193  -90.14%
BenchmarkEncodeDigitsDefault1e6         17338         1426  -91.78%
BenchmarkEncodeDigitsCompress1e4          734          100  -86.38%
BenchmarkEncodeDigitsCompress1e5         1958          193  -90.14%
BenchmarkEncodeDigitsCompress1e6        17338         1426  -91.78%
BenchmarkEncodeTwainSpeed1e4             1865          109  -94.16%
BenchmarkEncodeTwainSpeed1e5             3943          211  -94.65%
BenchmarkEncodeTwainSpeed1e6            31279         1595  -94.90%
BenchmarkEncodeTwainDefault1e4           1811          103  -94.31%
BenchmarkEncodeTwainDefault1e5           3708          199  -94.63%
BenchmarkEncodeTwainDefault1e6          26738         1330  -95.03%
BenchmarkEncodeTwainCompress1e4          1811          103  -94.31%
BenchmarkEncodeTwainCompress1e5          3693          190  -94.86%
BenchmarkEncodeTwainCompress1e6         26902         1333  -95.04%

benchmark                           old bytes    new bytes    delta
BenchmarkEncodeDigitsSpeed1e4         1469438      1453920   -1.06%
BenchmarkEncodeDigitsSpeed1e5         1490898      1458961   -2.14%
BenchmarkEncodeDigitsSpeed1e6         1858819      1542407  -17.02%
BenchmarkEncodeDigitsDefault1e4       1465903      1454160   -0.80%
BenchmarkEncodeDigitsDefault1e5       1491841      1459361   -2.18%
BenchmarkEncodeDigitsDefault1e6       1825424      1531545  -16.10%
BenchmarkEncodeDigitsCompress1e4      1465903      1454160   -0.80%
BenchmarkEncodeDigitsCompress1e5      1491681      1459361   -2.17%
BenchmarkEncodeDigitsCompress1e6      1825424      1531545  -16.10%
BenchmarkEncodeTwainSpeed1e4          1485308      1454400   -2.08%
BenchmarkEncodeTwainSpeed1e5          1526065      1459878   -4.34%
BenchmarkEncodeTwainSpeed1e6          2066627      1536296  -25.66%
BenchmarkEncodeTwainDefault1e4        1484380      1454240   -2.03%
BenchmarkEncodeTwainDefault1e5        1521793      1459558   -4.09%
BenchmarkEncodeTwainDefault1e6        1977504      1523388  -22.96%
BenchmarkEncodeTwainCompress1e4       1484380      1454240   -2.03%
BenchmarkEncodeTwainCompress1e5       1521457      1459318   -4.08%
BenchmarkEncodeTwainCompress1e6       1980000      1523609  -23.05%

benchmark                           old ns/op    new ns/op    delta
BenchmarkEncodeDigitsSpeed1e4         1472128      1384343   -5.96%
BenchmarkEncodeDigitsSpeed1e5         8283663      8112304   -2.07%
BenchmarkEncodeDigitsSpeed1e6        77459311     76364216   -1.41%
BenchmarkEncodeDigitsDefault1e4       1813090      1746552   -3.67%
BenchmarkEncodeDigitsDefault1e5      26221292     26052516   -0.64%
BenchmarkEncodeDigitsDefault1e6     286512472    286099039   -0.14%
BenchmarkEncodeDigitsCompress1e4      1809373      1747230   -3.43%
BenchmarkEncodeDigitsCompress1e5     26231580     26038456   -0.74%
BenchmarkEncodeDigitsCompress1e6    286140002    286025372   -0.04%
BenchmarkEncodeTwainSpeed1e4          1594094      1438600   -9.75%
BenchmarkEncodeTwainSpeed1e5          7669724      7316288   -4.61%
BenchmarkEncodeTwainSpeed1e6         68731353     65938994   -4.06%
BenchmarkEncodeTwainDefault1e4        2063497      1866488   -9.55%
BenchmarkEncodeTwainDefault1e5       22602689     22221377   -1.69%
BenchmarkEncodeTwainDefault1e6      233376842    232114297   -0.54%
BenchmarkEncodeTwainCompress1e4       2062441      1949676   -5.47%
BenchmarkEncodeTwainCompress1e5      28264344     27930627   -1.18%
BenchmarkEncodeTwainCompress1e6     304369641    303704330   -0.22%

benchmark                            old MB/s     new MB/s  speedup
BenchmarkEncodeDigitsSpeed1e4            6.79         7.22    1.06x
BenchmarkEncodeDigitsSpeed1e5           12.07        12.33    1.02x
BenchmarkEncodeDigitsSpeed1e6           12.91        13.10    1.01x
BenchmarkEncodeDigitsDefault1e4          5.52         5.73    1.04x
BenchmarkEncodeDigitsDefault1e5          3.81         3.84    1.01x
BenchmarkEncodeDigitsDefault1e6          3.49         3.50    1.00x
BenchmarkEncodeDigitsCompress1e4         5.53         5.72    1.03x
BenchmarkEncodeDigitsCompress1e5         3.81         3.84    1.01x
BenchmarkEncodeDigitsCompress1e6         3.49         3.50    1.00x
BenchmarkEncodeTwainSpeed1e4             6.27         6.95    1.11x
BenchmarkEncodeTwainSpeed1e5            13.04        13.67    1.05x
BenchmarkEncodeTwainSpeed1e6            14.55        15.17    1.04x
BenchmarkEncodeTwainDefault1e4           4.85         5.36    1.11x
BenchmarkEncodeTwainDefault1e5           4.42         4.50    1.02x
BenchmarkEncodeTwainDefault1e6           4.28         4.31    1.01x
BenchmarkEncodeTwainCompress1e4          4.85         5.13    1.06x
BenchmarkEncodeTwainCompress1e5          3.54         3.58    1.01x
BenchmarkEncodeTwainCompress1e6          3.29         3.29    1.00x

R=imkrasin, golang-dev, bradfitz, r
CC=golang-dev
https://golang.org/cl/10006043

11 years agonet: make UnixAddr implement sockaddr interface
Mikio Hara [Sun, 28 Jul 2013 07:15:07 +0000 (16:15 +0900)]
net: make UnixAddr implement sockaddr interface

This is in preparation for runtime-integrated network pollster for BSD
variants.

Update #5199

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

11 years agonet: extend sockaddr interface to the all address families
Mikio Hara [Sun, 28 Jul 2013 03:52:30 +0000 (12:52 +0900)]
net: extend sockaddr interface to the all address families

This CL extends existing sockaddr interface to accommodate not only
internet protocol family endpoint addressess but unix network family
endpoint addresses.

This is in preparation for runtime-integrated network pollster for BSD
variants.

Update #5199

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

11 years agonet: simplify socket option helpers
Mikio Hara [Sun, 28 Jul 2013 02:18:06 +0000 (11:18 +0900)]
net: simplify socket option helpers

Also consolidates syscall.IPPROTO_TCP level option helper files.

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

11 years agomisc/dashboard: fix typo in comment
Dmitriy Vyukov [Sat, 27 Jul 2013 09:54:34 +0000 (13:54 +0400)]
misc/dashboard: fix typo in comment

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

11 years agocmd/dist: fix crash on windows
Dmitriy Vyukov [Sat, 27 Jul 2013 09:53:18 +0000 (13:53 +0400)]
cmd/dist: fix crash on windows
currently 'dist install' always crashes on windows

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

11 years agoruntime: fix potential deadlock in netpoll on windows
Dmitriy Vyukov [Sat, 27 Jul 2013 09:46:40 +0000 (13:46 +0400)]
runtime: fix potential deadlock in netpoll on windows
If netpoll has been told to block, it must not return with nil,
otherwise scheduler assumes that netpoll is disabled.

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

11 years agonet: temporary skip hanging test on windows
Dmitriy Vyukov [Sat, 27 Jul 2013 09:36:27 +0000 (13:36 +0400)]
net: temporary skip hanging test on windows
Update #5971.

R=alex.brainman
CC=golang-dev
https://golang.org/cl/11938046

11 years agomisc/notepadplus: use new User Defined Language system (UDL2)
ChaiShushan [Fri, 26 Jul 2013 22:12:42 +0000 (08:12 +1000)]
misc/notepadplus: use new User Defined Language system (UDL2)

Add missing single quotation and backslash marks.

Change dot and underscore character keyword type.
"_" is a predeclared identifier, not a operator.
"." is a selector, x.f should be one identifier highlight.
So the fix is to change it.

Fixes #5775.
Fixes #5788.
Fixes #5798.

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

11 years agoruntime: handle runtime.Goexit during init
Russ Cox [Fri, 26 Jul 2013 17:54:44 +0000 (13:54 -0400)]
runtime: handle runtime.Goexit during init

Fixes #5963.

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

11 years agoruntime: refactor mallocgc
Dmitriy Vyukov [Fri, 26 Jul 2013 17:17:24 +0000 (21:17 +0400)]
runtime: refactor mallocgc
Make it accept type, combine flags.
Several reasons for the change:
1. mallocgc and settype must be atomic wrt GC
2. settype is called from only one place now
3. it will help performance (eventually settype
functionality must be combined with markallocated)
4. flags are easier to read now (no mallocgc(sz, 0, 1, 0) anymore)

R=golang-dev, iant, nightlyone, rsc, dave, khr, bradfitz, r
CC=golang-dev
https://golang.org/cl/10136043

11 years agocrypto/des: faster block expansion.
Rémy Oudompheng [Fri, 26 Jul 2013 07:10:29 +0000 (09:10 +0200)]
crypto/des: faster block expansion.

On amd64:

benchmark           old ns/op    new ns/op    delta
BenchmarkEncrypt         6170         3593  -41.77%
BenchmarkDecrypt         6209         3564  -42.60%

benchmark            old MB/s     new MB/s  speedup
BenchmarkEncrypt         1.30         2.23    1.72x
BenchmarkDecrypt         1.29         2.24    1.74x

Update #4299.

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

11 years agocmd/pack: support removing of leading file prefix on windows
Alex Brainman [Fri, 26 Jul 2013 06:56:24 +0000 (16:56 +1000)]
cmd/pack: support removing of leading file prefix on windows

Fixes #5550

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

11 years agogc: fix line directive processing on windows
Alex Brainman [Fri, 26 Jul 2013 03:38:24 +0000 (13:38 +1000)]
gc: fix line directive processing on windows

This change should have been part of 5671737303a0.

Fixes #5904

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

11 years agoundo CL 11788043 / 62d06cccc261
Keith Randall [Fri, 26 Jul 2013 00:51:33 +0000 (17:51 -0700)]
undo CL 11788043 / 62d06cccc261

Reason for breakage fixed with CL 11888043.

««« original CL description
undo CL 11683043 / bb75d03e6ccb

Broke arm build.
R=dave

««« original CL description
cc: generate argument pointer maps for C functions.

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

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

TBR=dave
CC=golang-dev
https://golang.org/cl/11789043

11 years ago5c: fix pc recalculation in the presence of AFUNCDATA
Keith Randall [Fri, 26 Jul 2013 00:40:29 +0000 (17:40 -0700)]
5c: fix pc recalculation in the presence of AFUNCDATA

This makes CL 11683043 not break arm anymore.

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

11 years agogo/parser: restrict ParseDir to files with suffix ".go"
Robert Griesemer [Thu, 25 Jul 2013 16:36:22 +0000 (09:36 -0700)]
go/parser: restrict ParseDir to files with suffix ".go"

Fixes #5956.

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

11 years agospec: update prose in Constants section
Robert Griesemer [Thu, 25 Jul 2013 16:35:55 +0000 (09:35 -0700)]
spec: update prose in Constants section

Fixes #5952.

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

11 years agonet: give more detail when test panics
Mikio Hara [Thu, 25 Jul 2013 15:21:37 +0000 (00:21 +0900)]
net: give more detail when test panics

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

11 years agosyscall: prlimit argument error for Getrlimit and Setrlimit on Linux 32-bit
Peter Mundy [Thu, 25 Jul 2013 13:56:06 +0000 (09:56 -0400)]
syscall: prlimit argument error for Getrlimit and Setrlimit on Linux 32-bit

The rlimit arguments for prlimit are reversed for linux 32-bit (386 and arm).
Getrlimit becomes Setrlimit and vice versa.
Fixes #5949.

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

11 years agocmd/cgo: gccgo fixes
Ian Lance Taylor [Thu, 25 Jul 2013 13:53:57 +0000 (09:53 -0400)]
cmd/cgo: gccgo fixes

Don't require a full-scale callback for calls to the special
prologue functions.

Always use a simple wrapper function for C functions, so that
we can handle static functions defined in the import "C"
comment.

Disable a test that relies on gc-specific function names.

Fixes #5905.

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

11 years agocmd/gc: avoid passing unevaluated constant expressions to backends.
Rémy Oudompheng [Thu, 25 Jul 2013 13:42:05 +0000 (09:42 -0400)]
cmd/gc: avoid passing unevaluated constant expressions to backends.

Backends do not exactly expect receiving binary operators with
constant operands or use workarounds to move them to
register/stack in order to handle them.

Fixes #5841.

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

11 years agonet: simplify probeIPv6Stack
Mikio Hara [Thu, 25 Jul 2013 10:29:20 +0000 (19:29 +0900)]
net: simplify probeIPv6Stack

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

11 years agocrypto/md5: native arm assembler version
Nick Craig-Wood [Thu, 25 Jul 2013 03:28:27 +0000 (13:28 +1000)]
crypto/md5: native arm assembler version

An ARM version of md5block.go with a big improvement in
throughput (up to 2.5x) and a reduction in object size (21%).

Code size

  Before 3100 bytes
  After 2424 bytes
  21% smaller

Benchmarks on Rasperry Pi

benchmark                       old ns/op    new ns/op    delta
BenchmarkHash8Bytes                 11703         6636  -43.30%
BenchmarkHash1K                     38057        21881  -42.50%
BenchmarkHash8K                    208131       142735  -31.42%
BenchmarkHash8BytesUnaligned        11457         6570  -42.66%
BenchmarkHash1KUnaligned            69334        26841  -61.29%
BenchmarkHash8KUnaligned           455120       182223  -59.96%

benchmark                        old MB/s     new MB/s  speedup
BenchmarkHash8Bytes                  0.68         1.21    1.78x
BenchmarkHash1K                     26.91        46.80    1.74x
BenchmarkHash8K                     39.36        57.39    1.46x
BenchmarkHash8BytesUnaligned         0.70         1.22    1.74x
BenchmarkHash1KUnaligned            14.77        38.15    2.58x
BenchmarkHash8KUnaligned            18.00        44.96    2.50x

benchmark                      old allocs   new allocs    delta
BenchmarkHash8Bytes                     1            0  -100.00%
BenchmarkHash1K                         2            0  -100.00%
BenchmarkHash8K                         2            0  -100.00%
BenchmarkHash8BytesUnaligned            1            0  -100.00%
BenchmarkHash1KUnaligned                2            0  -100.00%
BenchmarkHash8KUnaligned                2            0  -100.00%

benchmark                       old bytes    new bytes    delta
BenchmarkHash8Bytes                    64            0  -100.00%
BenchmarkHash1K                       128            0  -100.00%
BenchmarkHash8K                       128            0  -100.00%
BenchmarkHash8BytesUnaligned           64            0  -100.00%
BenchmarkHash1KUnaligned              128            0  -100.00%
BenchmarkHash8KUnaligned              128            0  -100.00%

This also adds another test which makes sure that the sums
over larger blocks work properly. I wrote this test when I was
worried about memory corruption.

R=golang-dev, dave, bradfitz, rsc, ajstarks
CC=golang-dev, minux.ma, remyoudompheng
https://golang.org/cl/11648043

11 years agobufio: check buffer availability before reading in ReadFrom
Andrew Gerrand [Thu, 25 Jul 2013 01:29:13 +0000 (11:29 +1000)]
bufio: check buffer availability before reading in ReadFrom

Fixes #5947.

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

11 years agocmd/cgo: Fix issue with cgo cdefs
Kevin Klues [Thu, 25 Jul 2013 00:27:42 +0000 (17:27 -0700)]
cmd/cgo: Fix issue with cgo cdefs

The problem is that the cdecl() function in cmd/cgo/godefs.go isn't
properly translating the Go array type to a C array type when an
asterisk follows the [] in the array type declaration (it is perfectly
legal to put the asterisk on either side of the [] in go syntax,
depending on how you set up your pointers).

That said, the cdefs tool is only designed to translate from Go types
generated using the cgo *godefs* tool -- where the godefs tool is
designed to translate gcc-style C types into Go types. In essence, the
cdefs tool translates from gcc-style C types to Go types (via the godefs
tool), then back to kenc-style C types. Because of this, cdefs does not
need to know how to translate arbitraty Go types into C, just the ones
produced by godefs.

The problem is that during this translation process, the logic is
slightly wrong when going from (e.g.):

char *array[10];
to:
array [10]*int8;
back to:
int8 *array[10];

In the current implementation of cdecl(), the translation from the Go
type declaration back to the kenc-style declaration looks for Go
types of the form:

name *[]type;
rather than the actual generated Go type declaration of:
name []*type;

Both are valid Go syntax, with slightly different semantics, but the
latter is the only one that can ever be generated by the godefs tools.
(The semantics of the former are not directly expressible in a
single C statement -- you would have to have to first typedef the array
type, then declare a pointer to that typedef'd type in a separate
statement).

This commit changes the logic of cdecl() to look properly for, and
translate, Go type declarations of the form:
name []*type;

Additionally, the original implementation only allowed for a single
asterisk and a single sized aray (i.e. only a single level of pointer
indirection, and only one set of []) on the type, whereas the patched
version allows for an arbitrary number of both.

Tests are included in misc/cgo/testcdefs and the all.bash script has been
updated to account for these.

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

11 years agoC: add Kevin Klues (Google CLA)
Brad Fitzpatrick [Wed, 24 Jul 2013 23:39:38 +0000 (16:39 -0700)]
C: add Kevin Klues (Google CLA)

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

11 years agoundo CL 11683043 / bb75d03e6ccb
Keith Randall [Wed, 24 Jul 2013 22:04:10 +0000 (15:04 -0700)]
undo CL 11683043 / bb75d03e6ccb

Broke arm build.
R=dave

««« original CL description
cc: generate argument pointer maps for C functions.

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

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

11 years agomisc/emacs: replace our go-goto-opening-parenthesis with backward-up-list
Dominik Honnef [Wed, 24 Jul 2013 17:48:04 +0000 (13:48 -0400)]
misc/emacs: replace our go-goto-opening-parenthesis with backward-up-list

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

11 years agolog/syslog: restore use of serverConn interface
Ian Lance Taylor [Wed, 24 Jul 2013 17:28:57 +0000 (10:28 -0700)]
log/syslog: restore use of serverConn interface

Revision 15629 (8d71734a0cb0) removed the serverConn interface
that was introduce in revision 7718 (ee5e80c62862).  The
serverConn interface was there for use by gccgo on Solaris,
and it is still needed there.  Solaris does not support
connecting to the syslog daemon over TCP, and gccgo simply
calls the C library function.  This CL restores the
interface.

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

11 years agoruntime: only define SEH when we need it.
Keith Randall [Wed, 24 Jul 2013 16:59:47 +0000 (09:59 -0700)]
runtime: only define SEH when we need it.

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

11 years agocc: generate argument pointer maps for C functions.
Keith Randall [Wed, 24 Jul 2013 16:41:06 +0000 (09:41 -0700)]
cc: generate argument pointer maps for C functions.

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

11 years agoruntime: drop EV_RECEIPT support from network pollster on kqueue
Mikio Hara [Wed, 24 Jul 2013 15:24:17 +0000 (00:24 +0900)]
runtime: drop EV_RECEIPT support from network pollster on kqueue

Currently Darwin and FreeBSD support and NetBSD and OpenBSD do not
support EV_RECEIPT flag. We will drop use of EV_RECEIPT for now.

Also enables to build runtime-integrated network pollster on
freebsd/amd64,386 and openbsd/amd64,386. It just does build but never
runs pollster stuff.

This is in preparation for runtime-integrated network pollster for BSD
variants.

Update #5199

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

11 years agomisc/emacs: Make godef-jump behave more like find-tag by supporting pop-tag-mark
Dominik Honnef [Wed, 24 Jul 2013 15:20:53 +0000 (11:20 -0400)]
misc/emacs: Make godef-jump behave more like find-tag by supporting pop-tag-mark

Push point to the find-tag marker ring to support pop-tag-mark.

Fixes #5804.

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

11 years agoruntime: more cgocallback_gofunc work
Russ Cox [Wed, 24 Jul 2013 13:01:57 +0000 (09:01 -0400)]
runtime: more cgocallback_gofunc work

Debugging the Windows breakage I noticed that SEH
only exists on 386, so we can balance the two stacks
a little more on amd64 and reclaim another word.

Now we're down to just one word consumed by
cgocallback_gofunc, having reclaimed 25% of the
overall budget (4 words out of 16).

Separately, fix windows/386 - the SEH must be on the
m0 stack, as must the saved SP, so we are forced to have
a three-word frame for 386. It matters much less for
386, because there 128 bytes gives 32 words to use.

R=dvyukov, alex.brainman
CC=golang-dev
https://golang.org/cl/11551044

11 years agoruntime: fix throw message in netpoll
Mikio Hara [Wed, 24 Jul 2013 08:48:13 +0000 (17:48 +0900)]
runtime: fix throw message in netpoll

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

11 years agoruntime: fix windows build
Russ Cox [Wed, 24 Jul 2013 02:59:32 +0000 (22:59 -0400)]
runtime: fix windows build

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

11 years agodoc/go1.2.txt: document new functions/types added to image/gif and image/draw.
Andrew Bonventre [Wed, 24 Jul 2013 02:41:52 +0000 (12:41 +1000)]
doc/go1.2.txt: document new functions/types added to image/gif and image/draw.

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

11 years agodoc/go1.2.txt: document new function unicode.In
Rob Pike [Wed, 24 Jul 2013 00:54:33 +0000 (10:54 +1000)]
doc/go1.2.txt: document new function unicode.In

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

11 years agounicode: add "In" function to test membership of a rune
Rob Pike [Wed, 24 Jul 2013 00:27:58 +0000 (10:27 +1000)]
unicode: add "In" function to test membership of a rune
The existing function, IsOneOf, is hard to use. Since the slice comes
before the rune, in parallelism with the other Is functions, the slice
is clumsy to build. This CL adds a nicer-signatured In function of
equivalent functionality (its implementation is identical) that's much
easier to use. Compare:
        unicode.IsOneOf([]*unicode.RangeTable{unicode.Letter, unicode.Number}, r)
        unicode.In(r, unicode.Letter, unicode.Number)

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

11 years agonet: consolidate listenerBacklog declaration
Mikio Hara [Tue, 23 Jul 2013 23:43:08 +0000 (08:43 +0900)]
net: consolidate listenerBacklog declaration

Also adds maxListenerBacklog placeholder for Plan 9.

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

11 years agoruntime: reduce frame size for runtime.cgocallback_gofunc
Russ Cox [Tue, 23 Jul 2013 22:40:02 +0000 (18:40 -0400)]
runtime: reduce frame size for runtime.cgocallback_gofunc

Tying preemption to stack splits means that we have to able to
complete the call to exitsyscall (inside cgocallbackg at least for now)
without any stack split checks, meaning that the whole sequence
has to work within 128 bytes of stack, unless we increase the size
of the red zone. This CL frees up 24 bytes along that critical path
on amd64. (The 32-bit systems have plenty of space because all
their words are smaller.)

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

11 years agomath/rand: mention that the default Source is thread-safe
Andrew Gerrand [Tue, 23 Jul 2013 22:27:20 +0000 (08:27 +1000)]
math/rand: mention that the default Source is thread-safe

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

11 years agomisc/cgo/test: test recursive internal OS thread lock
Russ Cox [Tue, 23 Jul 2013 18:43:55 +0000 (14:43 -0400)]
misc/cgo/test: test recursive internal OS thread lock

This would have failed with CL 11663043.

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

11 years agomath/rand: mention Seed in overview, add another top-level example
Andrew Gerrand [Tue, 23 Jul 2013 06:07:28 +0000 (16:07 +1000)]
math/rand: mention Seed in overview, add another top-level example

Fixes #5937.

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

11 years agonet/http: respect tls.Config.ServerName in Transport
Brad Fitzpatrick [Tue, 23 Jul 2013 05:39:09 +0000 (22:39 -0700)]
net/http: respect tls.Config.ServerName in Transport

When making an HTTPS client request, respect the
ServerName field in the tls.Config.

Fixes #5829

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

11 years agodatabase/sql: close statement before connection
Alex Brainman [Tue, 23 Jul 2013 04:09:53 +0000 (14:09 +1000)]
database/sql: close statement before connection

Fixes #5936

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

11 years agoall: be more idiomatic when documenting boolean return values.
Rob Pike [Tue, 23 Jul 2013 01:59:49 +0000 (11:59 +1000)]
all: be more idiomatic when documenting boolean return values.
Phrases like "returns whether or not the image is opaque" could be
describing what the function does (it always returns, regardless of
the opacity) or what it returns (a boolean indicating the opacity).
Even when the "or not" is missing, the phrasing is bizarre.

Go with "reports whether", which is still clunky but at least makes
it clear we're talking about the return value.

These were edited by hand. A few were cleaned up in other ways.

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

11 years agonet: make use of noDeadline instead of time.Time{}
Mikio Hara [Tue, 23 Jul 2013 01:13:58 +0000 (10:13 +0900)]
net: make use of noDeadline instead of time.Time{}

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

11 years agoruntime: Stop arm memmove corrupting its parameters
Nick Craig-Wood [Mon, 22 Jul 2013 23:29:25 +0000 (09:29 +1000)]
runtime: Stop arm memmove corrupting its parameters

Change use of x+(SP) to access the stack frame into x-(SP)

Fixes #5925.

R=golang-dev, bradfitz, dave, remyoudompheng, nick, rsc
CC=dave cheney <dave, golang-dev
https://golang.org/cl/11647043

11 years agoall: change "true iff" to "whether" in public docs
Brad Fitzpatrick [Mon, 22 Jul 2013 23:20:30 +0000 (16:20 -0700)]
all: change "true iff" to "whether" in public docs

For consistency with Go documentation style.

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

11 years agocmd/ld: fix warnings on Plan 9
David du Colombier [Mon, 22 Jul 2013 21:33:41 +0000 (17:33 -0400)]
cmd/ld: fix warnings on Plan 9

src/cmd/ld/lib.c:1379 set and not used: p
src/cmd/ld/lib.c:1426 format mismatch 6llux INT, arg 3
src/cmd/ld/lib.c:1437 format mismatch 6llux INT, arg 3
src/cmd/ld/lib.c:1456 format mismatch 6llux INT, arg 3
src/cmd/ld/lib.c:1477 format mismatch 6llux INT, arg 3
src/cmd/ld/lib.c:1459 set and not used: started

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

11 years agoruntime: introduce notetsleepg function
Dmitriy Vyukov [Mon, 22 Jul 2013 19:02:27 +0000 (23:02 +0400)]
runtime: introduce notetsleepg function
notetsleepg is the same as notetsleep, but is called on user g.
It includes entersyscall/exitsyscall and will help to avoid
split stack functions in syscall status.

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

11 years agomisc/cgo/test: add test for cgo callbacks with different amount of stack space available
Dmitriy Vyukov [Mon, 22 Jul 2013 17:53:20 +0000 (21:53 +0400)]
misc/cgo/test: add test for cgo callbacks with different amount of stack space available

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

11 years agoruntime: allow stack split in body of closechan
Dmitriy Vyukov [Mon, 22 Jul 2013 16:47:39 +0000 (20:47 +0400)]
runtime: allow stack split in body of closechan
This gives more space during the call to runtime.lock.

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

11 years agoruntime: clarify comment for m->locked
Dmitriy Vyukov [Mon, 22 Jul 2013 12:37:31 +0000 (16:37 +0400)]
runtime: clarify comment for m->locked

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

11 years agonet: remove unnecessary bit masking
Mikio Hara [Mon, 22 Jul 2013 11:08:58 +0000 (20:08 +0900)]
net: remove unnecessary bit masking

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

11 years agonet: implement netpoll for windows
Alex Brainman [Mon, 22 Jul 2013 02:49:57 +0000 (12:49 +1000)]
net: implement netpoll for windows

Moves the network poller from net package into runtime.

benchmark                           old ns/op    new ns/op    delta
BenchmarkTCP4OneShot                   316386       287061   -9.27%
BenchmarkTCP4OneShot-2                 339822       313424   -7.77%
BenchmarkTCP4OneShot-3                 330057       306589   -7.11%
BenchmarkTCP4OneShotTimeout            341775       287061  -16.01%
BenchmarkTCP4OneShotTimeout-2          380835       295849  -22.32%
BenchmarkTCP4OneShotTimeout-3          398412       328070  -17.66%
BenchmarkTCP4Persistent                 40622        33392  -17.80%
BenchmarkTCP4Persistent-2               44528        35736  -19.74%
BenchmarkTCP4Persistent-3               44919        36907  -17.84%
BenchmarkTCP4PersistentTimeout          45309        33588  -25.87%
BenchmarkTCP4PersistentTimeout-2        50289        38079  -24.28%
BenchmarkTCP4PersistentTimeout-3        51559        37103  -28.04%
BenchmarkTCP6OneShot                   361305       345645   -4.33%
BenchmarkTCP6OneShot-2                 361305       331976   -8.12%
BenchmarkTCP6OneShot-3                 376929       347598   -7.78%
BenchmarkTCP6OneShotTimeout            361305       322212  -10.82%
BenchmarkTCP6OneShotTimeout-2          378882       333928  -11.86%
BenchmarkTCP6OneShotTimeout-3          388647       335881  -13.58%
BenchmarkTCP6Persistent                 47653        35345  -25.83%
BenchmarkTCP6Persistent-2               49215        35736  -27.39%
BenchmarkTCP6Persistent-3               38474        37493   -2.55%
BenchmarkTCP6PersistentTimeout          56637        34369  -39.32%
BenchmarkTCP6PersistentTimeout-2        42575        38079  -10.56%
BenchmarkTCP6PersistentTimeout-3        44137        37689  -14.61%

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

11 years agoruntime: add a missing newline in a debug printf.
David Symonds [Mon, 22 Jul 2013 02:42:42 +0000 (12:42 +1000)]
runtime: add a missing newline in a debug printf.

Trivial, but annoying while debugging this code.

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

11 years agodoc: fix wiki content error
Andrew Gerrand [Mon, 22 Jul 2013 02:22:14 +0000 (12:22 +1000)]
doc: fix wiki content error

Fixes #5898.

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

11 years agoregexp: use a very fast random generator for benchmarks.
Rémy Oudompheng [Sat, 20 Jul 2013 21:31:51 +0000 (23:31 +0200)]
regexp: use a very fast random generator for benchmarks.

Calls into math/rand are very slow, especially under race
detector because of heap accesses.

go test -bench . -run none -benchtime .1s
Before: 23.0s
After:  17.4s

Fixes #5837.

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

11 years agolibmach: support more 386/amd64 instructions
Anthony Martin [Sat, 20 Jul 2013 07:38:26 +0000 (00:38 -0700)]
libmach: support more 386/amd64 instructions

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

11 years agolibmach,lib9: override unused parameter warnings (fixes netbsd and openbsd builds)
Alex Brainman [Sat, 20 Jul 2013 06:09:30 +0000 (16:09 +1000)]
libmach,lib9: override unused parameter warnings (fixes netbsd and openbsd builds)

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

11 years agolibmach,lib9: override unused parameter warnings (fixes windows build)
Alex Brainman [Sat, 20 Jul 2013 02:43:50 +0000 (12:43 +1000)]
libmach,lib9: override unused parameter warnings (fixes windows build)

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

11 years agocmd/dist, cmd/go: enable more warnings, make clang errors legible
Russ Cox [Fri, 19 Jul 2013 23:36:15 +0000 (19:36 -0400)]
cmd/dist, cmd/go: enable more warnings, make clang errors legible

This does not change the default compiler on OS X to clang.
It appears that for now we can keep using gcc as long as we
enable a few more warning settings that are on-by-default
elsewhere.

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

11 years agocmd/ld, runtime: remove unused fields from Func
Russ Cox [Fri, 19 Jul 2013 22:52:35 +0000 (18:52 -0400)]
cmd/ld, runtime: remove unused fields from Func

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

11 years agocmd/gc, cmd/ld: fix build: remove unused var, use correct var in printf
Ian Lance Taylor [Fri, 19 Jul 2013 22:04:53 +0000 (15:04 -0700)]
cmd/gc, cmd/ld: fix build: remove unused var, use correct var in printf

Fixes #5924.

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

11 years agoruntime: use funcdata to supply garbage collection information
Russ Cox [Fri, 19 Jul 2013 20:04:09 +0000 (16:04 -0400)]
runtime: use funcdata to supply garbage collection information

This CL introduces a FUNCDATA number for runtime-specific
garbage collection metadata, changes the C and Go compilers
to emit that metadata, and changes the runtime to expect it.

The old pseudo-instructions that carried this information
are gone, as is the linker code to process them.

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

11 years agocmd/dist: generate offsets for P structure
Russ Cox [Fri, 19 Jul 2013 19:40:32 +0000 (15:40 -0400)]
cmd/dist: generate offsets for P structure

So far no checked-in assembly needs these,
but it matches having them for M and G.
I needed these for some manual testing.

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

11 years agodebug/gosym: put pclinetest file in temporary directory
Keith Randall [Fri, 19 Jul 2013 19:31:42 +0000 (12:31 -0700)]
debug/gosym: put pclinetest file in temporary directory
where it belongs.

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

11 years agoruntime: cleanup: use ArgsSizeUnknown to mark all functions
Keith Randall [Fri, 19 Jul 2013 18:19:18 +0000 (11:19 -0700)]
runtime: cleanup: use ArgsSizeUnknown to mark all functions
whose argument size is unknown (C vararg functions, and
assembly code without an explicit specification).

We used to use 0 to mean "unknown" and 1 to mean "zero".
Now we use ArgsSizeUnknown (0x80000000) to mean "unknown".

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

11 years agoruntime: prevent GC from seeing the contents of a frame in runfinq
Dmitriy Vyukov [Fri, 19 Jul 2013 14:01:33 +0000 (18:01 +0400)]
runtime: prevent GC from seeing the contents of a frame in runfinq
This holds the last finalized object and arguments to its finalizer.
Fixes #5348.

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

11 years agotest: fix error output in the test
Dmitriy Vyukov [Fri, 19 Jul 2013 13:48:19 +0000 (17:48 +0400)]
test: fix error output in the test

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

11 years agoruntime: hide mheap from GC
Dmitriy Vyukov [Fri, 19 Jul 2013 13:47:40 +0000 (17:47 +0400)]
runtime: hide mheap from GC
It contains pointers to first blocks of lots of spans.

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

11 years agoruntime: prevent sysmon from polling network excessivly
Dmitriy Vyukov [Fri, 19 Jul 2013 13:45:34 +0000 (17:45 +0400)]
runtime: prevent sysmon from polling network excessivly
If the network is not polled for 10ms, sysmon starts polling network
on every iteration (every 20us) until another thread blocks in netpoll.
Fixes #5922.

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

11 years agoregexp: exclude exhaustive RE2 test from running under race detector.
David Symonds [Fri, 19 Jul 2013 13:44:22 +0000 (23:44 +1000)]
regexp: exclude exhaustive RE2 test from running under race detector.

It is an expensive test to run, and even more so with -race,
and causes timeouts on builders. It is doubtful that it would
find a race that other tests in this package wouldn't, so there
is little loss in excluding it.

Update #5837.

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

11 years agoruntime: disable preemption during runtime.settype
Russ Cox [Fri, 19 Jul 2013 02:58:49 +0000 (22:58 -0400)]
runtime: disable preemption during runtime.settype

It assumes that the m will not change, and the m may
change if the goroutine is preempted.

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

11 years agonet/http: document and test Client.Post treating Reader body as ReadCloser
Brad Fitzpatrick [Fri, 19 Jul 2013 02:02:54 +0000 (12:02 +1000)]
net/http: document and test Client.Post treating Reader body as ReadCloser

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

11 years agoruntime: preempt long-running goroutines
Dmitriy Vyukov [Thu, 18 Jul 2013 21:22:26 +0000 (01:22 +0400)]
runtime: preempt long-running goroutines
If a goroutine runs for more than 10ms, preempt it.
Update #543.

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

11 years agoruntime: handle morestack/lessstack in stack trace
Russ Cox [Thu, 18 Jul 2013 20:53:45 +0000 (16:53 -0400)]
runtime: handle morestack/lessstack in stack trace

If we start a garbage collection on g0 during a
stack split or unsplit, we'll see morestack or lessstack
at the top of the stack. Record an argument frame size
for those, and record that they terminate the stack.

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

11 years agocmd/6a, cmd/6l: make FUNCDATA work
Russ Cox [Thu, 18 Jul 2013 19:38:19 +0000 (15:38 -0400)]
cmd/6a, cmd/6l: make FUNCDATA work

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

11 years agoregexp/syntax: update documentation for Parse.
Daniel Morsing [Thu, 18 Jul 2013 19:28:00 +0000 (21:28 +0200)]
regexp/syntax: update documentation for Parse.

Syntax description was moved to the top level comment of this package.

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

11 years agoruntime: disable preemption during deferreturn
Russ Cox [Thu, 18 Jul 2013 16:26:47 +0000 (12:26 -0400)]
runtime: disable preemption during deferreturn

Deferreturn is synthesizing a new call frame.
It must not be interrupted between copying the args there
and fixing up the program counter, or else the stack will
be in an inconsistent state, one that will confuse the
garbage collector.

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

11 years agoruntime: record full frame size for arm _sfloat2
Russ Cox [Thu, 18 Jul 2013 16:23:38 +0000 (12:23 -0400)]
runtime: record full frame size for arm _sfloat2

With preemption, _sfloat2 can show up in stack traces.
Write the function prototype in a way that accurately
shows the frame size and the fact that it might contain
pointers.

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

11 years agoruntime: mark concatstring as variadic (fixes 386 build)
Russ Cox [Thu, 18 Jul 2013 16:19:38 +0000 (12:19 -0400)]
runtime: mark concatstring as variadic (fixes 386 build)

Windows was the only one seeing this bug reliably in the builder,
but it was easy to reproduce using 'GOGC=1 go test strconv'.
concatstring looked like it took only one string, but in fact it
takes a long list of strings. Add an explicit ... so that the traceback
will not use the "fixed" frame size and instead look at the
frame size metadata recorded by the caller.

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

11 years agocmd/ld: refine test for history stack pop (fix Windows build)
Russ Cox [Thu, 18 Jul 2013 15:40:59 +0000 (11:40 -0400)]
cmd/ld: refine test for history stack pop (fix Windows build)

This should fix the Windows build, or at least
what's breaking it at the moment.

Fixes #5904.

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

11 years agodebug/gosym: avoid test failure on Windows
Russ Cox [Thu, 18 Jul 2013 15:01:58 +0000 (11:01 -0400)]
debug/gosym: avoid test failure on Windows

Would fix build if build hadn't already been broken with something else.

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

11 years agocmd/ld, runtime: use new contiguous pcln table
Russ Cox [Thu, 18 Jul 2013 14:43:22 +0000 (10:43 -0400)]
cmd/ld, runtime: use new contiguous pcln table

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

11 years agolibmach: update for Go 1.2 pcln table
Russ Cox [Thu, 18 Jul 2013 14:12:28 +0000 (10:12 -0400)]
libmach: update for Go 1.2 pcln table

The change to addr2line makes it easy to test by hand.

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

11 years agodebug/gosym: update for Go 1.2 pcln table
Russ Cox [Thu, 18 Jul 2013 14:12:14 +0000 (10:12 -0400)]
debug/gosym: update for Go 1.2 pcln table

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

11 years agoio: let SectionReader seek past the end; document Seeker semantics more
Brad Fitzpatrick [Thu, 18 Jul 2013 03:03:26 +0000 (13:03 +1000)]
io: let SectionReader seek past the end; document Seeker semantics more

Be consistent with os.File, strings.Reader, bytes.Reader, etc,
which all allow seeks past the end.

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

11 years agoimage/gif: don't write superfluous global color table
Andrew Bonventre [Thu, 18 Jul 2013 01:11:23 +0000 (11:11 +1000)]
image/gif: don't write superfluous global color table

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

11 years agocmd/cgo: don't emit #pragma declarations when using gccgo
Ian Lance Taylor [Thu, 18 Jul 2013 01:02:21 +0000 (18:02 -0700)]
cmd/cgo: don't emit #pragma declarations when using gccgo

Update #5905

Don't emit #pragma cgo_ldflag and cgo_import_static
declarations that gccgo doesn't understand and can't use.

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

11 years agocmd/ld: trivial: fix unused parameter pedantry
Dave Cheney [Thu, 18 Jul 2013 00:11:43 +0000 (10:11 +1000)]
cmd/ld: trivial: fix unused parameter pedantry

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

11 years agonet/http: document NewRequest treating Reader as ReadCloser
Brad Fitzpatrick [Thu, 18 Jul 2013 00:10:10 +0000 (10:10 +1000)]
net/http: document NewRequest treating Reader as ReadCloser

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

11 years agoruntime: disable preemption again to fix linux build
Ian Lance Taylor [Wed, 17 Jul 2013 23:15:46 +0000 (16:15 -0700)]
runtime: disable preemption again to fix linux build

Otherwise the tests in pkg/runtime fail:

runtime: unknown argument frame size for runtime.deferreturn called from 0x48657b [runtime_test.func·022]
fatal error: invalid stack
...

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

11 years agomisc/emacs: Add godef-jump-other-window
Dominik Honnef [Wed, 17 Jul 2013 22:16:44 +0000 (18:16 -0400)]
misc/emacs: Add godef-jump-other-window

This will behave like similar "*-other-window" functions in Emacs.

Default key bind is C-x 4 C-c C-j – while awkward, it follows both
the convention for other-window functions and the convention for
not using user- or emacs-reserved keys.

R=golang-dev, adonovan
CC=golang-dev
https://golang.org/cl/10707045

11 years agoruntime: re-enable preemption
Russ Cox [Wed, 17 Jul 2013 18:03:27 +0000 (14:03 -0400)]
runtime: re-enable preemption

Update #543

I believe the runtime is strong enough now to reenable
preemption during the function prologue.
Assuming this is or can be made stable, it will be in Go 1.2.
More aggressive preemption is not planned for Go 1.2.

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

11 years agoruntime: more reliable preemption
Dmitriy Vyukov [Wed, 17 Jul 2013 16:52:37 +0000 (12:52 -0400)]
runtime: more reliable preemption
Currently preemption signal g->stackguard0==StackPreempt
can be lost if it is received when preemption is disabled
(e.g. m->lock!=0). This change duplicates the preemption
signal in g->preempt and restores g->stackguard0
when preemption is enabled.
Update #543.

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

11 years agoruntime: use new frame argument size information
Russ Cox [Wed, 17 Jul 2013 16:47:18 +0000 (12:47 -0400)]
runtime: use new frame argument size information

With this CL, I believe the runtime always knows
the frame size during the gc walk. There is no fallback
to "assume entire stack frame of caller" anymore.

R=golang-dev, khr, cshapiro, dvyukov
CC=golang-dev
https://golang.org/cl/11374044