summaryrefslogtreecommitdiff
path: root/src/pkg/runtime
AgeCommit message (Collapse)AuthorFilesLines
2009-12-10fix calling convention and make memmove restore the g and mKai Backman1-2/+10
registers. R=rsc http://codereview.appspot.com/166049
2009-12-08runtime: start new darwin/amd64 threads on correct stack,Russ Cox1-11/+13
then enable stack check. R=r http://codereview.appspot.com/165100
2009-12-08Fix stack on FreeBSD / add stack check across the boardDevon H. O'Dell8-10/+36
FreeBSD was passing stk as the new thread's stack base, while stk is the top of the stack in go. The added check should cause a trap if this ever comes up in any new ports, or regresses in current ones. R=rsc CC=golang-dev http://codereview.appspot.com/167055 Committer: Russ Cox <rsc@golang.org>
2009-12-08When SA_SIGINFO is set, we should use __sa_sigaction on FreeBSDDevon H. O'Dell2-4/+4
R=rsc CC=golang-dev http://codereview.appspot.com/165097 Committer: Russ Cox <rsc@golang.org>
2009-12-07runtime: don't touch pages of memory unnecessarily.Russ Cox8-45/+15
cuts working size for hello world from 6 MB to 1.2 MB. still some work to be done, but diminishing returns. R=r http://codereview.appspot.com/165080
2009-12-07runtime: introduce unsafe.New and unsafe.NewArrayRuss Cox2-4/+42
to provide functionality previously hacked in to reflect and gob. R=r http://codereview.appspot.com/165076
2009-12-07pick off special one-byte case in copy. worth 2x in benchmarks (38ns->16ns).Rob Pike1-1/+5
the one-item case could be generalized easily with no cost. worth considering. R=rsc CC=golang-dev, cw http://codereview.appspot.com/167044
2009-12-06runtime: disable pointer scan optimizationRuss Cox1-1/+3
* broken by reflect, gob TBR=r http://codereview.appspot.com/166077
2009-12-04gc/runtime: pass type structure to makeslice.Russ Cox3-13/+86
* inform garbage collector about memory with no pointers in it 1.9s gcc reverse-complement.c reverse-complement.go 4.5s / 3.5s original, with/without bounds checks 3.5s / 3.3s bounds check reduction 3.3s / 2.8s smarter garbage collector 2.6s / 2.3s assembler bytes.IndexByte 2.5s / 2.1s even smarter garbage collector (this CL) R=r http://codereview.appspot.com/165064
2009-12-04runtime: shift the index for the sort by one.Adam Langley1-6/+2
Makes the code look cleaner, even if it's a little harder to figure out from the sort invariants. R=rsc CC=golang-dev http://codereview.appspot.com/165061
2009-12-04Remove global chanlock.Adam Langley1-33/+75
On a microbenchmark that ping-pongs on lots of channels, this makes the multithreaded case about 20% faster and the uniprocessor case about 1% slower. (Due to cache effects, I expect.) R=rsc, agl CC=golang-dev http://codereview.appspot.com/166043
2009-12-03runtime: fix Caller crash on 386.Russ Cox1-2/+2
Fixes issue 176. R=r http://codereview.appspot.com/166044
2009-12-03runtime: malloc fixesRuss Cox7-110/+38
* throw away dead code * add mlookup counter * add malloc counter * set up for blocks with no pointers Fixes issue 367. R=r http://codereview.appspot.com/165050
2009-11-23go: makes it build for the case $GOROOT has whitespacesSergio Luis O. B. Correia1-2/+2
the bash scripts and makefiles for building go didn't take into account the fact $GOROOT / $GOBIN could both be directories containing whitespaces, and was not possible to build it in such a situation. this commit adjusts the various makefiles/scripts to make it aware of that possibility, and now it builds successfully when using a path with whitespaces as well. Fixes issue 115. R=rsc, dsymonds1 http://codereview.appspot.com/157067 Committer: Russ Cox <rsc@golang.org>
2009-11-20Missed a reference to sc instead of mc in 157065.William Josephson1-1/+1
R=rsc, dho http://codereview.appspot.com/157116 Committer: Russ Cox <rsc@golang.org>
2009-11-20FreeBSD's mcontext isn't exactly the same as sigcontext, soDevon H. O'Dell5-122/+43
we can't use them interchangably. R=rsc, wjosephson CC=golang-dev http://codereview.appspot.com/156113 Committer: Russ Cox <rsc@golang.org>
2009-11-20x[y:] for stringsRuss Cox1-0/+18
R=ken2 http://codereview.appspot.com/157114
2009-11-20x[lo:] - gc and runtime.Russ Cox4-54/+45
* add runtime sliceslice1 for x[lo:] * remove runtime arraytoslice, rewriting &arr into arr[0:len(arr)]. * port cgen_inline into 8g, 5g. * use native memmove in maps R=ken2 http://codereview.appspot.com/157106
2009-11-19reflect fixesRuss Cox1-0/+6
R=r http://codereview.appspot.com/156104
2009-11-19runtime: mask signals during signal handler on OS XRuss Cox2-2/+2
Fixes issue 265. R=r CC=golang-dev http://codereview.appspot.com/157084
2009-11-18runtime: fix bug on darwin/amd64 - bad g in bsdthread_startRuss Cox1-2/+2
R=r http://codereview.appspot.com/157077
2009-11-18More FreeBSD-touchups. Thundercats are GOOOOO!Devon H. O'Dell2-8/+8
R=rsc CC=golang-dev http://codereview.appspot.com/157074 Committer: Russ Cox <rsc@golang.org>
2009-11-18bugs in memmove:Rob Pike3-6/+7
- has arguments (no stack split) - MOVL does not set condition R=ken2, rsc http://codereview.appspot.com/156086
2009-11-18Remove unnecessary execute bits.William Josephson11-0/+0
R=rsc http://codereview.appspot.com/156077 Committer: Russ Cox <rsc@golang.org>
2009-11-18Add an intptr type to runtime; needed in FreeBSDDevon H. O'Dell2-1/+3
In thread.c, we need to cast to whatever the native size of intptr is on the system, but we only have uintptr available. They're the same size, but can't do signed casts without this one :). R=rsc CC=golang-dev http://codereview.appspot.com/156073 Committer: Russ Cox <rsc@golang.org>
2009-11-17FreeBSD/i386 workDevon H. O'Dell8-22/+492
This patchset gets Go to pretty much the same state that FreeBSD/amd64 is in. R=rsc http://codereview.appspot.com/157055 Committer: Russ Cox <rsc@golang.org>
2009-11-17runtime: add ARM memmoveRuss Cox1-0/+248
R=ken2 http://codereview.appspot.com/156063
2009-11-17copy tweaksRuss Cox5-131/+181
* move memmove to arch-specific subdirectories * add memmove for arm * add copyright notices marking them as copied from Inferno R=ken2 http://codereview.appspot.com/156061
2009-11-17runtime: two trivial but important bug fixesRuss Cox2-2/+2
R=r http://codereview.appspot.com/156059
2009-11-17bug in copyKen Thompson1-1/+1
R=rsc http://codereview.appspot.com/156056
2009-11-17install copy predefinedKen Thompson4-0/+164
did not test 386, but should work shouldnt matter if copy is not used R=rsc http://codereview.appspot.com/156055
2009-11-17runtime: do not create new threads during malloc.Russ Cox1-2/+5
the signal handling stack is a different size than the normal stack, so it cannot be allocated using the backup stack allocator. Fixes issue 250. R=agl1 CC=golang-dev http://codereview.appspot.com/157044
2009-11-17improve documentation of runtime. there was no mention of types.Rob Pike1-1/+3
R=rsc CC=golang-dev http://codereview.appspot.com/157042
2009-11-17syscall: use correct pointer in recvfrom/sendto.Russ Cox1-13/+13
linux/386 stack trace: use 32-bit hex. Fixes issue 159. R=r http://codereview.appspot.com/154178
2009-11-17FreeBSD-specific porting work.Devon H. O'Dell11-3/+690
cgo/libmach remain unimplemented. However, compilers, runtime, and packages are 100%. I still need to go through and implement missing syscalls (at least make sure they're all listed), but for all shipped functionality, this is done. Ship! ;) R=rsc, VenkateshSrinivas http://codereview.appspot.com/152142 Committer: Russ Cox <rsc@golang.org>
2009-11-16runtime: make signal handler work on 386Russ Cox2-7/+18
R=r http://codereview.appspot.com/154171
2009-11-15runtime: avoid crash in CallerRuss Cox2-2/+2
Fixes issue 176. R=r http://codereview.appspot.com/154146
2009-11-13runtime: warn about SELinux based mmap failures on Linux.Adam Langley5-5/+32
SELinux will cause mmap to fail when we request w+x memory unless the user has configured their policies. We have a warning in make.bash, but it's quite likely that the policy will be reset at some point and then all their binaries start failing. This patch prints a warning on Linux when mmap fails with EACCES. R=rsc CC=golang-dev http://codereview.appspot.com/152086
2009-11-12fix style nit ignored in previous clKai Backman1-1/+1
R=rsc http://codereview.appspot.com/152110
2009-11-12add support for pre arm v6 cas. set GOARM=5 to enable.Kai Backman3-1/+46
R=rsc http://codereview.appspot.com/154101
2009-11-11 add cache flushing call after generating closure.Kai Backman2-0/+15
go/test: passes 88% (306/347) R=rsc http://codereview.appspot.com/152089
2009-11-10update old comment: things are much better nowRuss Cox1-5/+6
R=r http://codereview.appspot.com/152057
2009-11-09- replaced gofmt expression formatting algorithm withRobert Griesemer1-2/+2
rsc's algorithm - applied gofmt -w misc src - partial CL (last chunk) R=rsc, r http://go/go-review/1024041
2009-11-05 make 5g executables run on android/arm hardware. change OABIKai Backman1-8/+20
usage to EABI. go/test: passes 85% (296/347) on random android phone. R=rsc http://go/go-review/1024003
2009-11-05gofmt-ify io, json, runtime, encodingRobert Griesemer2-49/+50
R=rsc http://go/go-review/1017056
2009-10-29clone and futexKai Backman2-11/+95
go/test: passes 99% (343/347) R=rsc http://go/go-review/1016004
2009-10-28Fix bug when sending via select.Adam Langley1-32/+19
selfree maintains a cache of Select structures for several sizes. In newselect, we'll use an entry from the cache if one is found. However, the Scase structures corresponding to a send may have been allocated for the wrong size. In this case we'll write off the end of the Scase into random memory and, generally, read some amount of junk in the receive. This patch fixes the issue by removing the cache, on the advice of rsc. R=rsc CC=go-dev http://go/go-review/1016002
2009-10-28mysterious bug: runtime.acid wasn't getting rebuiltRuss Cox2-5/+5
when switching architectures. fix bug twice: make sure clean removes the file, and generate into architecture-specific file names. R=r http://go/go-review/1013018
2009-10-26Get the right sigaction struct for the 386 rt_sigaction systemIan Lance Taylor3-9/+20
call. This uses the header files from a 32-bit Ubuntu Hardy system. The use of _LOOSE_KERNEL_NAMES seems right. The -D__ARCH_SI_UID_T works around a bug which appears to be fixed in later Linux versions. R=rsc http://go/go-review/1013015
2009-10-25proper syscall convention for armKai Backman1-2/+2
R=rsc http://go/go-review/1015009