1
0
mirror of https://github.com/golang/go synced 2024-10-04 06:21:23 -06:00
Commit Graph

689 Commits

Author SHA1 Message Date
Dmitriy Vyukov
bf9c778fe2 gc: pass FlagNoPointers to runtime.new
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5151043
2011-10-13 11:06:55 +03:00
Russ Cox
8219cc9af8 runtime: fix memory leak in parallel garbage collector
The work buffer management used by the garbage
collector during parallel collections leaks buffers.
This CL tests for and fixes the leak.

R=golang-dev, dvyukov, r
CC=golang-dev
https://golang.org/cl/5254059
2011-10-12 13:23:34 -04:00
Dmitriy Vyukov
af1232fe38 runtime: faster strings
Use FlagNoPointers and do not zeroize memory when allocate strings.
test/garbage/parser.out        old         new
run #1                     32.923s     32.065s
run #2                     33.047s     31.931s
run #3                     32.702s     31.841s
run #4                     32.718s     31.838s
run #5                     32.702s     31.868s

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5259041
2011-10-12 17:40:02 +03:00
Luuk van Dijk
77fac21e82 runtime: append([]byte, string...)
Fixes #2274

R=rsc, gri, dsymonds, bradfitz, lvd
CC=golang-dev
https://golang.org/cl/5149045
2011-10-12 15:59:23 +02:00
Hector Chu
8584445289 runtime: fix crash when returning from syscall during gc
gp->m can go from non-nil to nil when it re-enters schedule().

R=golang-dev
CC=golang-dev, rsc
https://golang.org/cl/5245042
2011-10-11 12:57:16 -04:00
Joel Sing
060ffabd18 runtime: improve locking on openbsd
Implement a locking model based on the current linux model - a
tri-state mutex with active spinning, passive spinning and sleeping.

R=golang-dev, dvyukov, rsc
CC=golang-dev
https://golang.org/cl/4974043
2011-10-09 00:56:13 +11:00
Dmitriy Vyukov
c14b2689f0 runtime: faster finalizers
Linux/amd64, 2 x Intel Xeon E5620, 8 HT cores, 2.40GHz
benchmark                    old ns/op    new ns/op    delta
BenchmarkFinalizer              420.00       261.00  -37.86%
BenchmarkFinalizer-2            985.00       201.00  -79.59%
BenchmarkFinalizer-4           1077.00       244.00  -77.34%
BenchmarkFinalizer-8           1155.00       180.00  -84.42%
BenchmarkFinalizer-16          1182.00       184.00  -84.43%

BenchmarkFinalizerRun          2128.00      1378.00  -35.24%
BenchmarkFinalizerRun-2        1655.00      1418.00  -14.32%
BenchmarkFinalizerRun-4        1634.00      1522.00   -6.85%
BenchmarkFinalizerRun-8        2213.00      1581.00  -28.56%
BenchmarkFinalizerRun-16       2424.00      1599.00  -34.03%

Darwin/amd64, Intel L9600, 2 cores, 2.13GHz
benchmark                    old ns/op    new ns/op    delta
BenchmarkChanCreation          1451.00       926.00  -36.18%
BenchmarkChanCreation-2        3124.00      1412.00  -54.80%
BenchmarkChanCreation-4        6121.00      2628.00  -57.07%

BenchmarkFinalizer              684.00       420.00  -38.60%
BenchmarkFinalizer-2          11195.00       398.00  -96.44%
BenchmarkFinalizer-4          15862.00       654.00  -95.88%

BenchmarkFinalizerRun          2025.00      1397.00  -31.01%
BenchmarkFinalizerRun-2        3920.00      1447.00  -63.09%
BenchmarkFinalizerRun-4        9471.00      1545.00  -83.69%

R=golang-dev, cw, rsc
CC=golang-dev
https://golang.org/cl/4963057
2011-10-06 18:42:51 +03:00
Russ Cox
ad35cea762 runtime: fix malloc sampling bug
The malloc sample trigger was not being set in a
new m, so the first allocation in each new m - the
goroutine structure - was being sampled with
probability 1 instead of probability sizeof(G)/rate,
an oversampling of about 5000x for the default
rate of 1 MB.  This bug made pprof graphs show
far more G allocations than there actually were.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5224041
2011-10-06 11:30:48 -04:00
Dmitriy Vyukov
5695915833 runtime: fix spurious deadlock reporting
Fixes #2337.
Unfortunate sequence of events is:
1. maxcpu=2, mcpu=1, grunning=1
2. starttheworld creates an extra M:
   maxcpu=2, mcpu=2, grunning=1
4. the goroutine calls runtime.GOMAXPROCS(1)
   maxcpu=1, mcpu=2, grunning=1
5. since it sees mcpu>maxcpu, it calls gosched()
6. schedule() deschedules the goroutine:
   maxcpu=1, mcpu=1, grunning=0
7. schedule() call getnextandunlock() which
   fails to pick up the goroutine again,
   because canaddcpu() fails, because mcpu==maxcpu
8. then it sees that grunning==0,
   reports deadlock and terminates

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5191044
2011-10-06 18:10:14 +03:00
Mikio Hara
504963e6a4 build: clear execute bit from source files
R=golang-dev, alex.brainman
CC=golang-dev
https://golang.org/cl/5201042
2011-10-06 18:33:13 +09:00
Wei Guangjing
e7042418c5 cgo: support for mingw-w64 4.5.1 and newer
R=rsc, jp, hectorchu
CC=golang-dev
https://golang.org/cl/4962051
2011-10-06 07:22:48 +01:00
Joel Sing
b2f1eba324 runtime: set runtime ncpu on openbsd
Set the runtime ncpu based on the hw.ncpu sysctl.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5191043
2011-10-05 13:16:43 -04:00
Joel Sing
a5f064a3e1 gc: limit helper threads based on ncpu
When ncpu < 2, work.nproc is always 1 which results in infinite helper
threads being created if gomaxprocs > 1 and MaxGcproc > 1. Avoid this
by using the same limits as imposed helpgc().

R=golang-dev, rsc, dvyukov
CC=golang-dev
https://golang.org/cl/5176044
2011-10-05 12:08:28 -04:00
Anthony Martin
528ccdc513 runtime: fix Plan 9 build
This change adds the osyield and usleep
functions and code to read the number of
processors from /dev/sysstat.

I also changed SysAlloc to return nil
when brk fails (it was returning -1).

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5177049
2011-10-05 12:07:44 -04:00
Hector Chu
85916146ea runtime: fix usleep on linux/386 and re-enable parallel gc
R=golang-dev, jsing, alex.brainman, cw, rsc
CC=golang-dev
https://golang.org/cl/5166047
2011-10-03 19:08:59 +01:00
Joel Sing
d573ad2671 runtime: implement runtime usleep for openbsd
R=golang-dev, mikioh.mikioh, hectorchu
CC=golang-dev
https://golang.org/cl/5173043
2011-10-01 11:58:36 -07:00
Russ Cox
e7e5c5adb3 runtime: fix map memory leak
The map implementation was using the C idiom of using
a pointer just past the end of its table as a limit pointer.
Unfortunately, the garbage collector sees that pointer as
pointing at the block adjacent to the map table, pinning
in memory a block that would otherwise be freed.

Fix by making limit pointer point at last valid entry, not
just past it.

Reviewed by Mike Burrows.

R=golang-dev, bradfitz, lvd, r
CC=golang-dev
https://golang.org/cl/5158045
2011-10-01 13:00:53 -04:00
David Symonds
723f73caec freebsd: Add stubs for runtime·osyield and runtime·usleep.
These don't do anything useful; they are just here to fix the build.

R=golang-dev
TBR=r
CC=golang-dev
https://golang.org/cl/5154048
2011-09-30 16:39:10 -07:00
Russ Cox
f18e4e44a3 runtime: disable parallel gc
Breaks on Linux/386 during parallel sync tests.

TBR=r
CC=golang-dev
https://golang.org/cl/5168044
2011-09-30 14:59:46 -04:00
Hector Chu
38d3f58528 runtime: fix windows build
Add osyield and usleep as required by recent GC changes.

R=golang-dev, r, dsymonds, rsc, r
CC=golang-dev
https://golang.org/cl/5156042
2011-09-30 11:33:13 -07:00
Rob Pike
40c26fff14 runtime: fix darwin build
Add place holder for runtime.osyield.

R=golang-dev
CC=golang-dev
https://golang.org/cl/5149049
2011-09-30 10:52:36 -07:00
Russ Cox
d324f2143b runtime: parallelize garbage collector mark + sweep
Running test/garbage/parser.out.

On a 4-core Lenovo X201s (Linux):
31.12u 0.60s 31.74r 	 1 cpu, no atomics
32.27u 0.58s 32.86r 	 1 cpu, atomic instructions
33.04u 0.83s 27.47r 	 2 cpu

On a 16-core Xeon (Linux):
33.08u 0.65s 33.80r 	 1 cpu, no atomics
34.87u 1.12s 29.60r 	 2 cpu
36.00u 1.87s 28.43r 	 3 cpu
36.46u 2.34s 27.10r 	 4 cpu
38.28u 3.85s 26.92r 	 5 cpu
37.72u 5.25s 26.73r	 6 cpu
39.63u 7.11s 26.95r	 7 cpu
39.67u 8.10s 26.68r	 8 cpu

On a 2-core MacBook Pro Core 2 Duo 2.26 (circa 2009, MacBookPro5,5):
39.43u 1.45s 41.27r 	 1 cpu, no atomics
43.98u 2.95s 38.69r 	 2 cpu

On a 2-core Mac Mini Core 2 Duo 1.83 (circa 2008; Macmini2,1):
48.81u 2.12s 51.76r 	 1 cpu, no atomics
57.15u 4.72s 51.54r 	 2 cpu

The handoff algorithm is really only good for two cores.
Beyond that we will need to so something more sophisticated,
like have each core hand off to the next one, around a circle.
Even so, the code is a good checkpoint; for now we'll limit the
number of gc procs to at most 2.

R=dvyukov
CC=golang-dev
https://golang.org/cl/4641082
2011-09-30 09:40:01 -04:00
Luuk van Dijk
8a4ef5d1eb runtime: gdb support, fix pretty printing of channels.
The type to cast the elements to was stolen from a field
that's no longer there.

R=rsc
CC=golang-dev
https://golang.org/cl/5143050
2011-09-29 12:07:38 -07:00
Ian Lance Taylor
45301ba8c0 runtime: check for nil value pointer in select syncsend case
Fixes #2309.

R=rsc, bradfitz
CC=golang-dev
https://golang.org/cl/5128053
2011-09-26 20:46:37 -07:00
Luuk van Dijk
46ed89b7a3 runtime: gdb support: gracefully handle not being able to find types
The Dwarf info has the full typenames, the go *struct runtime.commonType
has the short name.  A more permanent fix would link the two together
but this way the user gets useable stack traces for now.

R=rsc
CC=golang-dev
https://golang.org/cl/5097046
2011-09-23 10:28:02 +02:00
Hector Chu
6bc0346e28 runtime: increase stack system space on windows/amd64
gotest src/pkg/exp/template/html was crashing because the exception handler overflowed the goroutine stack.

R=alex.brainman, golang-dev
CC=golang-dev
https://golang.org/cl/5031049
2011-09-17 20:39:29 +10:00
Hector Chu
a506c96ab2 runtime/pprof: enable test on windows
R=alex.brainman
CC=golang-dev
https://golang.org/cl/5047045
2011-09-17 18:00:32 +10:00
Hector Chu
9fd26872cb runtime: implement pprof support for windows
Credit to jp for proof of concept.

R=alex.brainman, jp, rsc, dvyukov
CC=golang-dev
https://golang.org/cl/4960057
2011-09-17 17:57:59 +10:00
Hector Chu
5c30325983 runtime: eliminate handle churn when churning channels on Windows
The Windows implementation of the net package churns through a couple of channels for every read/write operation.  This translates into a lot of time spent in the kernel creating and deleting event objects.

R=rsc, dvyukov, alex.brainman, jp
CC=golang-dev
https://golang.org/cl/4997044
2011-09-14 20:23:21 -04:00
Russ Cox
33d00fae30 runtime: track HeapIdle
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4995045
2011-09-14 11:29:01 -04:00
Alex Brainman
7406379fff runtime: syscall to return both AX and DX for windows/386
Fixes #2181.

R=golang-dev, jp
CC=golang-dev
https://golang.org/cl/5000042
2011-09-14 16:19:45 +10:00
Joel Sing
c7f6f9f318 runtime: fix openbsd 386 raisesigpipe
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4950064
2011-09-05 13:05:57 -04:00
Christopher Wedgwood
6cf61bb5b9 runtime: add test for multiple concurrent channel consumers
There was a time (in the past) when this wasn't robust.

R=rsc, dvyukov
CC=golang-dev
https://golang.org/cl/4965058
2011-09-05 07:40:50 -04:00
Hector Chu
9b011500c0 runtime: implement exception handling on windows/amd64
Fixes #2194.

R=rsc, alex.brainman, vcc.163, jp
CC=golang-dev
https://golang.org/cl/4977044
2011-09-03 18:27:16 +10:00
Russ Cox
5f40c5b384 runtime: handle string + char literals in goc2c
My string literal was being rewritten from
"runtime.SysReserve(%p, %D) = error %d"
to
"runtime.SysReserve ( %p , %D ) = error %d"

R=iant
CC=golang-dev
https://golang.org/cl/4972051
2011-08-31 07:11:31 -04:00
Russ Cox
4304de6e0c runtime: make arm work on Ubuntu Natty qemu
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4963050
2011-08-31 07:02:46 -04:00
Gustavo Niemeyer
0cfa0fe242 cgo: note that CString result must be freed
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/4968054
2011-08-31 06:44:55 -03:00
Gustavo Niemeyer
e1cfb6f3a9 cgo: fix GoBytes
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4956051
2011-08-30 14:33:16 -03:00
Jaroslavas Počepko
c586b5b96b runtime: windows/amd64 callbacks fixed and syscall fixed to allow using it in callbacks
Fixes #2178.
Patch2: Fixed allocating shadow space for stdcall (must be at least 32 bytes in any case)
Patch3: Made allocated chunk smaller.
Patch4: Typo
Patch5: suppress linktime warning "runtime.callbackasm: nosplit stack overflow"
Patch6: added testcase src/pkg/syscall/callback_windows_test.go
Patch7: weakly related files moved to https://golang.org/cl/4965050 https://golang.org/cl/4974041 https://golang.org/cl/4965051
Patch8: reflect changes https://golang.org/cl/4926042/
Patch9: reflect comments

R=golang-dev, alex.brainman, vcc.163
CC=golang-dev, hectorchu
https://golang.org/cl/4958042
2011-08-30 22:02:02 +10:00
Jaroslavas Počepko
ae891b5528 windows/386: clean stack after syscall (it is necessary after call cdecl functions and does not have an effect after stdcall)
Result of discussion here: http://groups.google.com/group/golang-nuts/browse_thread/thread/357c806cbb57ca62

R=golang-dev, bradfitz, alex.brainman, hectorchu, rsc
CC=golang-dev
https://golang.org/cl/4961045
2011-08-30 14:43:54 +10:00
Joel Sing
1075af0cce runtime: add openbsd 386 defs.h
Missed in previous change (4951043).

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4967044
2011-08-29 11:07:19 -04:00
Russ Cox
3693cd2988 runtime: add runtime· prefix to showframe
R=ken2
CC=golang-dev
https://golang.org/cl/4978042
2011-08-29 10:55:21 -04:00
Joel Sing
9ef17990c2 runtime: add runtime support for openbsd 386
Add openbsd 386 runtime support, partially based on the existing
freebsd 386 runtime.

This requires change 4973043.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4951043
2011-08-29 10:42:16 -04:00
Yuval Pavel Zholkover
c20a338c2f runtime, syscall: use the vdso page on linux x86 for faster syscalls instead of int $0x80.
8l: fix handling CALL $(constant) code generated by 8a.
8a,8l: add indirect call instruction: CALL *data(SB).

R=rsc, iant
CC=golang-dev
https://golang.org/cl/4817054
2011-08-29 10:36:06 -04:00
Joel Sing
8aa2591b13 runtime: openbsd thread tweaks
- Rename sys_sched_yield() to osyield() as this is now defined in asm.h.
- Only print kern.rtheads message if rfork_thread() failed with ENOTSUP.
- Remove unused variables.

R=rsc
CC=golang-dev
https://golang.org/cl/4973043
2011-08-29 09:35:13 -04:00
Hector Chu
0f5902d6be runtime: fix stack cleanup on windows/amd64
In amd64 it is the caller who cleans the stack.

R=alex.brainman, vcc.163, jp
CC=golang-dev
https://golang.org/cl/4966046
2011-08-29 22:12:56 +10:00
Jaroslavas Počepko
f627215bab runtime: go interface to cdecl calbacks
cdecl calbacks have been implemented in C/ASM code, just Go function is missing

R=golang-dev, alex.brainman
CC=golang-dev
https://golang.org/cl/4969047
2011-08-29 10:40:28 +10:00
Alex Brainman
2a80882601 runtime: use cgo runtime functions to call windows syscalls
R=rsc
CC=golang-dev, jp, vcc.163
https://golang.org/cl/4926042
2011-08-27 23:17:00 +10:00
Wei Guangjing
e753512e2d cgo: fixes callback for windows amd64
R=rsc
CC=golang-dev
https://golang.org/cl/4826041
2011-08-26 16:43:37 -04:00
Russ Cox
33e9d24ad9 runtime: fix void warnings
Add -V flag to 6c command line to keep them fixed.

R=ken2
CC=golang-dev
https://golang.org/cl/4930046
2011-08-23 13:13:27 -04:00
Russ Cox
03e9ea5b74 runtime: simplify stack traces
Make the stack traces more readable for new
Go programmers while preserving their utility for old hands.

- Change status number [4] to string.
- Elide frames in runtime package (internal details).
- Swap file:line and arguments.
- Drop 'created by' for main goroutine.
- Show goroutines in order of allocation:
  implies main goroutine first if nothing else.

There is no option to get the extra frames back.
Uncomment 'return 1' at the bottom of symtab.c.

$ 6.out
throw: all goroutines are asleep - deadlock!

goroutine 1 [chan send]:
main.main()
       /Users/rsc/g/go/src/pkg/runtime/x.go:22 +0x8a

goroutine 2 [select (no cases)]:
main.sel()
       /Users/rsc/g/go/src/pkg/runtime/x.go:11 +0x18
created by main.main
       /Users/rsc/g/go/src/pkg/runtime/x.go:19 +0x23

goroutine 3 [chan receive]:
main.recv(0xf8400010a0, 0x0)
       /Users/rsc/g/go/src/pkg/runtime/x.go:15 +0x2e
created by main.main
       /Users/rsc/g/go/src/pkg/runtime/x.go:20 +0x50

goroutine 4 [chan receive (nil chan)]:
main.recv(0x0, 0x0)
       /Users/rsc/g/go/src/pkg/runtime/x.go:15 +0x2e
created by main.main
       /Users/rsc/g/go/src/pkg/runtime/x.go:21 +0x66
$

$ 6.out index
panic: runtime error: index out of range

goroutine 1 [running]:
main.main()
        /Users/rsc/g/go/src/pkg/runtime/x.go:25 +0xb9
$

$ 6.out nil
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x22ca]

goroutine 1 [running]:
main.main()
        /Users/rsc/g/go/src/pkg/runtime/x.go:28 +0x211
$

$ 6.out panic
panic: panic

goroutine 1 [running]:
main.main()
        /Users/rsc/g/go/src/pkg/runtime/x.go:30 +0x101
$

R=golang-dev, qyzhai, n13m3y3r, r
CC=golang-dev
https://golang.org/cl/4907048
2011-08-22 23:26:39 -04:00
Ian Lance Taylor
7bbe2c8998 runtime: Remove extraneous word in comment.
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/4938045
2011-08-22 12:40:45 -07:00
Wei Guangjing
acfb0a1584 runtime: ctrlhandler for windows amd64
R=rsc
CC=golang-dev
https://golang.org/cl/4825047
2011-08-18 12:37:42 -04:00
Alex Brainman
72e83483a7 runtime: speed up cgo calls
Allocate Defer on stack during cgo calls, as suggested
by dvyukov. Also includes some comment corrections.

benchmark                   old,ns/op   new,ns/op
BenchmarkCgoCall                  669         330
(Intel Xeon CPU 1.80GHz * 4, Linux 386)

R=dvyukov, rsc
CC=golang-dev
https://golang.org/cl/4910041
2011-08-18 12:17:09 -04:00
Russ Cox
3770b0e60c gc: implement nil chan support
The spec has defined nil chans this way for months.
I'm behind.

R=ken2
CC=golang-dev
https://golang.org/cl/4897050
2011-08-17 15:54:17 -04:00
Russ Cox
65bde087ae gc: implement nil map support
The spec has defined nil maps this way for months.
I'm behind.

R=ken2
CC=golang-dev
https://golang.org/cl/4901052
2011-08-17 14:56:27 -04:00
Dmitriy Vyukov
a2677cf363 runtime: fix GC bitmap corruption
The corruption can occur when GOMAXPROCS
is changed from >1 to 1, since GOMAXPROCS=1
does not imply there is only 1 goroutine running,
other goroutines can still be not parked after
the change.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4873050
2011-08-16 16:53:02 -04:00
Gustavo Niemeyer
175849295c runtime: fix pseudo-randomness on some selects
Fixes #2152.

R=golang-dev, dvyukov
CC=golang-dev
https://golang.org/cl/4888044
2011-08-15 03:51:51 -03:00
Alex Brainman
c8ee9c60d2 runtime: better checks for syscall.NewCallback parameter
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4859042
2011-08-11 12:23:55 +10:00
Russ Cox
c02423902d build: allow builds without cgo
R=bradfitz, dsymonds, fshahriar
CC=golang-dev
https://golang.org/cl/4859043
2011-08-10 21:36:48 -04:00
Alex Brainman
9c774c3f26 runtime: correct seh installation during callbacks
Every time we enter callback from Windows, it is
possible that go exception handler is not at the top
of per-thread exception handlers chain. So it needs
to be installed again. At this moment this is done
by replacing top SEH frame with SEH frame as at time
of syscall for the time of callback. This is incorrect,
because, if exception strike, we won't be able to call
any exception handlers installed inside syscall,
because they are not in the chain. This changes
procedure to add new SEH frame on top of existing
chain instead.

I also removed m sehframe field, because I don't
think it is needed. We use single global exception
handler everywhere.

R=golang-dev, r
CC=golang-dev, hectorchu
https://golang.org/cl/4832060
2011-08-10 17:17:28 +10:00
Joel Sing
21ac258e07 runtime: openbsd amd64 runtime support
Add support for the go runtime on openbsd/amd64. This is based on
the existing freebsd runtime.

Threads are implemented using OpenBSD's rthreads, which are currently
disabled by default, however can be enabled via the kern.rthreads
sysctl.

For now, cgo is disabled.

R=rsc
CC=golang-dev
https://golang.org/cl/4815067
2011-08-08 09:56:38 -04:00
Dmitriy Vyukov
54e9406ffb runtime: add more specialized type algorithms
The change adds specialized type algorithms
for slices and types of size 8/16/32/64/128.
It significantly accelerates chan and map operations
for most builtin types as well as user structs.

benchmark                   old,ns/op   new,ns/op
BenchmarkChanUncontended          226          94
(on Intel Xeon E5620, 2.4GHz, Linux 64 bit)

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4815087
2011-08-08 09:35:32 -04:00
Dmitriy Vyukov
d770aadee5 runtime: faster chan creation on Linux/FreeBSD/Plan9
The change removes chan finalizer (Lock destructor)
if it is not required on the platform.

benchmark                    old ns/op    new ns/op    delta
BenchmarkChanCreation          1132.00       381.00  -66.34%
BenchmarkChanCreation-2        1215.00       243.00  -80.00%
BenchmarkChanCreation-4        1084.00       186.00  -82.84%
BenchmarkChanCreation-8        1415.00       154.00  -89.12%
BenchmarkChanCreation-16       1386.00       144.00  -89.61%
(on 2 x Intel Xeon E5620, 8 HT cores, 2.4 GHz, Linux)

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4841041
2011-08-04 08:31:03 -04:00
Hector Chu
6500065543 runtime: remove unnecessary locking
R=rsc, dvyukov
CC=golang-dev
https://golang.org/cl/4819051
2011-08-04 00:22:39 -04:00
Dmitriy Vyukov
a496c9eaa6 runtime: correct Note documentation
Reflect the fact that notesleep() can be called
by exactly one thread.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4816064
2011-08-03 15:51:55 -04:00
Hector Chu
9bc58accce runtime: fix scheduling race
Affects programs using cgo or runtime.LockOSThread.

Fixes #2100.

R=rsc, dvyukov
CC=golang-dev
https://golang.org/cl/4810059
2011-07-29 17:39:02 -04:00
Dmitriy Vyukov
91f0f18100 runtime: fix data race in findfunc()
The data race can lead to reads of partially
initialized concurrently mutated symbol data.
The change also adds a simple sanity test
for Caller() and FuncForPC().

R=rsc
CC=golang-dev
https://golang.org/cl/4817058
2011-07-29 13:47:24 -04:00
Dmitriy Vyukov
4e5086b993 runtime: improve Linux mutex
The implementation is hybrid active/passive spin/blocking mutex.
The design minimizes amount of context switches and futex calls.
The idea is that all critical sections in runtime are intentially
small, so pure blocking mutex behaves badly causing
a lot of context switches, thread parking/unparking and kernel calls.
Note that some synthetic benchmarks become somewhat slower,
that's due to increased contention on other data structures,
it should not affect programs that do any real work.

On 2 x Intel E5620, 8 HT cores, 2.4GHz
benchmark                     old ns/op    new ns/op    delta
BenchmarkSelectContended         521.00       503.00   -3.45%
BenchmarkSelectContended-2       661.00       320.00  -51.59%
BenchmarkSelectContended-4      1139.00       629.00  -44.78%
BenchmarkSelectContended-8      2870.00       878.00  -69.41%
BenchmarkSelectContended-16     5276.00       818.00  -84.50%
BenchmarkChanContended           112.00       103.00   -8.04%
BenchmarkChanContended-2         631.00       174.00  -72.42%
BenchmarkChanContended-4         682.00       272.00  -60.12%
BenchmarkChanContended-8        1601.00       520.00  -67.52%
BenchmarkChanContended-16       3100.00       372.00  -88.00%
BenchmarkChanSync                253.00       239.00   -5.53%
BenchmarkChanSync-2             5030.00      4648.00   -7.59%
BenchmarkChanSync-4             4826.00      4694.00   -2.74%
BenchmarkChanSync-8             4778.00      4713.00   -1.36%
BenchmarkChanSync-16            5289.00      4710.00  -10.95%
BenchmarkChanProdCons0           273.00       254.00   -6.96%
BenchmarkChanProdCons0-2         599.00       400.00  -33.22%
BenchmarkChanProdCons0-4        1168.00       659.00  -43.58%
BenchmarkChanProdCons0-8        2831.00      1057.00  -62.66%
BenchmarkChanProdCons0-16       4197.00      1037.00  -75.29%
BenchmarkChanProdCons10          150.00       140.00   -6.67%
BenchmarkChanProdCons10-2        607.00       268.00  -55.85%
BenchmarkChanProdCons10-4       1137.00       404.00  -64.47%
BenchmarkChanProdCons10-8       2115.00       828.00  -60.85%
BenchmarkChanProdCons10-16      4283.00       855.00  -80.04%
BenchmarkChanProdCons100         117.00       110.00   -5.98%
BenchmarkChanProdCons100-2       558.00       218.00  -60.93%
BenchmarkChanProdCons100-4       722.00       287.00  -60.25%
BenchmarkChanProdCons100-8      1840.00       431.00  -76.58%
BenchmarkChanProdCons100-16     3394.00       448.00  -86.80%
BenchmarkChanProdConsWork0      2014.00      1996.00   -0.89%
BenchmarkChanProdConsWork0-2    1207.00      1127.00   -6.63%
BenchmarkChanProdConsWork0-4    1913.00       611.00  -68.06%
BenchmarkChanProdConsWork0-8    3016.00       949.00  -68.53%
BenchmarkChanProdConsWork0-16   4320.00      1154.00  -73.29%
BenchmarkChanProdConsWork10     1906.00      1897.00   -0.47%
BenchmarkChanProdConsWork10-2   1123.00      1033.00   -8.01%
BenchmarkChanProdConsWork10-4   1076.00       571.00  -46.93%
BenchmarkChanProdConsWork10-8   2748.00      1096.00  -60.12%
BenchmarkChanProdConsWork10-16  4600.00      1105.00  -75.98%
BenchmarkChanProdConsWork100    1884.00      1852.00   -1.70%
BenchmarkChanProdConsWork100-2  1235.00      1146.00   -7.21%
BenchmarkChanProdConsWork100-4  1217.00       619.00  -49.14%
BenchmarkChanProdConsWork100-8  1534.00       509.00  -66.82%
BenchmarkChanProdConsWork100-16 4126.00       918.00  -77.75%
BenchmarkSyscall                  34.40        33.30   -3.20%
BenchmarkSyscall-2               160.00       121.00  -24.38%
BenchmarkSyscall-4               131.00       136.00   +3.82%
BenchmarkSyscall-8               139.00       131.00   -5.76%
BenchmarkSyscall-16              161.00       168.00   +4.35%
BenchmarkSyscallWork             950.00       950.00   +0.00%
BenchmarkSyscallWork-2           481.00       480.00   -0.21%
BenchmarkSyscallWork-4           268.00       270.00   +0.75%
BenchmarkSyscallWork-8           156.00       169.00   +8.33%
BenchmarkSyscallWork-16          188.00       184.00   -2.13%
BenchmarkSemaSyntNonblock         36.40        35.60   -2.20%
BenchmarkSemaSyntNonblock-2       81.40        45.10  -44.59%
BenchmarkSemaSyntNonblock-4      126.00       108.00  -14.29%
BenchmarkSemaSyntNonblock-8      112.00       112.00   +0.00%
BenchmarkSemaSyntNonblock-16     110.00       112.00   +1.82%
BenchmarkSemaSyntBlock            35.30        35.30   +0.00%
BenchmarkSemaSyntBlock-2         118.00       124.00   +5.08%
BenchmarkSemaSyntBlock-4         105.00       108.00   +2.86%
BenchmarkSemaSyntBlock-8         101.00       111.00   +9.90%
BenchmarkSemaSyntBlock-16        112.00       118.00   +5.36%
BenchmarkSemaWorkNonblock        810.00       811.00   +0.12%
BenchmarkSemaWorkNonblock-2      476.00       414.00  -13.03%
BenchmarkSemaWorkNonblock-4      238.00       228.00   -4.20%
BenchmarkSemaWorkNonblock-8      140.00       126.00  -10.00%
BenchmarkSemaWorkNonblock-16     117.00       116.00   -0.85%
BenchmarkSemaWorkBlock           810.00       811.00   +0.12%
BenchmarkSemaWorkBlock-2         454.00       466.00   +2.64%
BenchmarkSemaWorkBlock-4         243.00       241.00   -0.82%
BenchmarkSemaWorkBlock-8         145.00       137.00   -5.52%
BenchmarkSemaWorkBlock-16        132.00       123.00   -6.82%
BenchmarkContendedSemaphore      123.00       102.00  -17.07%
BenchmarkContendedSemaphore-2     34.80        34.90   +0.29%
BenchmarkContendedSemaphore-4     34.70        34.80   +0.29%
BenchmarkContendedSemaphore-8     34.70        34.70   +0.00%
BenchmarkContendedSemaphore-16    34.80        34.70   -0.29%
BenchmarkMutex                    26.80        26.00   -2.99%
BenchmarkMutex-2                 108.00        45.20  -58.15%
BenchmarkMutex-4                 103.00       127.00  +23.30%
BenchmarkMutex-8                 109.00       147.00  +34.86%
BenchmarkMutex-16                102.00       152.00  +49.02%
BenchmarkMutexSlack               27.00        26.90   -0.37%
BenchmarkMutexSlack-2            149.00       165.00  +10.74%
BenchmarkMutexSlack-4            121.00       209.00  +72.73%
BenchmarkMutexSlack-8            101.00       158.00  +56.44%
BenchmarkMutexSlack-16            97.00       129.00  +32.99%
BenchmarkMutexWork               792.00       794.00   +0.25%
BenchmarkMutexWork-2             407.00       409.00   +0.49%
BenchmarkMutexWork-4             220.00       209.00   -5.00%
BenchmarkMutexWork-8             267.00       160.00  -40.07%
BenchmarkMutexWork-16            315.00       300.00   -4.76%
BenchmarkMutexWorkSlack          792.00       793.00   +0.13%
BenchmarkMutexWorkSlack-2        406.00       404.00   -0.49%
BenchmarkMutexWorkSlack-4        225.00       212.00   -5.78%
BenchmarkMutexWorkSlack-8        268.00       136.00  -49.25%
BenchmarkMutexWorkSlack-16       300.00       300.00   +0.00%
BenchmarkRWMutexWrite100          27.10        27.00   -0.37%
BenchmarkRWMutexWrite100-2        33.10        40.80  +23.26%
BenchmarkRWMutexWrite100-4       113.00        88.10  -22.04%
BenchmarkRWMutexWrite100-8       119.00        95.30  -19.92%
BenchmarkRWMutexWrite100-16      148.00       109.00  -26.35%
BenchmarkRWMutexWrite10           29.60        29.40   -0.68%
BenchmarkRWMutexWrite10-2        111.00        61.40  -44.68%
BenchmarkRWMutexWrite10-4        270.00       208.00  -22.96%
BenchmarkRWMutexWrite10-8        204.00       185.00   -9.31%
BenchmarkRWMutexWrite10-16       261.00       190.00  -27.20%
BenchmarkRWMutexWorkWrite100    1040.00      1036.00   -0.38%
BenchmarkRWMutexWorkWrite100-2   593.00       580.00   -2.19%
BenchmarkRWMutexWorkWrite100-4   470.00       365.00  -22.34%
BenchmarkRWMutexWorkWrite100-8   468.00       289.00  -38.25%
BenchmarkRWMutexWorkWrite100-16  604.00       374.00  -38.08%
BenchmarkRWMutexWorkWrite10      951.00       951.00   +0.00%
BenchmarkRWMutexWorkWrite10-2   1001.00       928.00   -7.29%
BenchmarkRWMutexWorkWrite10-4   1555.00      1006.00  -35.31%
BenchmarkRWMutexWorkWrite10-8   2085.00      1171.00  -43.84%
BenchmarkRWMutexWorkWrite10-16  2082.00      1614.00  -22.48%

R=rsc, iant, msolo, fw, iant
CC=golang-dev
https://golang.org/cl/4711045
2011-07-29 12:44:06 -04:00
Russ Cox
bed7e3ed78 gc: fix pprof deadlock
Fixes #2051.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4834041
2011-07-28 21:03:40 -04:00
Russ Cox
db9229def8 cgo: add GoBytes, fix gmp example
Fixes #1640.
Fixes #2007.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4815063
2011-07-28 12:39:50 -04:00
Russ Cox
1bd4b6371a gc: use more Go-like names for methods
Fixes #991.

R=ken2
CC=golang-dev
https://golang.org/cl/4819049
2011-07-27 17:56:13 -04:00
Russ Cox
a84abbe508 gc: zero-width struct, zero-length array fixes
Fixes #1774.
Fixes #2095.
Fixes #2097.

R=ken2
CC=golang-dev
https://golang.org/cl/4826046
2011-07-27 16:47:45 -04:00
Russ Cox
100a034120 runtime: higher goroutine arg limit, clearer error
Fixes #591.

R=ken2
CC=golang-dev
https://golang.org/cl/4803054
2011-07-27 12:41:46 -04:00
Russ Cox
12a5774cde gc, runtime: fix range+panic line number bugs
Fixes #1856.

R=ken2
CC=golang-dev
https://golang.org/cl/4810054
2011-07-26 00:52:46 -04:00
Mikio Hara
e5437ab065 runtime: fix freebsd build
Fixes #2078.

R=rsc
CC=golang-dev
https://golang.org/cl/4800052
2011-07-26 00:49:32 -04:00
Yuval Pavel Zholkover
2aa2ceb873 runtime: Plan 9, skip calling runtime·ldt0setup.
R=golang-dev
CC=alex.brainman, golang-dev
https://golang.org/cl/4816049
2011-07-25 12:25:41 -04:00
Dmitriy Vyukov
33ff947cac runtime: fix compilation of send select cases
Fixes #2102.

R=fullung, rsc
CC=golang-dev
https://golang.org/cl/4825043
2011-07-25 12:25:37 -04:00
Ian Lance Taylor
3a07d516b4 runtime: remove rnd calls that pass a second argument of 1
When rnd is called with a second argument of 1, it simply
returns the first argument anyway.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4820045
2011-07-24 22:03:17 -07:00
Quan Yong Zhai
47410a2490 runtime: replace byte-at-a-time zeroing loop with memclr
R=golang-dev, r, r, dsymonds, rsc
CC=golang-dev
https://golang.org/cl/4813043
2011-07-23 15:46:58 -04:00
Russ Cox
ba134539c5 runtime: faster entersyscall/exitsyscall
Replace cas with xadd in scheduler.
Suggested by Dmitriy in last code review.
Verified with Promela model.

When there's actual contention for the atomic word,
this avoids the looping that compare-and-swap requires.

benchmark                            old ns/op    new ns/op    delta
runtime_test.BenchmarkSyscall               32           26  -17.08%
runtime_test.BenchmarkSyscall-2            155           59  -61.81%
runtime_test.BenchmarkSyscall-3            112           52  -52.95%
runtime_test.BenchmarkSyscall-4             94           48  -48.57%
runtime_test.BenchmarkSyscallWork          871          872   +0.11%
runtime_test.BenchmarkSyscallWork-2        481          477   -0.83%
runtime_test.BenchmarkSyscallWork-3        338          335   -0.89%
runtime_test.BenchmarkSyscallWork-4        263          256   -2.66%

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/4800047
2011-07-23 12:22:55 -04:00
Russ Cox
226fb099d9 runtime: add UpdateMemStats, use in tests
Drops mallocrep1.go back to a reasonable
amount of time.  (154 -> 0.8 seconds on my Mac)

Fixes #2085.

R=golang-dev, dvyukov, r
CC=golang-dev
https://golang.org/cl/4811045
2011-07-22 00:55:01 -04:00
Russ Cox
22853098a9 gc: select functions are no longer special
R=ken2
CC=golang-dev
https://golang.org/cl/4794049
2011-07-21 14:10:39 -04:00
Dmitriy Vyukov
6b2ec06587 runtime: faster select
Make selectsend() accept pointer to the element,
it makes it possible to make Scase fixed-size
and allocate/free Select, all Scase's and all SudoG at once.
As a consequence SudoG freelist die out.

benchmark                       old,ns/op  new,ns/op
BenchmarkSelectUncontended	     1080        558
BenchmarkSelectUncontended-2	      675        264
BenchmarkSelectUncontended-4	      459        205
BenchmarkSelectContended	     1086        560
BenchmarkSelectContended-2	     1775       1672
BenchmarkSelectContended-4	     2668       2149
(on Intel Q6600, 4 cores, 2.4GHz)

benchmark                       old ns/op    new ns/op    delta
BenchmarkSelectUncontended         517.00       326.00  -36.94%
BenchmarkSelectUncontended-2       281.00       166.00  -40.93%
BenchmarkSelectUncontended-4       250.00        83.10  -66.76%
BenchmarkSelectUncontended-8       107.00        47.40  -55.70%
BenchmarkSelectUncontended-16       67.80        41.30  -39.09%
BenchmarkSelectContended           513.00       325.00  -36.65%
BenchmarkSelectContended-2         699.00       628.00  -10.16%
BenchmarkSelectContended-4        1085.00      1092.00   +0.65%
BenchmarkSelectContended-8        3253.00      2477.00  -23.85%
BenchmarkSelectContended-16       5313.00      5116.00   -3.71%
(on Intel E5620, 8 HT cores, 2.4 GHz)

R=rsc, ken
CC=golang-dev
https://golang.org/cl/4811041
2011-07-21 13:57:13 -04:00
Dmitriy Vyukov
d6ed1b70ad runtime: replace centralized ncgocall counter with a distributed one
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4809042
2011-07-21 11:29:08 -04:00
Dmitriy Vyukov
102b5b34a7 runtime: apply minor tweaks to channels
Remove complicated PRNG algorithm
(argument is limited by uint16 and can't be <= 1).
Do not require chansend/chanrecv selgen to be bumped with CAS.

R=rsc, ken
CC=golang-dev
https://golang.org/cl/4816041
2011-07-20 14:28:55 -04:00
Dmitriy Vyukov
90f3cb13fb runtime: improve performance of sync channels
1. SudoG always contains a pointer to the element
(thus no variable size, and less copying).
2. chansend/chanrecv allocate SudoG on the stack.
3. Copying of elements and gorotuine notifications
are moved out of critical sections.

benchmark                        old ns/op    new ns/op    delta
BenchmarkSelectUncontended          515.00       514.00   -0.19%
BenchmarkSelectUncontended-2        291.00       281.00   -3.44%
BenchmarkSelectUncontended-4        213.00       189.00  -11.27%
BenchmarkSelectUncontended-8         78.30        79.00   +0.89%
BenchmarkSelectContended            518.00       514.00   -0.77%
BenchmarkSelectContended-2          655.00       631.00   -3.66%
BenchmarkSelectContended-4         1026.00      1051.00   +2.44%
BenchmarkSelectContended-8         2026.00      2128.00   +5.03%
BenchmarkSelectNonblock             175.00       173.00   -1.14%
BenchmarkSelectNonblock-2            85.10        87.70   +3.06%
BenchmarkSelectNonblock-4            60.10        43.30  -27.95%
BenchmarkSelectNonblock-8            37.60        25.50  -32.18%
BenchmarkChanUncontended            109.00       114.00   +4.59%
BenchmarkChanUncontended-2           54.60        57.20   +4.76%
BenchmarkChanUncontended-4           27.40        28.70   +4.74%
BenchmarkChanUncontended-8           14.60        15.10   +3.42%
BenchmarkChanContended              108.00       114.00   +5.56%
BenchmarkChanContended-2            621.00       617.00   -0.64%
BenchmarkChanContended-4            759.00       677.00  -10.80%
BenchmarkChanContended-8           1635.00      1517.00   -7.22%
BenchmarkChanSync                   299.00       256.00  -14.38%
BenchmarkChanSync-2                5055.00      4624.00   -8.53%
BenchmarkChanSync-4                4998.00      4680.00   -6.36%
BenchmarkChanSync-8                5019.00      4760.00   -5.16%
BenchmarkChanProdCons0              316.00       274.00  -13.29%
BenchmarkChanProdCons0-2           1280.00       617.00  -51.80%
BenchmarkChanProdCons0-4           2433.00      1332.00  -45.25%
BenchmarkChanProdCons0-8           3651.00      1934.00  -47.03%
BenchmarkChanProdCons10             153.00       152.00   -0.65%
BenchmarkChanProdCons10-2           626.00       581.00   -7.19%
BenchmarkChanProdCons10-4          1440.00      1323.00   -8.12%
BenchmarkChanProdCons10-8          2036.00      2017.00   -0.93%

R=rsc, ken
CC=golang-dev
https://golang.org/cl/4790042
2011-07-20 11:51:25 -04:00
Lucio De Re
b546f50716 runtime: make goc2c build on Plan 9
pkg/runtime/Makefile:
. Adjusted so "goc2c.c" is built using the Plan 9 libraries.

pkg/runtime/goc2c.c:
. Added/subtracted #include headers to correspond to Plan 9
  toolkit.
. Changed fprintf(stderr,...)/exit() combinations to
  sysfatal() calls, adjusted the "%u" format to "%ud".
. Added exits(0) at the end of main().
. Made main() a void-returning function and removed the
  "return 0" at the end of it.

Tested on UBUNTU and Plan 9 only.

R=r, rsc
CC=golang-dev
https://golang.org/cl/4626093
2011-07-19 11:04:33 -04:00
Russ Cox
025abd530e runtime: faster entersyscall, exitsyscall
Uses atomic memory accesses to avoid the need to acquire
and release schedlock on fast paths.

benchmark                            old ns/op    new ns/op    delta
runtime_test.BenchmarkSyscall               73           31  -56.63%
runtime_test.BenchmarkSyscall-2            538           74  -86.23%
runtime_test.BenchmarkSyscall-3            508          103  -79.72%
runtime_test.BenchmarkSyscall-4            721           97  -86.52%
runtime_test.BenchmarkSyscallWork          920          873   -5.11%
runtime_test.BenchmarkSyscallWork-2        516          481   -6.78%
runtime_test.BenchmarkSyscallWork-3        550          343  -37.64%
runtime_test.BenchmarkSyscallWork-4        632          263  -58.39%

(Intel Core i7 L640 2.13 GHz-based Lenovo X201s)

Reduced a less artificial server benchmark
from 11.5r 12.0u 8.0s to 8.3r 9.1u 1.0s.

R=dvyukov, r, bradfitz, r, iant, iant
CC=golang-dev
https://golang.org/cl/4723042
2011-07-19 11:01:17 -04:00
Wei Guangjing
9f636598ba cgo: windows amd64 port
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4725041
2011-07-19 10:47:33 -04:00
Hector Chu
47e6042f73 runtime: fix select pass 3
Fixes #2075

R=rsc, ken, r
CC=golang-dev
https://golang.org/cl/4748045
2011-07-18 16:15:01 -04:00
Russ Cox
bd77619142 runtime: track running goroutine count
Used to use mcpu+msyscall but that's
problematic for packing into a single
atomic word.  The running goroutine count
(where running == Go code or syscall)
can be maintained separately, always
manipulated under lock.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/4767041
2011-07-18 15:50:55 -04:00
Dmitriy Vyukov
27753ff108 runtime: add per-M caches for MemStats
Avoid touching centralized state during
memory manager operations.

R=mirtchovski
CC=golang-dev, rsc
https://golang.org/cl/4766042
2011-07-18 14:56:22 -04:00
Dmitriy Vyukov
66d5c9b1e9 runtime: add per-M caches for MemStats
Avoid touching centralized state during
memory manager opreations.

R=rsc
CC=golang-dev
https://golang.org/cl/4766042
2011-07-18 14:52:57 -04:00
Dmitriy Vyukov
c1f035ba4c runtime: fix data race in Plan9 sysalloc
Add mutex to protect brk limit.
Add mstats.sys update.

R=rsc
CC=golang-dev
https://golang.org/cl/4762045
2011-07-18 10:50:04 -04:00
Nigel Tao
95323c59ea runtime: fix panic for make(chan [0]byte).
I suspect that this was introduced by
http://code.google.com/p/go/source/detail?r=6e4ee32fffd1

R=r
CC=golang-dev
https://golang.org/cl/4764045
2011-07-18 15:54:11 +10:00
Dmitriy Vyukov
491aa1579d runtime: native xadd for 386/amd64
benchmark                          old ns/op    new ns/op    delta
BenchmarkSemaUncontended               37.40        34.10   -8.82%
BenchmarkSemaUncontended-2             18.90        17.70   -6.35%
BenchmarkSemaUncontended-4             11.90        10.90   -8.40%
BenchmarkSemaUncontended-8              6.26         5.19  -17.09%
BenchmarkSemaUncontended-16             4.39         3.91  -10.93%
BenchmarkSemaSyntNonblock              38.00        35.30   -7.11%
BenchmarkSemaSyntNonblock-2            83.00        46.70  -43.73%
BenchmarkSemaSyntNonblock-4           124.00       101.00  -18.55%
BenchmarkSemaSyntNonblock-8           124.00       116.00   -6.45%
BenchmarkSemaSyntNonblock-16          148.00       114.00  -22.97%

(on HP Z600 2 x Xeon E5620, 8 HT cores, 2.40GHz)

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4755041
2011-07-15 11:27:16 -04:00
Russ Cox
29125be5c7 runtime: make TestSideEffectOrder work twice
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4714045
2011-07-14 23:43:03 -04:00
Alex Brainman
dde435587d runtime: correct FixedStack value (fixes windows build)
Fixes #2068.

R=rsc
CC=golang-dev
https://golang.org/cl/4705046
2011-07-14 09:13:39 +10:00
Wei Guangjing
a6e60916c1 runtime: stdcall_raw stack 16byte align for Win64
R=alex.brainman, rsc
CC=golang-dev
https://golang.org/cl/4681049
2011-07-13 11:44:44 -07:00