]> Cypherpunks repositories - gostls13.git/log
gostls13.git
10 years agoliblink: fix encoding of ASETPC in 6a, 8a
Josh Bleecher Snyder [Tue, 19 Aug 2014 01:14:54 +0000 (18:14 -0700)]
liblink: fix encoding of ASETPC in 6a, 8a

It was incorrectly encoded as ASETLS.

LGTM=ruiu, rsc
R=rsc, ruiu
CC=golang-codereviews
https://golang.org/cl/126400043

10 years agocmd/gc, runtime: refactor interface inlining decision into compiler
Russ Cox [Tue, 19 Aug 2014 01:13:11 +0000 (21:13 -0400)]
cmd/gc, runtime: refactor interface inlining decision into compiler

We need to change the interface value representation for
concurrent garbage collection, so that there is no ambiguity
about whether the data word holds a pointer or scalar.

This CL does NOT make any representation changes.

Instead, it removes representation assumptions from
various pieces of code throughout the tree.
The isdirectiface function in cmd/gc/subr.c is now
the only place that decides that policy.
The policy propagates out from there in the reflect
metadata, as a new flag in the internal kind value.

A follow-up CL will change the representation by
changing the isdirectiface function. If that CL causes
problems, it will be easy to roll back.

Update #8405.

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews, r
https://golang.org/cl/129090043

10 years agodoc/go1.4: mention pc-relative addressing on amd64
Russ Cox [Tue, 19 Aug 2014 01:07:11 +0000 (21:07 -0400)]
doc/go1.4: mention pc-relative addressing on amd64

CC=golang-codereviews
https://golang.org/cl/124580043

10 years agoliblink: use pc-relative addressing for all memory references in amd64 code
Russ Cox [Tue, 19 Aug 2014 01:06:56 +0000 (21:06 -0400)]
liblink: use pc-relative addressing for all memory references in amd64 code

LGTM=rminnich, iant
R=golang-codereviews, rminnich, iant
CC=golang-codereviews, r
https://golang.org/cl/125140043

10 years agoruntime: avoid $sym(SB) as constant
Russ Cox [Tue, 19 Aug 2014 01:06:42 +0000 (21:06 -0400)]
runtime: avoid $sym(SB) as constant

The change to pc-relative addressing will make this illegal.

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews, r
https://golang.org/cl/129890043

10 years agocmd/6g: fix undefined behavior in reg.c
Dave Cheney [Tue, 19 Aug 2014 00:52:50 +0000 (10:52 +1000)]
cmd/6g: fix undefined behavior in reg.c

Update #8527

Fixes, cmd/6g/reg.c:847:24: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'

LGTM=minux, rsc
R=minux, rsc
CC=dvyukov, golang-codereviews
https://golang.org/cl/129290043

10 years agofmt: print byte stringers correctly
Andrew Gerrand [Mon, 18 Aug 2014 22:52:52 +0000 (08:52 +1000)]
fmt: print byte stringers correctly

type T byte
func (T) String() string { return "X" }

fmt.Sprintf("%s", []T{97, 98, 99, 100}) == "abcd"
fmt.Sprintf("%x", []T{97, 98, 99, 100}) == "61626364"
fmt.Sprintf("%v", []T{97, 98, 99, 100}) == "[X X X X]"

This change makes the last case print correctly.
Before, it would have been "[97 98 99 100]".

Fixes #8360.

LGTM=r
R=r, dan.kortschak
CC=golang-codereviews
https://golang.org/cl/129330043

10 years agobzip2: improve performance
Jeff R. Allen [Mon, 18 Aug 2014 21:41:28 +0000 (14:41 -0700)]
bzip2: improve performance

Improve performance of move-to-front by using cache-friendly
copies instead of doubly-linked list. Simplify so that the
underlying slice is the object. Remove the n=0 special case,
      which was actually slower with the copy approach.

benchmark                 old ns/op     new ns/op     delta
BenchmarkDecodeDigits     26429714      23859699      -9.72%
BenchmarkDecodeTwain      76684510      67591946      -11.86%

benchmark                 old MB/s     new MB/s     speedup
BenchmarkDecodeDigits     1.63         1.81         1.11x
BenchmarkDecodeTwain      1.63         1.85         1.13x

Updates #6754.

LGTM=adg, agl, josharian
R=adg, agl, josharian
CC=golang-codereviews
https://golang.org/cl/131840043

10 years agoruntime: move panicindex/panicslice to Go.
Keith Randall [Mon, 18 Aug 2014 20:26:28 +0000 (13:26 -0700)]
runtime: move panicindex/panicslice to Go.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/130210043

10 years agounicode: strconv: regexp: Upgrade to Unicode 7.0.0.
Marcel van Lohuizen [Mon, 18 Aug 2014 18:26:10 +0000 (20:26 +0200)]
unicode: strconv: regexp: Upgrade to Unicode 7.0.0.

LGTM=r, bradfitz
R=r, bradfitz
CC=golang-codereviews
https://golang.org/cl/127470043

10 years agoruntime: add more cases to GC info test
Dmitriy Vyukov [Mon, 18 Aug 2014 18:21:55 +0000 (22:21 +0400)]
runtime: add more cases to GC info test

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews, khr, rlh, rsc
https://golang.org/cl/125420043

10 years agointernal/syscall: add support for getrandom on arm
Brad Fitzpatrick [Mon, 18 Aug 2014 18:19:05 +0000 (11:19 -0700)]
internal/syscall: add support for getrandom on arm

Added in linux commit eb6452537b28

LGTM=agl
R=agl
CC=golang-codereviews
https://golang.org/cl/130170043

10 years agoruntime: implement transfer cache
Dmitriy Vyukov [Mon, 18 Aug 2014 12:52:31 +0000 (16:52 +0400)]
runtime: implement transfer cache
Currently we do the following dance after sweeping a span:
1. lock mcentral
2. remove the span from a list
3. unlock mcentral
4. unmark span
5. lock mheap
6. insert the span into heap
7. unlock mheap
8. lock mcentral
9. observe empty list
10. unlock mcentral
11. lock mheap
12. grab the span
13. unlock mheap
14. mark span
15. lock mcentral
16. insert the span into empty list
17. unlock mcentral

This change short-circuits this sequence to nothing,
that is, we just cache and use the span after sweeping.

This gives us functionality similar (even better) to tcmalloc's transfer cache.

benchmark            old ns/op     new ns/op     delta
BenchmarkMalloc8     22.2          19.5          -12.16%
BenchmarkMalloc16    31.0          26.6          -14.19%

LGTM=khr
R=golang-codereviews, khr
CC=golang-codereviews, rlh, rsc
https://golang.org/cl/119550043

10 years agoruntime: fix dump of data/bss
Dmitriy Vyukov [Mon, 18 Aug 2014 12:42:24 +0000 (16:42 +0400)]
runtime: fix dump of data/bss
Fixes #8530.

LGTM=khr
R=golang-codereviews, khr
CC=golang-codereviews, rsc
https://golang.org/cl/124440043

10 years agoruntime: don't acquirem on malloc fast path
Dmitriy Vyukov [Mon, 18 Aug 2014 12:33:39 +0000 (16:33 +0400)]
runtime: don't acquirem on malloc fast path
Mallocgc must be atomic wrt GC, but for performance reasons
don't acquirem/releasem on fast path. The code does not have
split stack checks, so it can't be preempted by GC.
Functions like roundup/add are inlined. And onM/racemalloc are nosplit.
Also add debug code that checks these assumptions.

benchmark                     old ns/op     new ns/op     delta
BenchmarkMalloc8              20.5          17.2          -16.10%
BenchmarkMalloc16             29.5          27.0          -8.47%
BenchmarkMallocTypeInfo8      31.5          27.6          -12.38%
BenchmarkMallocTypeInfo16     34.7          30.9          -10.95%

LGTM=khr
R=golang-codereviews, khr
CC=golang-codereviews, rlh, rsc
https://golang.org/cl/123100043

10 years agoruntime: mark with non-atomic operations when GOMAXPROCS=1
Dmitriy Vyukov [Sat, 16 Aug 2014 05:07:55 +0000 (09:07 +0400)]
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

10 years agocmd/ld: fix operator precedence
Dave Cheney [Sat, 16 Aug 2014 04:10:35 +0000 (14:10 +1000)]
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

10 years agocmd/ld: fix operator precedence
Shenghou Ma [Sat, 16 Aug 2014 04:04:15 +0000 (14:04 +1000)]
cmd/ld: fix operator precedence

LGTM=rsc
R=gobot, dave
CC=golang-codereviews, iant, rsc
https://golang.org/cl/114420043

10 years agocrypto/x509: SystemRootsError style tweaks, document in Verify
Brad Fitzpatrick [Sat, 16 Aug 2014 00:47:02 +0000 (17:47 -0700)]
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

10 years agocmd/dist: goc2c ignores GOROOT_FINAL
Henning Schmiedehausen [Fri, 15 Aug 2014 22:19:02 +0000 (15:19 -0700)]
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

10 years agoA+C: Henning Schmiedehausen (individual CLA)
Ian Lance Taylor [Fri, 15 Aug 2014 22:18:39 +0000 (15:18 -0700)]
A+C: Henning Schmiedehausen (individual CLA)

Generated by a+c.

R=gobot
CC=golang-codereviews
https://golang.org/cl/130140043

10 years agocmd/go: fix a couple of errors found by "go vet"
Rob Pike [Fri, 15 Aug 2014 19:35:01 +0000 (12:35 -0700)]
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

10 years agofmt: fix size returned on fast path of ReadRune
Rob Pike [Fri, 15 Aug 2014 18:41:12 +0000 (11:41 -0700)]
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

10 years agoruntime: fix getgcmask
Dmitriy Vyukov [Fri, 15 Aug 2014 18:36:12 +0000 (22:36 +0400)]
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

10 years agocmd/gc: disallow pointer constants
Matthew Dempsky [Fri, 15 Aug 2014 18:33:31 +0000 (11:33 -0700)]
cmd/gc: disallow pointer constants

Fixes #7760.

LGTM=iant
R=iant, remyoudompheng
CC=golang-codereviews
https://golang.org/cl/130720043

10 years agomisc/nacl: add debugging instructions
Dmitriy Vyukov [Fri, 15 Aug 2014 16:51:44 +0000 (20:51 +0400)]
misc/nacl: add debugging instructions

LGTM=dave, minux
R=golang-codereviews, dave, minux
CC=golang-codereviews, rsc
https://golang.org/cl/122570043

10 years agonet: fix CNAME resolving on Windows
Egon Elbre [Fri, 15 Aug 2014 06:37:19 +0000 (16:37 +1000)]
net: fix CNAME resolving on Windows

Fixes #8492

LGTM=alex.brainman
R=golang-codereviews, alex.brainman
CC=golang-codereviews
https://golang.org/cl/122200043

10 years agodoc: make it point to correct go1.3.1 change history
Mikio Hara [Thu, 14 Aug 2014 23:46:16 +0000 (08:46 +0900)]
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

10 years agoruntime: mark objects with non-atomic operations
Dmitriy Vyukov [Thu, 14 Aug 2014 17:38:24 +0000 (21:38 +0400)]
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

10 years agocmd/cgo: check for compiler errors in the C preamble
Matthew Dempsky [Thu, 14 Aug 2014 16:21:58 +0000 (09:21 -0700)]
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

10 years agodoc/go1.4.txt: cmd/go changes, syscall
Rob Pike [Wed, 13 Aug 2014 21:56:58 +0000 (14:56 -0700)]
doc/go1.4.txt: cmd/go changes, syscall

CC=golang-codereviews
https://golang.org/cl/129130043

10 years agotext/scanner: improve documentation
Robert Griesemer [Wed, 13 Aug 2014 19:53:50 +0000 (12:53 -0700)]
text/scanner: improve documentation

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/123390043

10 years agocmd/cgo, debug/dwarf: fix translation of zero-size arrays
Matthew Dempsky [Wed, 13 Aug 2014 18:16:30 +0000 (11:16 -0700)]
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

10 years agoruntime: keep objects in free lists marked as allocated.
Dmitriy Vyukov [Wed, 13 Aug 2014 16:42:55 +0000 (20:42 +0400)]
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

10 years agocmd/dist: Reuse streq whenever possible.
Thiago Fransosi Farina [Wed, 13 Aug 2014 13:47:30 +0000 (06:47 -0700)]
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

10 years agodoc: remove the "the" in "the the" in the release notes
Andrew Gerrand [Wed, 13 Aug 2014 13:20:39 +0000 (23:20 +1000)]
doc: remove the "the" in "the the" in the release notes

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/128170043

10 years agotag go1.3.1
Andrew Gerrand [Wed, 13 Aug 2014 04:54:54 +0000 (14:54 +1000)]
tag go1.3.1

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/125170044

10 years agomisc/makerelease: exit with nonzero status code on error
Andrew Gerrand [Wed, 13 Aug 2014 04:00:10 +0000 (14:00 +1000)]
misc/makerelease: exit with nonzero status code on error

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/129040043

10 years agoall: copy cmd/ld/textflag.h into pkg/GOOS_GOARCH
Rob Pike [Wed, 13 Aug 2014 00:04:45 +0000 (17:04 -0700)]
all: copy cmd/ld/textflag.h into pkg/GOOS_GOARCH
The file is used by assembly code to define symbols like NOSPLIT.
Having it hidden inside the cmd directory makes it hard to access
outside the standard repository.
Solution: As with a couple of other files used by cgo, copy the
file into the pkg directory and add a -I argument to the assembler
to access it. Thus one can write just
        #include "textflag.h"
in .s files.

The names in runtime are not updated because in the boot sequence the
file has not been copied yet when runtime is built. All other .s files
in the repository are updated.

Changes to doc/asm.html, src/cmd/dist/build.c, and src/cmd/go/build.go
are hand-made. The rest are just the renaming done by a global
substitution. (Yay sam).

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/128050043

10 years agocmd/6c, cmd/6g: avoid address-as-constant in amd64 instructions
Russ Cox [Tue, 12 Aug 2014 23:53:11 +0000 (19:53 -0400)]
cmd/6c, cmd/6g: avoid address-as-constant in amd64 instructions

This allows implementing address-of-global
as a pc-relative address instead of as a
32-bit integer constant.

LGTM=rminnich, iant
R=golang-codereviews, rminnich, iant
CC=golang-codereviews
https://golang.org/cl/128070045

10 years agocmd/go: adjust import comment error
Russ Cox [Tue, 12 Aug 2014 23:52:04 +0000 (19:52 -0400)]
cmd/go: adjust import comment error

Fixes #7453.

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/127210043

10 years agoruntime: avoid using address as constant in amd64 assembly
Russ Cox [Tue, 12 Aug 2014 23:51:20 +0000 (19:51 -0400)]
runtime: avoid using address as constant in amd64 assembly

This allows changing the addressing mode for constant
global addresses to use pc-relative addressing.

LGTM=rminnich, iant
R=golang-codereviews, rminnich, iant
CC=golang-codereviews
https://golang.org/cl/129830043

10 years agodoc/compat1.html: link to go.sys
Rob Pike [Tue, 12 Aug 2014 22:45:35 +0000 (15:45 -0700)]
doc/compat1.html: link to go.sys
You talked me into it. This and other links should be updated
once the new import paths for the subrepos are established.

LGTM=minux
R=golang-codereviews, minux
CC=golang-codereviews
https://golang.org/cl/124260043

10 years agosyscall: freeze the package
Rob Pike [Tue, 12 Aug 2014 22:28:45 +0000 (15:28 -0700)]
syscall: freeze the package
Add a clause to the doc comment for the package and a
paragraph in the compatibility document explaining the
situation.

LGTM=bradfitz, adg, rsc
R=golang-codereviews, adg, bradfitz, minux, rsc
CC=golang-codereviews
https://golang.org/cl/129820043

10 years agocmd/ld: handle large link base addresses
Russ Cox [Tue, 12 Aug 2014 21:41:16 +0000 (17:41 -0400)]
cmd/ld: handle large link base addresses

codeblk and datblk were truncating their
arguments to int32. Don't do that.

LGTM=dvyukov, rminnich
R=iant, dvyukov, rminnich
CC=golang-codereviews
https://golang.org/cl/126050043

10 years agocmd/go, go/build: implement import comment checking
Russ Cox [Tue, 12 Aug 2014 21:41:03 +0000 (17:41 -0400)]
cmd/go, go/build: implement import comment checking

See golang.org/s/go14customimport for design.

Added case to deps_test to allow go/build to import regexp.
Not a new dependency, because go/build already imports go/doc
which imports regexp.

Fixes #7453.

LGTM=r
R=r, josharian
CC=golang-codereviews
https://golang.org/cl/124940043

10 years agodoc: document go1.3.1
Andrew Gerrand [Tue, 12 Aug 2014 21:39:52 +0000 (07:39 +1000)]
doc: document go1.3.1

LGTM=r
R=r, rsc
CC=golang-codereviews
https://golang.org/cl/126060043

10 years agocrypto/rand: use getrandom system call on Linux
Brad Fitzpatrick [Tue, 12 Aug 2014 21:35:27 +0000 (14:35 -0700)]
crypto/rand: use getrandom system call on Linux

Adds internal/syscall package.

Fixes #8520

LGTM=r, agl
R=agl, rsc, r
CC=golang-codereviews, iant
https://golang.org/cl/123260044

10 years agoruntime: remove FlagNoProfile
Dmitriy Vyukov [Tue, 12 Aug 2014 21:03:32 +0000 (01:03 +0400)]
runtime: remove FlagNoProfile
Turns out to be unused as well.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews, khr
https://golang.org/cl/127170044

10 years agoruntime/pprof: fix data race
Dmitriy Vyukov [Tue, 12 Aug 2014 21:02:01 +0000 (01:02 +0400)]
runtime/pprof: fix data race
It's unclear why we do this broken double-checked locking.
The mutex is not held for the whole duration of CPU profiling.
Fixes #8365.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/116290043

10 years agocmd/cgo: make C function pointers non-assignable
Matthew Dempsky [Tue, 12 Aug 2014 19:55:12 +0000 (12:55 -0700)]
cmd/cgo: make C function pointers non-assignable

Fixes #7757.
Fixes #8488.

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/118690044

10 years agodist: Make vaddn private to buf.c
Thiago Fransosi Farina [Tue, 12 Aug 2014 14:49:10 +0000 (07:49 -0700)]
dist: Make vaddn private to buf.c

This function does not have a declaration/prototype in a.h, and it is used only
in buf.c, so it is local to it and thus can be marked as private by adding
'static' to it.

LGTM=iant
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/122300043

10 years agoA+C: Thiago Fransosi Farina (individual CLA)
Ian Lance Taylor [Tue, 12 Aug 2014 14:48:34 +0000 (07:48 -0700)]
A+C: Thiago Fransosi Farina (individual CLA)

Generated by a+c.

LGTM=bradfitz
R=bradfitz
CC=golang-codereviews
https://golang.org/cl/125960043

10 years agorun.bash: run misc/cgo/testgodefs/test.bash
Matthew Dempsky [Tue, 12 Aug 2014 14:13:52 +0000 (07:13 -0700)]
run.bash: run misc/cgo/testgodefs/test.bash

misc/cgo/testgodefs was added by revision d1cf884a594f, but not
add to run.bash.

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/129760044

10 years agocmd/cgo: fix default alignment for empty structs
Matthew Dempsky [Tue, 12 Aug 2014 05:10:17 +0000 (22:10 -0700)]
cmd/cgo: fix default alignment for empty structs

Fixes #5242.

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/125120043

10 years agocmd/cgo: iterate over names in deterministic order
Matthew Dempsky [Mon, 11 Aug 2014 23:49:13 +0000 (16:49 -0700)]
cmd/cgo: iterate over names in deterministic order

This makes GCC behavior (and cgo build failures) deterministic.

Fixes #8487.

Ran this shell command on linux/amd64 (Ubuntu 12.04) before and
after this change:

    for x in `seq 100`; do
      go tool cgo -debug-gcc=true issue8441.go 2>&1 | md5sum
    done | sort | uniq -c

Before:
    67 2cdcb8c7c4e290f7d9009abc581b83dd  -
    10 9a55390df94f7cec6d810f3e20590789  -
    10 acfad22140d43d9b9517bbc5dfc3c0df  -
    13 c337f8fee2304b3a8e3158a4362d8698  -

After:
    100 785c316cbcbcd50896695050e2fa23c1  -

LGTM=minux, iant
R=golang-codereviews, bradfitz, minux, iant
CC=golang-codereviews
https://golang.org/cl/126990043

10 years agocrypto/tls: implement tls-unique channel binding (RFC 5929 section 3).
Andres Erbsen [Mon, 11 Aug 2014 23:40:42 +0000 (16:40 -0700)]
crypto/tls: implement tls-unique channel binding (RFC 5929 section 3).
Tested against GnuTLS and Python.

LGTM=agl
R=golang-codereviews, agl, ashankar
CC=agl, golang-codereviews
https://golang.org/cl/117100043

10 years agocompress/{gzip,zlib}: mention that Close flushes
Andrew Gerrand [Mon, 11 Aug 2014 23:27:39 +0000 (09:27 +1000)]
compress/{gzip,zlib}: mention that Close flushes

Our other CloseFlushers (archive/tar, compress/flate) do mention this.

The original change was accidentally submitted to the release branch:
        https://golang.org/cl/117430043/

TBR=rsc
R=r, rsc
CC=golang-codereviews
https://golang.org/cl/124130043

10 years agocmd/gc: comma-ok assignments produce untyped bool as 2nd result
Chris Manghane [Mon, 11 Aug 2014 23:11:55 +0000 (16:11 -0700)]
cmd/gc: comma-ok assignments produce untyped bool as 2nd result

LGTM=rsc
R=gri, rsc
CC=golang-codereviews
https://golang.org/cl/127950043

10 years agocmd/8g: fix build
Shenghou Ma [Mon, 11 Aug 2014 21:11:31 +0000 (17:11 -0400)]
cmd/8g: fix build

Fixes #8510.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/129720043

10 years agoruntime: no need to set R9 to m for runtime.sigpanic anymore
Shenghou Ma [Mon, 11 Aug 2014 21:10:23 +0000 (17:10 -0400)]
runtime: no need to set R9 to m for runtime.sigpanic anymore

Replaces CL 123980043 which I created on the dev.power64 branch.

LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/123120043

10 years agomisc/nacl/testzip.proto: add fewer files to the zip
Shenghou Ma [Mon, 11 Aug 2014 20:56:36 +0000 (16:56 -0400)]
misc/nacl/testzip.proto: add fewer files to the zip

LGTM=bradfitz, rsc
R=rsc, iant, bradfitz
CC=golang-codereviews
https://golang.org/cl/126940043

10 years agoA+C: Andrew Bursavich (individual CLA)
Russ Cox [Mon, 11 Aug 2014 20:54:34 +0000 (16:54 -0400)]
A+C: Andrew Bursavich (individual CLA)

Generated by a+c.

R=gobot
CC=golang-codereviews
https://golang.org/cl/124120043

10 years agocmd/6g, cmd/8g: fix, test byte-sized magic multiply
Russ Cox [Mon, 11 Aug 2014 19:24:36 +0000 (15:24 -0400)]
cmd/6g, cmd/8g: fix, test byte-sized magic multiply

Credit to Rémy for finding and writing test case.

Fixes #8325.

LGTM=r
R=golang-codereviews, r
CC=dave, golang-codereviews, iant, remyoudompheng
https://golang.org/cl/124950043

10 years agocmd/link: fix zig-zag decoding
Matthew Dempsky [Mon, 11 Aug 2014 17:53:38 +0000 (13:53 -0400)]
cmd/link: fix zig-zag decoding

The >>1 shift needs to happen before converting to int32, otherwise
large values will decode with an incorrect sign bit.

The <<31 shift can happen before or after, but before is consistent
with liblink and the go12symtab doc.

Bug demo at http://play.golang.org/p/jLrhPUakIu

LGTM=rsc
R=golang-codereviews, minux, rsc
CC=golang-codereviews
https://golang.org/cl/119630043

10 years agodoc/go1.4.txt: go.sys subrepo created
Rob Pike [Fri, 8 Aug 2014 21:54:04 +0000 (14:54 -0700)]
doc/go1.4.txt: go.sys subrepo created

CC=golang-codereviews
https://golang.org/cl/124050043

10 years agoA+C: Joel Stemmer (individual CLA)
Rob Pike [Fri, 8 Aug 2014 19:42:36 +0000 (12:42 -0700)]
A+C: Joel Stemmer (individual CLA)

Generated by a+c.

R=gobot
CC=golang-codereviews
https://golang.org/cl/127800043

10 years agotime: Fix missing colon when formatting time zone offsets with seconds
Joel Stemmer [Fri, 8 Aug 2014 19:42:20 +0000 (12:42 -0700)]
time: Fix missing colon when formatting time zone offsets with seconds

When formatting time zone offsets with seconds using the stdISO8601Colon
and stdNumColon layouts, the colon was missing between the hour and minute
parts.

Fixes #8497.

LGTM=r
R=golang-codereviews, iant, gobot, r
CC=golang-codereviews
https://golang.org/cl/126840043

10 years agotest: add another test case that gccgo crashed on
Ian Lance Taylor [Fri, 8 Aug 2014 17:43:44 +0000 (10:43 -0700)]
test: add another test case that gccgo crashed on

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/124020044

10 years agoruntime: bump MaxGcprocs to 32
Dmitriy Vyukov [Fri, 8 Aug 2014 16:52:11 +0000 (20:52 +0400)]
runtime: bump MaxGcprocs to 32
There was a number of improvements related to GC parallelization:
1. Parallel roots/stacks scanning.
2. Parallel stack shrinking.
3. Per-thread workbuf caches.
4. Workset reduction.
Currently 32 threads work well.
go.benchmarks:garbage benchmark on 2 x Intel Xeon E5-2690 (16 HT cores)

1 thread/1 processor:
time=16405255
cputime=16386223
gc-pause-one=546793975
gc-pause-total=3280763

2 threads/1 processor:
time=9043497
cputime=18075822
gc-pause-one=331116489
gc-pause-total=2152257

4 threads/1 processor:
time=4882030
cputime=19421337
gc-pause-one=174543105
gc-pause-total=1134530

8 threads/1 processor:
time=4134757
cputime=20097075
gc-pause-one=158680588
gc-pause-total=1015555

16 threads/1 processor + HT:
time=2006706
cputime=31960509
gc-pause-one=75425744
gc-pause-total=460097

16 threads/2 processors:
time=1513373
cputime=23805571
gc-pause-one=56630946
gc-pause-total=345448

32 threads/2 processors + HT:
time=1199312
cputime=37592764
gc-pause-one=48945064
gc-pause-total=278986

LGTM=rlh
R=golang-codereviews, tracey.brendan, rlh
CC=golang-codereviews, khr, rsc
https://golang.org/cl/123920043

10 years agoruntime: mark functions as static where possible
Matthew Dempsky [Fri, 8 Aug 2014 16:15:52 +0000 (20:15 +0400)]
runtime: mark functions as static where possible

Update #8092

LGTM=dvyukov
R=golang-codereviews, minux, dvyukov
CC=golang-codereviews
https://golang.org/cl/122250043

10 years agoruntime: fix data race in stackalloc
Dmitriy Vyukov [Fri, 8 Aug 2014 16:13:57 +0000 (20:13 +0400)]
runtime: fix data race in stackalloc
Stack shrinking happens during mark phase,
and it assumes that it owns stackcache in mcache.
Stack cache flushing also happens during mark phase,
and it accesses stackcache's w/o any synchronization.
This leads to stackcache corruption:
http://goperfd.appspot.com/log/309af5571dfd7e1817259b9c9cf9bcf9b2c27610

LGTM=khr
R=khr
CC=golang-codereviews, rsc
https://golang.org/cl/126870043

10 years agosyscall: ignore EINVAL/ENOENT from readdirent on OS X 10.10
Russ Cox [Fri, 8 Aug 2014 15:20:45 +0000 (11:20 -0400)]
syscall: ignore EINVAL/ENOENT from readdirent on OS X 10.10

On OS X 10.10 Yosemite, if you have a directory that can be returned
in a single getdirentries64 call (for example, a directory with one file),
and you read from the directory at EOF twice, you get EOF both times:
        fd = open("dir")
        getdirentries64(fd) returns data
        getdirentries64(fd) returns 0 (EOF)
        getdirentries64(fd) returns 0 (EOF)

But if you remove the file in the middle between the two calls, the
second call returns an error instead.
        fd = open("dir")
        getdirentries64(fd) returns data
        getdirentries64(fd) returns 0 (EOF)
        remove("dir/file")
        getdirentries64(fd) returns ENOENT/EINVAL

Whether you get ENOENT or EINVAL depends on exactly what was
in the directory. It is deterministic, just data-dependent.

This only happens in small directories. A directory containing more data
than fits in a 4k getdirentries64 call will return EOF correctly.
(It's not clear if the criteria is that the directory be split across multiple
getdirentries64 calls or that it be split across multiple file system blocks.)

We could change package os to avoid the second read at EOF,
and maybe we should, but that's a bit involved.
For now, treat the EINVAL/ENOENT as EOF.

With this CL, all.bash passes on my MacBook Air running
OS X 10.10 (14A299l) and Xcode 6 beta 5 (6A279r).

I tried filing an issue with Apple using "Feedback Assistant", but it was
unable to send the report and lost it.

C program reproducing the issue, also at http://swtch.com/~rsc/readdirbug.c:

#include <stdio.h>
#include <dirent.h>
#include <unistd.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <fcntl.h>
#include <errno.h>
#include <string.h>

static void test(int);

int
main(void)
{
        int fd, n;
        DIR *dir;
        struct dirent *dp;
        struct stat st;
        char buf[10000];
        long basep;
        int saw;

        if(stat("/tmp/readdirbug", &st) >= 0) {
                fprintf(stderr, "please rm -r /tmp/readdirbug and run again\n");
                exit(1);
        }

        fprintf(stderr, "mkdir /tmp/readdirbug\n");
        if(mkdir("/tmp/readdirbug", 0777) < 0) {
                perror("mkdir /tmp/readdirbug");
                exit(1);
        }

        fprintf(stderr, "create /tmp/readdirbug/file1\n");
        if((fd = creat("/tmp/readdirbug/file1", 0666)) < 0) {
                perror("create /tmp/readdirbug/file1");
                exit(1);
        }
        close(fd);

        test(0);
        test(1);

        fprintf(stderr, "ok - everything worked\n");
}

static void
test(int doremove)
{
        DIR *dir;
        struct dirent *dp;
        int numeof;

        fprintf(stderr, "\n");
        fprintf(stderr, "opendir /tmp/readdirbug\n");
        dir = opendir("/tmp/readdirbug");
        if(dir == 0) {
                perror("open /tmp/readdirbug");
                exit(1);
        }

        numeof = 0;
        for(;;) {
                errno = 0;
                dp = readdir(dir);
                if(dp != 0) {
                        fprintf(stderr, "readdir: found %s\n", dp->d_name);
                        continue;
                }
                if(errno != 0) {
                        perror("readdir");
                        exit(1);
                }
                fprintf(stderr, "readdir: EOF\n");
                if(++numeof == 3)
                        break;
                if(doremove) {
                        fprintf(stderr, "rm /tmp/readdirbug/file1\n");
                        if(remove("/tmp/readdirbug/file1") < 0) {
                                perror("remove");
                                exit(1);
                        }
                }
        }
        fprintf(stderr, "closedir\n");
        closedir(dir);
}

Fixes #8423.

LGTM=bradfitz, r
R=golang-codereviews, bradfitz, dsymonds, dave, r
CC=golang-codereviews, iant
https://golang.org/cl/119530044

10 years agoencoding/gob: fix data races in benchmarks
Dmitriy Vyukov [Fri, 8 Aug 2014 08:48:34 +0000 (12:48 +0400)]
encoding/gob: fix data races in benchmarks
All goroutines decode into the same value.

LGTM=r
R=r, abursavich
CC=golang-codereviews
https://golang.org/cl/123930043

10 years agocmd/go: fix build in airplane mode
Mikio Hara [Fri, 8 Aug 2014 07:20:20 +0000 (16:20 +0900)]
cmd/go: fix build in airplane mode

LGTM=iant
R=golang-codereviews, adg, iant
CC=golang-codereviews
https://golang.org/cl/122190043

10 years agodebug/pe/testdata: make sure gcc-amd64-mingw-exec has symbols
Alex Brainman [Fri, 8 Aug 2014 06:19:45 +0000 (16:19 +1000)]
debug/pe/testdata: make sure gcc-amd64-mingw-exec has symbols

as per rsc request

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/123970043

10 years agomisc/nacl/testzip.proto: include cmd/internal/* to fix build
Shenghou Ma [Fri, 8 Aug 2014 01:48:34 +0000 (21:48 -0400)]
misc/nacl/testzip.proto: include cmd/internal/* to fix build

LGTM=adg, dave
R=golang-codereviews, adg, dave
CC=golang-codereviews
https://golang.org/cl/123050043

10 years agoos: simplify windows Getwd (fixes build)
Alex Brainman [Fri, 8 Aug 2014 00:09:31 +0000 (10:09 +1000)]
os: simplify windows Getwd (fixes build)

Current version of Getwd calls Stat that
calls Getwd therefore infinite recursion.

LGTM=minux
R=golang-codereviews, minux
CC=golang-codereviews
https://golang.org/cl/119600043

10 years agoencoding/json: document coercion of invalid UTF-8 characters
Andrew Gerrand [Thu, 7 Aug 2014 22:57:41 +0000 (08:57 +1000)]
encoding/json: document coercion of invalid UTF-8 characters

Fixes #8342.

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/122180043

10 years agoflag: mention -h in docs
Andrew Gerrand [Thu, 7 Aug 2014 22:57:18 +0000 (08:57 +1000)]
flag: mention -h in docs

Fixes #8314.

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/125820043

10 years agocmd/go: download test dependencies of all named packages
Andrew Gerrand [Thu, 7 Aug 2014 22:56:40 +0000 (08:56 +1000)]
cmd/go: download test dependencies of all named packages

Fixes #8181.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/123870043

10 years agocmd/go: don't pass --buildid=none on OpenBSD
Ian Lance Taylor [Thu, 7 Aug 2014 22:05:20 +0000 (15:05 -0700)]
cmd/go: don't pass --buildid=none on OpenBSD

According to the OpenBSD builder, it doesn't work.

TBR=bradfitz
CC=golang-codereviews
https://golang.org/cl/126830043

10 years agoruntime: convert equality functions to Go
Keith Randall [Thu, 7 Aug 2014 21:52:55 +0000 (14:52 -0700)]
runtime: convert equality functions to Go

LGTM=rsc
R=rsc, khr
CC=golang-codereviews
https://golang.org/cl/121330043

10 years agodoc: add note about crypto/tls cert selection callback.
Adam Langley [Thu, 7 Aug 2014 21:22:15 +0000 (14:22 -0700)]
doc: add note about crypto/tls cert selection callback.

CC=golang-codereviews
https://golang.org/cl/123950043

10 years agoruntime: convert interface routines from C to Go.
Keith Randall [Thu, 7 Aug 2014 20:58:42 +0000 (13:58 -0700)]
runtime: convert interface routines from C to Go.

LGTM=dvyukov
R=golang-codereviews, dave, bradfitz, dvyukov, khr
CC=golang-codereviews
https://golang.org/cl/98510044

10 years agocmd/go: don't pass --buildid=none on FreeBSD
Ian Lance Taylor [Thu, 7 Aug 2014 20:51:29 +0000 (13:51 -0700)]
cmd/go: don't pass --buildid=none on FreeBSD

According to the FreeBSD builder, it doesn't work.

TBR=bradfitz
CC=golang-codereviews
https://golang.org/cl/121400043

10 years agoruntime: fix nacl/amd64p32 build
Dmitriy Vyukov [Thu, 7 Aug 2014 19:47:01 +0000 (23:47 +0400)]
runtime: fix nacl/amd64p32 build
C compiler does not support unnamed fields.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/124870043

10 years agogo/parser: don't do method receiver checks at parse-time
Robert Griesemer [Thu, 7 Aug 2014 19:45:01 +0000 (12:45 -0700)]
go/parser: don't do method receiver checks at parse-time

The ast and printer don't care, and go/types can provide
a better error message.

This change requires an update to the tests for go/types
(go.tools repo). CL forthcoming.

Fixes #8493.

LGTM=adonovan
R=rsc, adonovan
CC=golang-codereviews
https://golang.org/cl/123010044

10 years agocmd/go: pass --build-id=none when generating a cgo .o
Ian Lance Taylor [Thu, 7 Aug 2014 19:38:39 +0000 (12:38 -0700)]
cmd/go: pass --build-id=none when generating a cgo .o

Some systems, like Ubuntu, pass --build-id when linking.  The
effect is to put a note in the output file.  This is not
useful when generating an object file with the -r option, as
it eventually causes multiple build ID notes in the final
executable, all but one of which are for tiny portions of the
file and are therefore useless.

Disable that by passing an explicit --build-id=none when
linking with -r on systems that might do this.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/119460043

10 years agoruntime: test distribution of interface hashes.
Keith Randall [Thu, 7 Aug 2014 19:33:20 +0000 (12:33 -0700)]
runtime: test distribution of interface hashes.

LGTM=dvyukov
R=dvyukov, khr
CC=golang-codereviews
https://golang.org/cl/121030043

10 years agoencoding/gob: make benchmarks parallel
Dmitriy Vyukov [Thu, 7 Aug 2014 17:39:32 +0000 (21:39 +0400)]
encoding/gob: make benchmarks parallel
There are lots of internal synchronization in gob,
so it makes sense to have parallel benchmarks.
Also add a benchmark with slices and interfaces.

LGTM=r
R=golang-codereviews, r
CC=golang-codereviews
https://golang.org/cl/115960043

10 years agogo/build: look in $GOROOT/src/cmd/foo/bar for import cmd/foo/bar
Russ Cox [Thu, 7 Aug 2014 16:33:19 +0000 (12:33 -0400)]
go/build: look in $GOROOT/src/cmd/foo/bar for import cmd/foo/bar

This lets us have non-main packages like cmd/internal or cmd/nm/internal/whatever.

The src/pkg migration (see golang.org/s/go14mainrepo) will allow this
as a natural side effect. The explicit change here just allows use of the
effect a little sooner.

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/117630043

10 years agocmd/addr2line, cmd/nm: factor object reading into cmd/internal/objfile
Russ Cox [Thu, 7 Aug 2014 16:33:06 +0000 (12:33 -0400)]
cmd/addr2line, cmd/nm: factor object reading into cmd/internal/objfile

To do in another CL: make cmd/objdump use cmd/internal/objfile too.

There is a package placement decision in this CL:
cmd/internal/objfile instead of internal/objfile.
I chose to put internal under cmd to make clear (and enforce)
that no standard library packages should use this
(it's a bit dependency-heavy).

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/123910043

10 years agocmd/fix: mention -help instead of the non-existent -? flag
Andrew Gerrand [Thu, 7 Aug 2014 13:24:32 +0000 (23:24 +1000)]
cmd/fix: mention -help instead of the non-existent -? flag

Update #8314

TBR=r
R=golang-codereviews
CC=golang-codereviews
https://golang.org/cl/123890043

10 years agocmd/cc, runtime: eliminate use of the unnamed substructure C extension
Peter Collingbourne [Thu, 7 Aug 2014 13:00:02 +0000 (09:00 -0400)]
cmd/cc, runtime: eliminate use of the unnamed substructure C extension

Eliminating use of this extension makes it easier to port the Go runtime
to other compilers. This CL also disables the extension in cc to prevent
accidental use.

LGTM=rsc, khr
R=rsc, aram, khr, dvyukov
CC=axwalk, golang-codereviews
https://golang.org/cl/106790044

10 years agoos: in Getwd, $PWD override syscall.Getwd
Russ Cox [Thu, 7 Aug 2014 12:58:25 +0000 (08:58 -0400)]
os: in Getwd, $PWD override syscall.Getwd

This makes os.Getwd mimic C getwd on OS X,
and possibly other systems. The change on OS X
was a regression from 1.2 to 1.3.

Fixes #8400.

LGTM=bradfitz
R=iant, bradfitz
CC=golang-codereviews
https://golang.org/cl/118970043

10 years agocmd/gc: remove ignored debugging arguments in Fconv print
Russ Cox [Thu, 7 Aug 2014 12:17:41 +0000 (08:17 -0400)]
cmd/gc: remove ignored debugging arguments in Fconv print

LGTM=dave
R=golang-codereviews, dave
CC=golang-codereviews
https://golang.org/cl/123880043

10 years agoruntime: convert markallocated from C to Go
Dmitriy Vyukov [Thu, 7 Aug 2014 09:34:30 +0000 (13:34 +0400)]
runtime: convert markallocated from C to Go

benchmark                      old ns/op     new ns/op     delta
BenchmarkMalloc8               28.7          22.4          -21.95%
BenchmarkMalloc16              44.8          33.8          -24.55%
BenchmarkMallocTypeInfo8       49.0          32.9          -32.86%
BenchmarkMallocTypeInfo16      46.7          35.8          -23.34%
BenchmarkMallocLargeStruct     907           901           -0.66%
BenchmarkGobDecode             13235542      12036851      -9.06%
BenchmarkGobEncode             10639699      9539155       -10.34%
BenchmarkJSONEncode            25193036      21898922      -13.08%
BenchmarkJSONDecode            96104044      89464904      -6.91%

Fixes #8452.

LGTM=khr
R=golang-codereviews, bradfitz, rsc, dave, khr
CC=golang-codereviews
https://golang.org/cl/122090043

10 years agoruntime: fix plan9/windows build
Dmitriy Vyukov [Thu, 7 Aug 2014 09:28:10 +0000 (13:28 +0400)]
runtime: fix plan9/windows build
Fix few remaining cases after cl/117580043.

TBR=dfc
R=golang-codereviews
CC=dave, golang-codereviews
https://golang.org/cl/124850043

10 years agoruntime: remove mal/malloc/FlagNoGC/FlagNoInvokeGC
Dmitriy Vyukov [Thu, 7 Aug 2014 09:04:04 +0000 (13:04 +0400)]
runtime: remove mal/malloc/FlagNoGC/FlagNoInvokeGC
FlagNoGC is unused now.
FlagNoInvokeGC is unneeded as we don't invoke GC
on g0 and when holding locks anyway.
mal/malloc have very few uses and you never remember
the exact set of flags they use and the difference between them.
Moreover, eventually we need to give exact types to all allocations,
something what mal/malloc do not support.

LGTM=khr
R=golang-codereviews, khr
CC=golang-codereviews, rsc
https://golang.org/cl/117580043