summaryrefslogtreecommitdiff
path: root/src/pkg/runtime
AgeCommit message (Collapse)AuthorFilesLines
2010-02-09runtime: fix FreeBSD buildRuss Cox1-0/+1
stab in the dark but plausible: the kernel does try to return time zone information. http://fxr.watson.org/fxr/source/kern/kern_time.c?v=FREEBSD8#L421 R=iant CC=golang-dev http://codereview.appspot.com/206053
2010-02-08runtime: allow arbitrary return type in SetFinalizer.Russ Cox10-35/+97
finalize chan, to free OS X semaphore inside Lock. os: finalize File, to close fd. Fixes issue 503. R=ken2 CC=golang-dev http://codereview.appspot.com/204065
2010-02-08runtime: instrument malloc + garbage collector.Russ Cox13-2/+139
add simple garbage collection benchmark. R=iant CC=golang-dev http://codereview.appspot.com/204053
2010-02-07runtime: introduce MemStatsTypeRuss Cox1-3/+5
R=ken2 CC=golang-dev http://codereview.appspot.com/204061
2010-02-06fix commentKai Backman1-1/+1
R=rsc CC=golang-dev http://codereview.appspot.com/203053
2010-02-046l: move mapped symbol table lower in memoryAndrew Gerrand1-6/+1
Allows binary to run on some Linux system. Fix for issue 365. R=rsc CC=golang-dev http://codereview.appspot.com/199096
2010-02-03os/signal: send SIGCHLDs to IncomingChristopher Wedgwood3-3/+3
R=rsc CC=golang-dev http://codereview.appspot.com/199082 Committer: Russ Cox <rsc@golang.org>
2010-02-03finalizers; merge package malloc into package runtimeRuss Cox9-49/+342
R=r, cw CC=golang-dev http://codereview.appspot.com/198085
2010-02-01nacl: fix build, finally fixed 8l convergence bugRuss Cox1-0/+28
R=r CC=golang-dev http://codereview.appspot.com/199042
2010-02-01gc: add ... T, rework plain ...Russ Cox2-9/+3
No longer a distinct type; now a property of func types. R=ken2 CC=golang-dev http://codereview.appspot.com/197042
2010-01-27gc: implement defer print/println/panic/paniclnRuss Cox2-14/+74
Fixes issue 219. R=ken2, r CC=golang-dev http://codereview.appspot.com/194097
2010-01-26small embedded target for arm.Kai Backman8-0/+129
R=rsc CC=golang-dev http://codereview.appspot.com/193104
2010-01-25in C and asm, replace pkg·name with ·nameRuss Cox36-338/+338
(eliminate assumption of package global name space, make code easier to move between packages). R=r CC=golang-dev http://codereview.appspot.com/194072
2010-01-25runtime, type switch: eliminate package global name space assumptionRuss Cox3-12/+10
bonus: type switch now detects multiple uses of identical interface types. bonus: interface types are now order-independent, following the spec. R=ken2 CC=golang-dev http://codereview.appspot.com/194053
2010-01-24gc: record full package paths in runtime type dataRuss Cox1-0/+3
detect compilation of special package runtime with compiler flag instead of package name. R=ken2 CC=golang-dev http://codereview.appspot.com/193080
2010-01-19runtime: wait to allocate mach semaphores backing Locks until neededRuss Cox1-12/+18
need better management of mach semaphores eventually but this avoids allocating them for uncontended Locks. R=r CC=agl1, golang-dev http://codereview.appspot.com/190079
2010-01-13runtime: add demo running Go on raw (emulated) hwRuss Cox14-0/+385
8l: add GOOS=pchw, stop spelling out all the elf numbers. R=r CC=golang-dev http://codereview.appspot.com/186144
2010-01-13runtime: GS already set up by setldt in Linux/386; remove duplicateDevon H. O'Dell1-3/+0
R=rsc CC=golang-dev http://codereview.appspot.com/186146 Committer: Russ Cox <rsc@golang.org>
2010-01-13runtime cleanup.Russ Cox12-66/+148
* move memory code into $GOOS-specific directory. * allow printing of static strings < 256 bytes. (dynamic strings will bump maxstring as they are allocated.) * use cgo2c for runtime.mal. R=r, dho CC=golang-dev http://codereview.appspot.com/186143
2010-01-13runtime: reset DF flag after running external code on 386Russ Cox1-0/+4
R=r CC=golang-dev http://codereview.appspot.com/186108
2010-01-12runtime: fix bug in preemption checks; was causing "lock count" panicsRuss Cox2-1/+3
R=r CC=golang-dev http://codereview.appspot.com/186078
2010-01-09runtime: check for preemption due to garbage collectionRuss Cox6-2/+29
in various already expensive routines. helps keep cpu utilization up when GOMAXPROCS > 1, but not a full solution. http://groups.google.com/group/golang-nuts/t/7a9535c4136d3e2 R=r CC=golang-dev http://codereview.appspot.com/184043
2010-01-06runtime: close TODO now that 8c bug is fixedRuss Cox2-23/+5
R=r CC=golang-dev http://codereview.appspot.com/183138
2010-01-06Ported runtime to Windows.Hector Chu20-60/+600
R=rsc CC=golang-dev http://codereview.appspot.com/176066 Committer: Russ Cox <rsc@golang.org>
2009-12-18runtime: fix race conditionAdam Langley2-5/+3
(Thanks to ken and rsc for pointing this out) rsc: ken pointed out that there's a race in the new one-lock-per-channel code. the issue is that if one goroutine has gone to sleep doing select { case <-c1: case <-c2: } and then two more goroutines try to send on c1 and c2 simultaneously, the way that the code makes sure only one wins is the selgen field manipulation in dequeue: // if sgp is stale, ignore it if(sgp->selgen != sgp->g->selgen) { //prints("INVALID PSEUDOG POINTER\n"); freesg(c, sgp); goto loop; } // invalidate any others sgp->g->selgen++; but because the global lock is gone both goroutines will be fiddling with sgp->g->selgen at the same time. This results in a 7% slowdown in the single threaded case for a ping-pong microbenchmark. Since the cas predominantly succeeds, adding a simple check first didn't make any difference. R=rsc CC=golang-dev http://codereview.appspot.com/180068
2009-12-17 first stub for softfloats, intercepts float instructions and skipsKai Backman4-1/+73
them in the stream. R=rsc http://codereview.appspot.com/174052
2009-12-16runtime: if os/signal is not in use, crash onRuss Cox12-63/+81
most signals, so that ordinary programs can be killed, for example. Fixes issue 434. R=dsymonds1 CC=golang-dev, hoisie http://codereview.appspot.com/180064
2009-12-15os/signal: new packageDavid Symonds15-67/+278
Fixes issue 71. R=rsc, r http://codereview.appspot.com/162056 Committer: Russ Cox <rsc@golang.org>
2009-12-15runtime: return zero value in x, ok = <-c when ok == falseRuss Cox1-0/+2
Fixes issue 401. R=ken2 http://codereview.appspot.com/180053
2009-12-151) Change default gofmt default settings forRobert Griesemer1-84/+84
parsing and printing to new syntax. Use -oldparser to parse the old syntax, use -oldprinter to print the old syntax. 2) Change default gofmt formatting settings to use tabs for indentation only and to use spaces for alignment. This will make the code alignment insensitive to an editor's tabwidth. Use -spaces=false to use tabs for alignment. 3) Manually changed src/exp/parser/parser_test.go so that it doesn't try to parse the parser's source files using the old syntax (they have new syntax now). 4) gofmt -w src misc test/bench 4th set of files. R=rsc CC=golang-dev http://codereview.appspot.com/180049
2009-12-14runtime: in exitsyscall, avoid confusing garbage collectorRuss Cox1-1/+6
R=r CC=golang-dev http://codereview.appspot.com/178046
2009-12-11Remove GOBIN in PATH dependency; don't assume cwd is $GOROOT/srcDevon H. O'Dell1-7/+7
This change removes the necessity to have GOBIN in $PATH, and also doesn't assume that the build is being run from $GOROOT/src. This is a minimal set of necessary changes to get Go to build happily from the FreeBSD ports collection. R=rsc CC=golang-dev http://codereview.appspot.com/171044 Committer: Russ Cox <rsc@golang.org>
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