aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime
AgeCommit message (Collapse)Author
2012-03-27runtime: work around false negative in deadlock detectionRuss Cox
Not a complete fix for issue 3342, but fixes the trivial case. There may still be a race in the instants before and after a scavenger-induced garbage collection. Intended to be "obviously safe": a call to runtime·gosched before main.main is no different than a call to runtime.Gosched at the beginning of main.main, and it is (or had better be) safe to call runtime.Gosched at any point during main. Update #3342. R=iant CC=golang-dev https://golang.org/cl/5919052
2012-03-27undo CL 5844051 / 5d0322034aa8Mikio Hara
Breaks closure test when GOMAXPROCS=2 or more. ««« original CL description runtime: restore deadlock detection in the simplest case. Fixes #3342. R=iant, r, dave, rsc CC=golang-dev, remy https://golang.org/cl/5844051 »»» R=rsc CC=golang-dev https://golang.org/cl/5924045
2012-03-26runtime: restore deadlock detection in the simplest case.Rémy Oudompheng
Fixes #3342. R=iant, r, dave, rsc CC=golang-dev, remy https://golang.org/cl/5844051
2012-03-21runtime: remove unused goc2c.cShenghou Ma
Its functionality has been moved into cmd/dist. R=golang-dev, r, iant CC=golang-dev https://golang.org/cl/5843062
2012-03-15runtime: do not handle signals before configuring handlerRuss Cox
There was a small window during program initialization where a signal could come in before the handling mechanisms were set up to handle it. Delay the signal-handler installation until we're ready for the signals. Fixes #3314. R=golang-dev, dsymonds, mikioh.mikioh CC=golang-dev https://golang.org/cl/5833049
2012-03-15runtime: fix arm buildRuss Cox
TBR=golang-dev CC=golang-dev https://golang.org/cl/5832047
2012-03-155l, 6l, 8l: fix stack split logic for stacks near default segment sizeRuss Cox
Fixes #3310. R=golang-dev, r CC=golang-dev https://golang.org/cl/5823051
2012-03-15runtime: manage stack by ourselves for badcallback on windows/amd64Shenghou Ma
This function uses 48-byte of precious non-split stack for every callback function, and without this CL, it can easily overflow the non-split stack. I encountered this when trying to enable misc/cgo/test on windows/amd64. R=rsc CC=golang-dev https://golang.org/cl/5784075
2012-03-14runtime/cgo: linux signal maskingMikio Hara
Fixes #3314. Fixes #3101 (again). R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5820047
2012-03-14runtime/cgo: darwin signal maskingMikio Hara
Fixes #3101 (again). R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5825043
2012-03-12runtime: fix windows/amd64 exception handlerAlex Brainman
R=golang-dev, rsc CC=golang-dev, hectorchu https://golang.org/cl/5797077
2012-03-12runtime: fix windows/amd64Russ Cox
Maybe. TBR=bradfitz CC=golang-dev https://golang.org/cl/5754091
2012-03-12runtime: print error on receipt of signal on non-Go threadRuss Cox
It's the best we can do before Go 1. For issue 3250; not a fix but at least less mysterious. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/5797068
2012-03-09runtime: move runtime.write back to CRuss Cox
It may have to switch stacks, since we are calling a DLL instead of a system call. badcallback says where it is, because it is being called on a Windows stack already. R=golang-dev, alex.brainman CC=golang-dev https://golang.org/cl/5782060
2012-03-08runtime: fix windows buildRuss Cox
Implement runtime·write, like on the other systems, and also runtime·badcallback, in assembly to reduce stack footprint. TBR=golang-dev CC=golang-dev https://golang.org/cl/5785055
2012-03-08runtime: inline calls to notokRuss Cox
When a very low-level system call that should never fail does fail, we call notok, which crashes the program. Often, we are then left with only the program counter as information about the crash, and it is in notok. Instead, inline calls to notok (it is just one instruction on most systems) so that the program counter will tell us which system call is unhappy. R=golang-dev, gri, minux.ma, bradfitz CC=golang-dev https://golang.org/cl/5792048
2012-03-08cgo, runtime: diagnose callback on non-Go threadRuss Cox
Before: $ go run x.go signal 11 (core dumped) $ After: $ go run x.go runtime: cgo callback on thread not created by Go. signal 11 (core dumped) $ For issue 3068. Not a fix, but as much of a fix as we can do before Go 1. R=golang-dev, rogpeppe, gri CC=golang-dev https://golang.org/cl/5781047
2012-03-07runtime: fix freebsd crashRuss Cox
FreeBSD, alone among our supported operating systems, required that usleep not be interrupted. Don't require that. Fixes #3217. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/5781045
2012-03-07runtime: try extending arena size in 32-bit allocator.Rémy Oudompheng
If it didn't reach the limit, we can try extending the arena before resorting to random memory mappings and praying for the kernel to be kind. Fixes #3173. R=rsc, rsc CC=golang-dev https://golang.org/cl/5725045
2012-03-07runtime/pprof: disable test on Leopard 64-bitRuss Cox
Fixes #3234. R=golang-dev, gri CC=golang-dev https://golang.org/cl/5756078
2012-03-06runtime: remove unused runtime·signame and runtime·newErrorIan Lance Taylor
R=golang-dev CC=golang-dev https://golang.org/cl/5756044
2012-03-05runtime: add CompilerRuss Cox
R=iant, r, gri CC=golang-dev https://golang.org/cl/5720073
2012-03-05runtime: wait for main goroutine before setting GOMAXPROCS.Rémy Oudompheng
Fixes #3182. R=golang-dev, dvyukov, rsc CC=golang-dev, remy https://golang.org/cl/5732057
2012-03-05runtime/debug: fix test when source cannot be foundRuss Cox
This happens with GOROOT_FINAL=/somewhere/else R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/5727069
2012-03-01runtime: run init on main threadRuss Cox
Fixes #3125. R=golang-dev, r, minux.ma CC=golang-dev https://golang.org/cl/5714049
2012-03-01runtime/pprof: skip test on 64-bit Mac OS X 10.6Shenghou Ma
R=rsc, bsiegert CC=golang-dev https://golang.org/cl/5709060
2012-02-29pkg/runtime: 2 sanity checks in the runtime-gdb.py prettyprinters.Luuk van Dijk
Don't try to print obviously corrupt slices or interfaces. Doesn't actually solve 3047 or 2818, but seems a good idea anyway. R=rsc, bsiegert CC=golang-dev https://golang.org/cl/5708061
2012-02-28runtime/pprof: support OS X CPU profilingRuss Cox
Work around profiling kernel bug with signal masks. Still broken on 64-bit Snow Leopard kernel, but I think we can ignore that one and let people upgrade to Lion. Add new trivial tools addr2line and objdump to take the place of the GNU tools of the same name, since those are not installed on OS X. Adapt pprof to invoke 'go tool addr2line' and 'go tool objdump' if the system tools do not exist. Clean up disassembly of base register on amd64. Fixes #2008. R=golang-dev, bradfitz, mikioh.mikioh, r, iant CC=golang-dev https://golang.org/cl/5697066
2012-02-24runtime: size arena to fit in virtual address space limitRuss Cox
For Brad. Now FreeBSD/386 binaries run on nearlyfreespeech.net. Fixes #2302. R=golang-dev, r CC=golang-dev https://golang.org/cl/5700060
2012-02-23runtime: fix armRuss Cox
signal.test binary passes on my phone; should fix builder R=golang-dev, r CC=golang-dev https://golang.org/cl/5694064
2012-02-23runtime: check for ARM syscall failuresShenghou Ma
While we are at it, also update some comments. Tested on Linux/ARM builder. R=rsc, golang-dev CC=golang-dev https://golang.org/cl/5696047
2012-02-23runtime: darwin signal maskingRuss Cox
Fixes #3101 (darwin). R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/5693044
2012-02-23runtime: linux signal maskingRuss Cox
Fixes #3101 (Linux). R=golang-dev, bradfitz, minux.ma CC=golang-dev https://golang.org/cl/5696043
2012-02-22pprof: add Profile typeRuss Cox
Makes it possible for client code to maintain its own profiles, and also reduces the API surface by giving us a type that models built-in profiles. R=golang-dev, r CC=golang-dev https://golang.org/cl/5684056
2012-02-22runtime: goroutine profile, stack dumpsRuss Cox
R=golang-dev, r, r CC=golang-dev https://golang.org/cl/5687076
2012-02-22runtime: fix FreeBSD signal handling around thread creationDevon H. O'Dell
Ignore signals while we are spawning a new thread. Previously, a signal arriving just before runtime.minit setting up the signal handler triggers a "double fault" in signal trampolining. Fixes #3017. R=rsc, mikioh.mikioh, minux.ma, adg CC=golang-dev https://golang.org/cl/5684060
2012-02-21ld: add NOPTRBSS for large, pointer-free uninitialized dataRuss Cox
cc: add #pragma textflag to set it runtime: mark mheap to go into noptr-bss. remove special case in garbage collector Remove the ARM from.flag field created by CL 5687044. The DUPOK flag was already in p->reg, so keep using that. Otherwise test/nilptr.go creates a very large binary. Should fix the arm build. Diagnosed by minux.ma; replacement for CL 5690044. R=golang-dev, minux.ma, r CC=golang-dev https://golang.org/cl/5686060
2012-02-22runtime: use SYSCALL instead of INT 0x80 in FreeBSD's runtime.osyield on amd64Devon H. O'Dell
R=mikioh.mikioh, rsc CC=golang-dev https://golang.org/cl/5690062
2012-02-21runtime: avoid malloc during mallocRuss Cox
A fault during malloc might lead to the program's first call to findfunc, which would in turn call malloc. Don't do that. Fixes #1777. R=golang-dev, gri CC=golang-dev https://golang.org/cl/5689047
2012-02-21runtime: remove an obsolete fileMikio Hara
R=golang-dev, adg CC=golang-dev https://golang.org/cl/5686049
2012-02-21runtime: implement runtime.osyield on FreeBSD 386, amd64Devon H. O'Dell
R=rsc, mikioh.mikioh CC=golang-dev https://golang.org/cl/5689046
2012-02-19runtime: fix another memory leakRuss Cox
morebuf holds a pc/sp from the last stack split or reflect.call or panic/recover. If the pc is a closure, the reference will keep it from being collected. moreargp holds a pointer to the arguments from the last stack split or reflect.call or panic/recover. Normally it is a stack pointer and thus not of interest, but in the case of reflect.call it is an allocated argument list and holds up the arguments to the call. R=golang-dev, r CC=golang-dev https://golang.org/cl/5674109
2012-02-19runtime: fix tiny memory leakRuss Cox
The m->cret word holds the C return value when returning across a stack split boundary. It was not being cleared after use, which means that the return value (if a C function) or else the value of AX/R0 at the time of the last stack unsplit was being kept alive longer than necessary. Clear it. I think the effect here should be very small, but worth fixing anyway. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/5677092
2012-02-19runtime: APIRuss Cox
Delete Alloc, Free, Lookup, Semacquire, Semrelease Fixes #2955. R=golang-dev, r, bradfitz CC=golang-dev https://golang.org/cl/5675093
2012-02-17runtime: remove use of ?:Gustavo Niemeyer
Fixes #3061. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5656089
2012-02-17runtime: silence warningsAlex Brainman
R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/5656084
2012-02-17runtime: Permit default behaviour of SIGTSTP, SIGTTIN, SIGTTOU.David Symonds
Fixes #3037. R=rsc, minux.ma, r, rsc CC=golang-dev https://golang.org/cl/5674072
2012-02-17runtime: rename Cgocalls and Goroutines to NumCgoCall and NumGoroutine, ↵David Symonds
respectively. Update some other docs too. Update #2955. R=rsc CC=golang-dev https://golang.org/cl/5676060
2012-02-16runtime: release unused memory to the OS.Sébastien Paolacci
Periodically browse MHeap's freelists for long unused spans and release them if any. Current hardcoded settings: - GC is forced if none occured over the last 2 minutes. - spans are handed back after 5 minutes of uselessness. SysUnused (for Unix) is a wrapper on madvise MADV_DONTNEED on Linux and MADV_FREE on BSDs. R=rsc, dvyukov, remyoudompheng CC=golang-dev https://golang.org/cl/5451057
2012-02-15runtime: define NSIG to fix plan 9 buildDavid du Colombier
R=rsc CC=golang-dev https://golang.org/cl/5677053