1
0
mirror of https://github.com/golang/go synced 2024-09-23 13:20:14 -06:00
Commit Graph

21233 Commits

Author SHA1 Message Date
Austin Clements
0e8fed098c [dev.cc] runtime: two missed references to "M stack"
LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/177940043
2014-11-18 09:54:50 -05:00
Rob Pike
f03f0cba2b doc/go1.4.html: rewrite first sentence to make it clearer
The grammar was atrocious, probably the victim of an editing error.

LGTM=bradfitz
R=bradfitz
CC=golang-codereviews
https://golang.org/cl/178910043
2014-11-18 13:32:00 +11:00
Alex Brainman
55f19ed866 runtime: fix getcallersp documentation
LGTM=bradfitz
R=rsc, bradfitz
CC=golang-codereviews
https://golang.org/cl/180760043
2014-11-18 09:55:15 +11:00
David du Colombier
2c2a6df4e9 [dev.cc] cmd/gc: fix warning on Plan 9
warning: src/cmd/gc/walk.c:1769 set and not used: on

LGTM=rsc
R=rsc, minux
CC=golang-codereviews
https://golang.org/cl/175850043
2014-11-17 20:46:42 +01:00
Austin Clements
38fef031e1 cmd/pprof: fix EOF handling when getting function source
getFunctionSource gathers five lines of "margin" around every
requested sample line.  However, if this margin went past the
end of the source file, getFunctionSource would encounter an
io.EOF error and abort with this error, resulting in listings
like

    (pprof) list main.main
    ROUTINE ======================== main.main in ...
    0      8.33s (flat, cum) 99.17% of Total
    Error: EOF
    (pprof)

Modify the error handling in getFunctionSource so io.EOF is
always considered non-fatal.  If it reaches EOF, it simply
returns the lines it has.

LGTM=bradfitz
R=rsc, bradfitz
CC=golang-codereviews
https://golang.org/cl/172600043
2014-11-17 14:44:41 -05:00
Alex Brainman
fc288681cf [dev.cc] runtime: replace deleted netpollfd function
LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/169710043
2014-11-17 17:18:21 +11:00
Andrew Gerrand
b30d2a856a bump go1.4rc1 tag
Now that the build and builders are fixed, we're good to go.

LGTM=dsymonds
R=rsc, dsymonds
CC=golang-codereviews
https://golang.org/cl/177900043
2014-11-17 14:41:18 +11:00
David Symonds
44ab8d95d3 undo CL 176900044 / 561398621ba7
Turns out it *is* needed because the cmd/link tests expect to find their own files.

««« original CL description
misc/nacl: exclude cmd/link from the test zip.

It does not appear to be necessary, and cmd/link does not appear in release branches.

LGTM=rsc
R=adg, rsc
CC=golang-codereviews
https://golang.org/cl/176900044
»»»

TBR=rsc
R=adg, rsc
CC=golang-codereviews
https://golang.org/cl/175870045
2014-11-17 14:21:29 +11:00
David Symonds
bc949b5c20 misc/nacl: exclude cmd/link from the test zip.
It does not appear to be necessary, and cmd/link does not appear in release branches.

LGTM=rsc
R=adg, rsc
CC=golang-codereviews
https://golang.org/cl/176900044
2014-11-17 14:04:43 +11:00
Russ Cox
3e7d4f11c0 debug/goobj: move to cmd/internal/goobj
debug/goobj is not ready to be published but it is
needed for the various binary-reading commands.
Move to cmd/internal/goobj.

(The Go 1.3 release branch deleted it, but that's not
an option anymore due to the command dependencies.
The API is still not vetted nor terribly well designed.)

LGTM=adg, dsymonds
R=adg, dsymonds
CC=golang-codereviews
https://golang.org/cl/174250043
2014-11-16 20:52:45 -05:00
Andrew Gerrand
f07ea227ee misc/makerelease: use release-branch.go1.4 for tools and tour
TBR=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/175870043
2014-11-17 11:27:53 +11:00
Andrew Gerrand
7001fad55b tag go1.4rc1
LGTM=dsymonds
R=rsc, dsymonds
CC=golang-codereviews
https://golang.org/cl/175840043
2014-11-17 11:20:53 +11:00
David du Colombier
7aa89ea798 [dev.cc] cmd/8g: work around "out of fixed registers" on Plan 9
This change works around the "out of fixed registers"
issue with the Plan 9 C compiler on 386, introduced by
the Bits change to uint64 in CL 169060043.

The purpose of this CL is to be able to properly
follow the conversion of the Plan 9 runtime to Go
on the Plan 9 builders.

This CL could be reverted once the Go compilers will
be converted to Go.

Thanks to Nick Owens for investigating this issue.

LGTM=rsc
R=rsc
CC=austin, golang-codereviews, mischief
https://golang.org/cl/177860043
2014-11-16 22:55:07 +01:00
Russ Cox
3034be60d8 [dev.garbage] all: merge dev.cc (723ca3789b88) into dev.garbage
Brings in Linux time signature fixes. Should fix build.

TBR=austin
CC=golang-codereviews
https://golang.org/cl/176870043
2014-11-16 16:53:53 -05:00
Russ Cox
b3932baba4 runtime: fix sudog leak
The SudoG used to sit on the stack, so it was cheap to allocated
and didn't need to be cleaned up when finished.

For the conversion to Go, we had to move sudog off the stack
for a few reasons, so we added a cache of recently used sudogs
to keep allocation cheap. But we didn't add any of the necessary
cleanup before adding a SudoG to the new cache, and so the cached
SudoGs had stale pointers inside them that have caused all sorts
of awful, hard to debug problems.

CL 155760043 made sure SudoG.elem is cleaned up.
CL 150520043 made sure SudoG.selectdone is cleaned up.

This CL makes sure SudoG.next, SudoG.prev, and SudoG.waitlink
are cleaned up. I should have done this when I did the other two
fields; instead I wasted a week tracking down a leak they caused.

A dangling SudoG.waitlink can point into a sudogcache list that
has been "forgotten" in order to let the GC collect it, but that
dangling .waitlink keeps the list from being collected.
And then the list holding the SudoG with the dangling waitlink
can find itself in the same situation, and so on. We end up
with lists of lists of unusable SudoGs that are still linked into
the object graph and never collected (given the right mix of
non-trivial selects and non-channel synchronization).

More details in golang.org/issue/9110.

Fixes #9110.

LGTM=r
R=r
CC=dvyukov, golang-codereviews, iant, khr
https://golang.org/cl/177870043
2014-11-16 16:44:45 -05:00
Russ Cox
6150414cb8 runtime: update URL for heap dump format
I just created that redirect, so we can change
it once the wiki moves.

LGTM=bradfitz, khr
R=khr, bradfitz
CC=golang-codereviews
https://golang.org/cl/177780043
2014-11-16 14:25:33 -05:00
Russ Cox
0fcf54b3d2 [dev.garbage] all: merge dev.cc into dev.garbage
The garbage collector is now written in Go.
There is plenty to clean up (just like on dev.cc).

all.bash passes on darwin/amd64, darwin/386, linux/amd64, linux/386.

TBR=rlh
R=austin, rlh, bradfitz
CC=golang-codereviews
https://golang.org/cl/173250043
2014-11-15 08:00:38 -05:00
Dave Cheney
2ceca80e3f [dev.cc] runtime: fix _sfloat thunk
* _sfloat dispatches to runtime._sfloat2 with the Go calling convention, so the seecond argument is a [15]uint32, not a *[15]uint32.
* adjust _sfloat2 to return the new pc in 68(R13) as expected.

LGTM=rsc
R=minux, austin, rsc
CC=golang-codereviews
https://golang.org/cl/174160043
2014-11-15 13:27:05 +11:00
Dave Cheney
14d23bfd7b [dev.cc] runtime: fix bus error accessing auxv random data on arm5
It's rather unsporting of the kernel to give us a pointer to unaligned memory.

This fixes one crash, the next crash occurs in the soft float emulation.

LGTM=minux, rsc, austin
R=minux, rsc, austin
CC=golang-codereviews
https://golang.org/cl/177730043
2014-11-15 09:57:02 +11:00
David du Colombier
1f420c13bd [dev.cc] liblink: fix warnings on Plan 9
warning: src/liblink/asm9.c:501 set and not used: bflag
warning: src/liblink/list9.c:259 format mismatch .5lux INT, arg 4
warning: src/liblink/list9.c:261 format mismatch .5lux INT, arg 3
warning: src/liblink/list9.c:319 more arguments than format VLONG
warning: src/liblink/obj9.c:222 set and not used: autoffset

LGTM=bradfitz, austin
R=rsc, bradfitz
CC=austin, golang-codereviews
https://golang.org/cl/175070043
2014-11-14 22:57:33 +01:00
Austin Clements
7904e951d4 [dev.power64] liblink: fix Solaris build
a->class is a char.  Boo hoo.

LGTM=minux
R=rsc, minux
CC=golang-codereviews
https://golang.org/cl/169630043
2014-11-14 15:53:15 -05:00
Russ Cox
580cba42f4 [dev.cc] runtime: change set_sec to take int64
Fixes build.
Tested that all these systems can make.bash.

TBR=austin
CC=golang-codereviews
https://golang.org/cl/177770043
2014-11-14 14:50:00 -05:00
Austin Clements
1222cc4682 [dev.power64] 6g,9g: formatters for Prog and Addr details
The pretty printers for these make it hard to understand
what's actually in the fields of these structures.  These
"ugly printers" show exactly what's in each field, which can
be useful for understanding and debugging code.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/175780043
2014-11-14 13:58:31 -05:00
Russ Cox
5fce15a2a3 [dev.cc] runtime: fix lfstack for amd64 addresses in top half of addr space
While we are here, add the linux/power64 version.

LGTM=austin
R=austin
CC=aram, dvyukov, golang-codereviews
https://golang.org/cl/177750043
2014-11-14 12:55:23 -05:00
Russ Cox
a87e4a2d01 [dev.cc] runtime: fix linux build
TBR=austin
CC=golang-codereviews
https://golang.org/cl/176760044
2014-11-14 12:55:10 -05:00
Joel Sing
1d05d5880e [dev.cc] runtime: convert dragonfly/amd64 port to Go
LGTM=rsc
R=golang-codereviews, rsc
CC=golang-codereviews
https://golang.org/cl/176750043
2014-11-15 04:47:20 +11:00
Russ Cox
3e804631d9 [dev.cc] all: merge dev.power64 (7667e41f3ced) into dev.cc
This is to reduce the delta between dev.cc and dev.garbage to just garbage collector changes.

These are the files that had merge conflicts and have been edited by hand:
        malloc.go
        mem_linux.go
        mgc.go
        os1_linux.go
        proc1.go
        panic1.go
        runtime1.go

LGTM=austin
R=austin
CC=golang-codereviews
https://golang.org/cl/174180043
2014-11-14 12:10:52 -05:00
Russ Cox
9ef4e56108 [dev.garbage] all: merge dev.power64 (7667e41f3ced) into dev.garbage
Now the only difference between dev.cc and dev.garbage
is the runtime conversion on the one side and the
garbage collection on the other. They both have the
same set of changes from default and dev.power64.

LGTM=austin
R=austin
CC=golang-codereviews
https://golang.org/cl/172570043
2014-11-14 12:09:42 -05:00
Austin Clements
a11f256436 [dev.power64] liblink: generate dnames[5689] for D_* constants
This is more complicated than the other enums because the D_*
enums are full of explicit initializers and repeated values.
This tries its best.  (This will get much cleaner once we
tease these constants apart better.)

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/166700043
2014-11-14 12:08:46 -05:00
Austin Clements
5b38501a4f [dev.power64] 5g,6g,8g,9g: debug prints for regopt pass 6 and paint2
Theses were very helpful in understanding the regions and
register selection when porting regopt to 9g.  Add them to the
other compilers (and improve 9g's successor debug print).

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/174130043
2014-11-14 11:56:31 -05:00
Joel Sing
9ad6b7e322 [dev.cc] runtime: convert openbsd/386 port to Go
LGTM=rsc
R=golang-codereviews, bradfitz, rsc
CC=golang-codereviews
https://golang.org/cl/173200044
2014-11-15 03:55:14 +11:00
Russ Cox
3dcc62e1da [dev.garbage] all: merge default (f38460037b72) into dev.garbage
This is the revision that dev.cc is branched from.

LGTM=austin
R=austin
CC=golang-codereviews
https://golang.org/cl/169590043
2014-11-14 11:37:54 -05:00
Austin Clements
9e7bed88cd [dev.power64] 5g,6g,8g: synchronize documentation for regopt structures
I added several comments to the regopt-related structures when
porting it to 9g.  Synchronize those comments back in to the
other compilers.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/175720043
2014-11-14 11:07:33 -05:00
Aram Hăvărneanu
9d6825edee [dev.cc] runtime: fix nil pointer crash handler bug on Solaris
This change fixes the Solaris port.

LGTM=dave, rsc
R=rsc, dave
CC=brad, golang-codereviews
https://golang.org/cl/168600045
2014-11-14 14:25:49 +01:00
Nigel Tao
f9d56543f1 C: add Nick Cooper (Google CLA).
LGTM=dsymonds
R=dsymonds
CC=golang-codereviews, nmvc
https://golang.org/cl/169580043
2014-11-14 17:03:17 +11:00
Alex Brainman
0438182c30 [dev.cc] runtime: convert netpoll_windows.c to Go
LGTM=rsc
R=rsc
CC=dvyukov, golang-codereviews
https://golang.org/cl/172530043
2014-11-14 14:07:28 +11:00
Yasuhiro Matsumoto
59439f8ea3 doc: fix small typo in doc
LGTM=adg
R=golang-codereviews, adg
CC=golang-codereviews
https://golang.org/cl/170660043
2014-11-14 14:05:14 +11:00
Joel Sing
ba603c3100 [dev.cc] runtime: convert openbsd/amd64 port to Go
LGTM=rsc
R=rsc, bradfitz
CC=golang-codereviews
https://golang.org/cl/171660043
2014-11-14 13:01:12 +11:00
Nigel Tao
891abf9cc7 net/http: add comment to clarify whether Dir is '/' or '\'.
LGTM=bradfitz
R=bradfitz, alex.brainman
CC=golang-codereviews
https://golang.org/cl/168600044
2014-11-14 11:43:01 +11:00
Austin Clements
743bdf612a [dev.power64] 9g: implement regopt
This adds registerization support to 9g equivalent to what the
other compilers have.

LGTM=rsc
R=rsc, dave
CC=golang-codereviews
https://golang.org/cl/174980043
2014-11-13 13:51:44 -05:00
Austin Clements
231b8d61e9 [dev.power64] 9l: remove enum as's tag for c2go
None of the other compilers have a tag for this enum.
Cleaning all of this up to use proper types will happen after
the conversion.

LGTM=minux, rsc
R=rsc, minux
CC=golang-codereviews
https://golang.org/cl/166690043
2014-11-13 13:48:59 -05:00
Austin Clements
c3dadb3d19 [dev.power64] 6g,8g: remove unnecessary and incorrect reg use scanning
Previously, the 6g and 8g registerizers scanned for used
registers beyond the end of a region being considered for
registerization.  This ancient artifact was copied from the C
compilers, where it was probably necessary to track implicitly
used registers.  In the Go compilers it's harmless (because it
can only over-restrict the set of available registers), but no
longer necessary because the Go compilers correctly track
register use/set information.  The consequences of this extra
scan were (at least) that 1) we would not consider allocating
the AX register if there was a deferproc call in the future
because deferproc uses AX as a return register, so we see the
use of AX, but don't track that AX is set by the CALL, and 2)
we could not consider allocating the DX register if there was
a MUL in the future because MUL implicitly sets DX and (thanks
to an abuse of copyu in this code) we would also consider DX
used.

This commit fixes these problems by nuking this code.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/174110043
2014-11-13 13:34:20 -05:00
Joel Sing
b2ec4cf50c [dev.cc] runtime: make SIGSYS notifiable on freebsd (again)
This was originally done to the C port in rev 17d3b45534b5 and
seemingly got lost during the conversion.

LGTM=bradfitz
R=rsc, bradfitz
CC=golang-codereviews
https://golang.org/cl/167700043
2014-11-14 04:29:03 +11:00
Aram Hăvărneanu
e088e16256 [dev.cc] runtime: convert Solaris port to Go
Memory management was consolitated with the BSD ports, since
it was almost identical.

Assembly thunks are gone, being replaced by the new //go:linkname
feature.

This change supersedes CL 138390043 (runtime: convert solaris
netpoll to Go), which was previously reviewed and tested.

This change is only the first step, the port now builds,
but doesn't run. Binaries fail to exec:

    ld.so.1: 6.out: fatal: 6.out: TLS requirement failure : TLS support is unavailable
    Killed

This seems to happen because binaries don't link with libc.so
anymore. We will have to solve that in a different CL.

Also this change is just a rough translation of the original
C code, cleanup will come in a different CL.

[This CL is part of the removal of C code from package runtime.
See golang.org/s/dev.cc for an overview.]

LGTM=rsc
R=rsc, dave
CC=golang-codereviews, iant, khr, minux, r, rlh
https://golang.org/cl/174960043
2014-11-13 16:07:10 +01:00
Alex Brainman
a0862a175d [dev.cc] runtime: convert mem_windows.c to Go
LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/175000043
2014-11-13 14:53:13 +11:00
Alex Brainman
e5d01a5ffc [dev.cc] runtime: add missing cb_max const
LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/169490043
2014-11-13 12:05:36 +11:00
Brad Fitzpatrick
38ea0ae05f net/url: add example of using URL.Opaque with http.Request
Per private thread soliciting help. I realized part of this is
documented in several places, but we lacked a unifying
example.

LGTM=rsc
R=golang-codereviews
CC=adg, golang-codereviews, iant, rsc
https://golang.org/cl/171620043
2014-11-12 14:27:27 -08:00
Austin Clements
8c060d9392 [dev.power64] liblink: improve documentation of struct Prog
LGTM=dave, rsc
R=rsc, dave
CC=golang-codereviews
https://golang.org/cl/169460043
2014-11-12 17:19:02 -05:00
Joel Sing
37cae806cb [dev.cc] [dev.cc] runtime: fix freebsd cgo __progname export
LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/174050043
2014-11-12 17:18:22 -05:00
Austin Clements
60f66aa817 [dev.power64] 9g: proginfo fixes
For D_OREG addresses, store the used registers in regindex
instead of reguse because they're really part of addressing.

Add implicit register use/set for DUFFZERO/DUFFCOPY.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/174050044
2014-11-12 14:58:43 -05:00