1
0
mirror of https://github.com/golang/go synced 2024-10-08 00:41:20 -06:00
Commit Graph

21559 Commits

Author SHA1 Message Date
Dmitriy Vyukov
c6fe53a230 runtime: mark with non-atomic operations when GOMAXPROCS=1
Perf builders show 3-5% GC pause increase with GOMAXPROCS=1 when marking with atomic ops:
http://goperfd.appspot.com/perfdetail?commit=a8a6e765d6a87f7ccb71fd85a60eb5a821151f85&commit0=3b864e02b987171e05e2e9d0840b85b5b6476386&kind=builder&builder=linux-amd64&benchmark=http

LGTM=rlh
R=golang-codereviews, rlh
CC=dave, golang-codereviews, khr, rsc
https://golang.org/cl/128340043
2014-08-16 09:07:55 +04:00
Dave Cheney
78cc89ce67 cmd/ld: fix operator precedence
Fixes #8480.

This CL reapplies CL 114420043. This attempt doesn't blow up when encountering hidden symbols.

LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/128310043
2014-08-16 14:10:35 +10:00
Shenghou Ma
41d75933d7 cmd/ld: fix operator precedence
LGTM=rsc
R=gobot, dave
CC=golang-codereviews, iant, rsc
https://golang.org/cl/114420043
2014-08-16 14:04:15 +10:00
Brad Fitzpatrick
a729552333 crypto/x509: SystemRootsError style tweaks, document in Verify
In retrospect this should've been a variable instead of a type,
but oh well.

LGTM=agl
R=agl
CC=golang-codereviews
https://golang.org/cl/129250044
2014-08-15 17:47:02 -07:00
Henning Schmiedehausen
7eba885ba5 cmd/dist: goc2c ignores GOROOT_FINAL
When building golang, the environment variable GOROOT_FINAL can be set
to indicate a different installation location from the build
location. This works fine, except that the goc2c build step embeds
line numbers in the resulting c source files that refer to the build
location, no the install location.

This would not be a big deal, except that in turn the linker uses the
location of runtime/string.goc to embed the gdb script in the
resulting binary and as a net result, the debugger now complains that
the script is outside its load path (it has the install location
configured).

See https://code.google.com/p/go/issues/detail?id=8524 for the full
description.

Fixes #8524.

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/128230046
2014-08-15 15:19:02 -07:00
Ian Lance Taylor
40182102e3 A+C: Henning Schmiedehausen (individual CLA)
Generated by a+c.

R=gobot
CC=golang-codereviews
https://golang.org/cl/130140043
2014-08-15 15:18:39 -07:00
Rob Pike
ab0b0d9031 cmd/go: fix a couple of errors found by "go vet"
LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/127410043
2014-08-15 12:35:01 -07:00
Shenghou Ma
d0be55a662 [dev.power64] liblink: fix g->panicwrap update code generation
LGTM=rsc
R=golang-codereviews, rsc
CC=golang-codereviews
https://golang.org/cl/123400043
2014-08-15 15:31:54 -04:00
Russ Cox
e445f75dbc [dev.power64] runtime: fix usleep not to smash saved LR
LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/130760043
2014-08-15 15:28:08 -04:00
Russ Cox
fd21b9f8b5 [dev.power64] runtime: make all bitmaps arrays of bytes
The "simpler faster garbage collector" is full of little-endian assumptions.
Instead of trying to correct all the mistakes, just give in and make
everything use bytes.

LGTM=minux
R=minux
CC=dvyukov, golang-codereviews
https://golang.org/cl/124400043
2014-08-15 15:22:33 -04:00
Rob Pike
4edcbe0d40 fmt: fix size returned on fast path of ReadRune
Fixes #8512.

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/130090043
2014-08-15 11:41:12 -07:00
Dmitriy Vyukov
c5e648d684 runtime: fix getgcmask
bv.data is an array of uint32s but the code was using
offsets computed for an array of bytes.
Add a test for stack GC info.
Fixes #8531.

LGTM=rsc
R=golang-codereviews
CC=golang-codereviews, khr, rsc
https://golang.org/cl/124450043
2014-08-15 22:36:12 +04:00
Matthew Dempsky
7f40e5e6e5 cmd/gc: disallow pointer constants
Fixes #7760.

LGTM=iant
R=iant, remyoudompheng
CC=golang-codereviews
https://golang.org/cl/130720043
2014-08-15 11:33:31 -07:00
Dmitriy Vyukov
fb0b923f67 misc/nacl: add debugging instructions
LGTM=dave, minux
R=golang-codereviews, dave, minux
CC=golang-codereviews, rsc
https://golang.org/cl/122570043
2014-08-15 20:51:44 +04:00
Egon Elbre
a18a360379 net: fix CNAME resolving on Windows
Fixes #8492

LGTM=alex.brainman
R=golang-codereviews, alex.brainman
CC=golang-codereviews
https://golang.org/cl/122200043
2014-08-15 16:37:19 +10:00
Dave Cheney
f9fdc887ae [dev.power64] runtime: define page size on power64le systems to be 64k
Fixes #8495.

CL 128260043 updated the definition of syscall.GetPageSize to report 64k for power64 and power64le. This CL cleans up the last place where the page size was defined as 4k.

LGTM=minux
R=rsc, minux
CC=golang-codereviews
https://golang.org/cl/123520043
2014-08-15 13:15:24 +10:00
Mikio Hara
0235f6854c doc: make it point to correct go1.3.1 change history
LGTM=minux, adg
R=golang-codereviews, minux, adg
CC=golang-codereviews
https://golang.org/cl/129180043
2014-08-15 08:46:16 +09:00
Russ Cox
249e8f700a [dev.power64] runtime: fix RuntimeGogoBytes on power64
LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/130030043
2014-08-14 16:34:28 -04:00
Russ Cox
ed68c7df55 [dev.power64] cmd/ld, runtime: detect, fix nosplit overflows
LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/121690043
2014-08-14 15:29:37 -04:00
Russ Cox
6edd1c6d1a [dev.power64] syscall: fix power64 page size
LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/128260043
2014-08-14 15:29:05 -04:00
Russ Cox
0bee7f3a17 [dev.power64] reflect: fix test not to hang even if TrySend lies
LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/124360043
2014-08-14 14:35:00 -04:00
Russ Cox
25d4d75376 [dev.power64] cmd/dist: tell goc2c that power64 is 64-bit system
LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/125300043
2014-08-14 14:34:48 -04:00
Russ Cox
aa739b8d03 [dev.power64] cmd/9g: correct floating point comparison
LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/129210043
2014-08-14 14:34:37 -04:00
Russ Cox
ecbe6b9f7f [dev.power64] runtime: replace getproccount with simpler code
This runs once. There is no need for inscrutable algorithms.
Also it doesn't compile correctly with 9c.

LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/130000043
2014-08-14 14:34:25 -04:00
Russ Cox
25bde37af4 [dev.power64] cmd/9c: fix constant truncation in optimizer
This is what broke getpopcount, but that code had it coming.

LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/130000044
2014-08-14 14:34:14 -04:00
Shenghou Ma
80e76e272a [dev.power64] test/nosplit.go: add power64 support
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/125210043
2014-08-14 13:59:58 -04:00
Dmitriy Vyukov
0c32bd6262 runtime: mark objects with non-atomic operations
On the go.benchmarks/garbage benchmark with GOMAXPROCS=16:
                   old ns/op     new ns/op     delta
time               1392254       1353170       -2.81%
cputime            21995751      21373999      -2.83%
gc-pause-one       15044812      13050524      -13.26%
gc-pause-total     213636        185317        -13.26%

LGTM=rlh
R=golang-codereviews, rlh
CC=golang-codereviews, khr, rsc
https://golang.org/cl/123380043
2014-08-14 21:38:24 +04:00
Matthew Dempsky
ba30c082c0 cmd/cgo: check for compiler errors in the C preamble
E.g., here's the new "go build" output:

$ go build misc/cgo/errors/issue8442.go
# command-line-arguments
could not determine kind of name for C.issue8442foo

gcc errors for preamble:
misc/cgo/errors/issue8442.go:11:19: error: unknown type name 'UNDEF'

Fixes #8442.

LGTM=iant
R=iant, alex.brainman
CC=golang-codereviews
https://golang.org/cl/129160043
2014-08-14 09:21:58 -07:00
Shenghou Ma
b3375771fc [dev.power64] runtime: don't fault on runtime.procyield, just return
LGTM=dave, rsc
R=rsc, iant, dave
CC=golang-codereviews
https://golang.org/cl/128230044
2014-08-14 12:01:27 -04:00
Shenghou Ma
7776b0a1cc [dev.power64] syscall: re-generate using cgo compiled by gc, fix test failures
LGTM=dave, rsc
R=rsc, iant, dave
CC=golang-codereviews
https://golang.org/cl/127320043
2014-08-14 12:01:21 -04:00
Shenghou Ma
f464573c70 [dev.power64] runtime: add power64/power64le as supported arch to gcinfo_test.go
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/122560043
2014-08-14 12:01:14 -04:00
Shenghou Ma
5f02073ded [dev.power64] runtime: fix time.now
Was reading a uint64 field with a MOVW, which has endian issues.

LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/122550043
2014-08-14 11:59:58 -04:00
Shenghou Ma
b697c120f6 [dev.power64] reflect: now we find one big endian machine
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/124350043
2014-08-14 11:59:52 -04:00
Russ Cox
4f557008e8 [dev.power64] liblink: fix $large(SP) for floating point load/store
Fixes test/cmplxdivide.

LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/128190045
2014-08-14 11:57:10 -04:00
Russ Cox
76b1ddbb96 [dev.power64] liblink: fix handling of $nnn(reg)
LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/126180043
2014-08-13 18:32:54 -04:00
Russ Cox
ba9a11e557 [dev.power64] liblink: fix handling of MOVD with large constants
LGTM=minux
R=golang-codereviews, minux
CC=golang-codereviews
https://golang.org/cl/122540043
2014-08-13 18:14:13 -04:00
Rob Pike
937f0d59fc doc/go1.4.txt: cmd/go changes, syscall
CC=golang-codereviews
https://golang.org/cl/129130043
2014-08-13 14:56:58 -07:00
Russ Cox
b7a6fd28db [dev.power64] runtime: fix reflect.call
The code to copy out the results was incorrect.

LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/122530043
2014-08-13 16:26:43 -04:00
Robert Griesemer
e9bbcea81d text/scanner: improve documentation
LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/123390043
2014-08-13 12:53:50 -07:00
Russ Cox
404472e50b [dev.power64] runtime: fix C prototype for cmallocgc
LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/122520043
2014-08-13 15:50:06 -04:00
Russ Cox
27e657ef68 [dev.power64] cmd/9g: fix floating-point comparison for NaN
LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/127300043
2014-08-13 15:49:19 -04:00
Shenghou Ma
f3f332851f [dev.power64] cmd/9g: add missing break
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/125260043
2014-08-13 15:49:07 -04:00
Shenghou Ma
856124a1cd [dev.power64] runtime: fix build
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/128180044
2014-08-13 14:52:11 -04:00
Russ Cox
ebf42035b7 [dev.power64] runtime: fix newstackcall
moreframesize is a uint32, not a uint64.

LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/124310043
2014-08-13 14:52:01 -04:00
Russ Cox
6e73ae88b5 [dev.power64] cmd/9l, math/big, runtime, syscall: fixes for power64
On the machine I'm using, the hardware page size seems to be 64 kB.
Make ELF rounding and mmap quantum 64 kB to match.

Error numbers returned from kernel are positive; do not negate.

Implement stubs for math/big.

LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/124300043
2014-08-13 14:36:29 -04:00
Matthew Dempsky
078a9cbc6c cmd/cgo, debug/dwarf: fix translation of zero-size arrays
In cgo, now that recursive calls to typeConv.Type() always work,
we can more robustly calculate the array sizes based on the size
of our element type.

Also, in debug/dwarf, the decision to call zeroType is made
based on a type's usage	within a particular struct, but dwarf.Type
values are cached in typeCache, so the modification might affect
uses of the type in other structs.  Current compilers don't appear
to share DWARF type entries for "[]foo" and "[0]foo", but they also
don't consistently share type entries in other cases.  Arguably
modifying the types is an improvement in some cases, but varying
translated types according to compiler whims seems like a bad idea.

Lastly, also in debug/dwarf, zeroType only needs to rewrite the
top-level dimension, and only if the rest of the array size is
non-zero.

Fixes #8428.

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/127980043
2014-08-13 11:16:30 -07:00
Dmitriy Vyukov
187d0f6720 runtime: keep objects in free lists marked as allocated.
Restore https://golang.org/cl/41040043 after GC rewrite.
Original description:
On the plus side, we don't need to change the bits on malloc and free.
On the downside, we need to mark objects in the free lists during GC.
But the free lists are small at GC time, so it should be a net win.

benchmark             old ns/op     new ns/op     delta
BenchmarkMalloc8      21.9          20.4          -6.85%
BenchmarkMalloc16     31.1          29.6          -4.82%

LGTM=khr
R=khr
CC=golang-codereviews, rlh, rsc
https://golang.org/cl/122280043
2014-08-13 20:42:55 +04:00
Shenghou Ma
f285537b7f [dev.power64] cmd/9g: do not ignore move instructions even if from and to are samaddr()
Those moves might be significant (e.g. narrowing or widening): on Power64,
we don't distinguish between MOVWD and MOVW.

This fixes divmode.go and bug447.go.

LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/125200043
2014-08-13 11:39:07 -04:00
Thiago Fransosi Farina
aa549ce449 cmd/dist: Reuse streq whenever possible.
Basically this cleanup replaces all the usage usages of strcmp() == 0,
found by the following command line:

$ grep -R strcmp cmd/dist | grep "0"

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/123330043
2014-08-13 06:47:30 -07:00
Andrew Gerrand
392bc8985e doc: remove the "the" in "the the" in the release notes
LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/128170043
2014-08-13 23:20:39 +10:00