summaryrefslogtreecommitdiff
path: root/src/runtime/stack1.go
Commit message (Collapse)AuthorAgeFilesLines
* [dev.garbage] all: merge dev.cc (81884b89bd88) into dev.garbageRuss Cox2014-12-051-33/+45
|\ | | | | | | | | | | TBR=rlh CC=golang-codereviews https://codereview.appspot.com/181100044
| * [dev.garbage] all: merge dev.cc (493ad916c3b1) into dev.garbageRuss Cox2014-11-241-1/+1
| |\ | | | | | | | | | | | | | | | TBR=austin CC=golang-codereviews https://codereview.appspot.com/179290043
| * | [dev.garbage] runtime: Stop running gs during the GCscan phase.Rick Hudson2014-11-211-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure that all gs are in a scan state when their stacks are being scanned. LGTM=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/179160044
| * | [dev.garbage] runtime: Turn concurrent GC on by default. Avoid write ↵Rick Hudson2014-11-201-22/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | barriers for GC internal structures such as free lists. LGTM=rsc R=rsc CC=golang-codereviews, rsc https://codereview.appspot.com/179000043
| * | [dev.garbage] all: merge dev.cc into dev.garbageRuss Cox2014-11-151-17/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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://codereview.appspot.com/173250043
* | | [dev.cc] all: merge default (8d42099cdc23) into dev.ccdev.ccRuss Cox2014-12-051-7/+1
| |/ |/| | | | | | | | | TBR=austin CC=golang-codereviews https://codereview.appspot.com/178700044
* | [dev.cc] runtime: generate GOOS- and GOARCH-specific files with go generateRuss Cox2014-11-181-1/+1
|/ | | | | | | | | | | | | | | | | Eventually I'd like almost everything cmd/dist generates to be done with 'go generate' and checked in, to simplify the bootstrap process. The only thing cmd/dist really needs to do is write things like the current experiment info and the current version. This is a first step toward that. It replaces the _NaCl etc constants with generated ones goos_nacl, goos_darwin, goarch_386, and so on. LGTM=dave, austin R=austin, dave, bradfitz CC=golang-codereviews, iant, r https://codereview.appspot.com/174290043
* [dev.cc] runtime: delete scalararg, ptrarg; rename onM to systemstackRuss Cox2014-11-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Scalararg and ptrarg are not "signal safe". Go code filling them out can be interrupted by a signal, and then the signal handler runs, and if it also ends up in Go code that uses scalararg or ptrarg, now the old values have been smashed. For the pieces of code that do need to run in a signal handler, we introduced onM_signalok, which is really just onM except that the _signalok is meant to convey that the caller asserts that scalarg and ptrarg will be restored to their old values after the call (instead of the usual behavior, zeroing them). Scalararg and ptrarg are also untyped and therefore error-prone. Go code can always pass a closure instead of using scalararg and ptrarg; they were only really necessary for C code. And there's no more C code. For all these reasons, delete scalararg and ptrarg, converting the few remaining references to use closures. Once those are gone, there is no need for a distinction between onM and onM_signalok, so replace both with a single function equivalent to the current onM_signalok (that is, it can be called on any of the curg, g0, and gsignal stacks). The name onM and the phrase 'm stack' are misnomers, because on most system an M has two system stacks: the main thread stack and the signal handling stack. Correct the misnomer by naming the replacement function systemstack. Fix a few references to "M stack" in code. The main motivation for this change is to eliminate scalararg/ptrarg. Rick and I have already seen them cause problems because the calling sequence m.ptrarg[0] = p is a heap pointer assignment, so it gets a write barrier. The write barrier also uses onM, so it has all the same problems as if it were being invoked by a signal handler. We worked around this by saving and restoring the old values and by calling onM_signalok, but there's no point in keeping this nice home for bugs around any longer. This CL also changes funcline to return the file name as a result instead of filling in a passed-in *string. (The *string signature is left over from when the code was written in and called from C.) That's arguably an unrelated change, except that once I had done the ptrarg/scalararg/onM cleanup I started getting false positives about the *string argument escaping (not allowed in package runtime). The compiler is wrong, but the easiest fix is to write the code like Go code instead of like C code. I am a bit worried that the compiler is wrong because of some use of uninitialized memory in the escape analysis. If that's the reason, it will go away when we convert the compiler to Go. (And if not, we'll debug it the next time.) LGTM=khr R=r, khr CC=austin, golang-codereviews, iant, rlh https://codereview.appspot.com/174950043
* [dev.cc] runtime: convert panic and stack code from C to GoRuss Cox2014-11-111-0/+807
The conversion was done with an automated tool and then modified only as necessary to make it compile and run. [This CL is part of the removal of C code from package runtime. See golang.org/s/dev.cc for an overview.] LGTM=r R=r, dave CC=austin, dvyukov, golang-codereviews, iant, khr https://codereview.appspot.com/166520043