Russ Cox
bf18d57d4a
runtime: handle and test large map values
...
This is from CL 5451105 but was dropped from that CL.
See also CL 6137051.
The only change compared to 5451105 is to check for
h != nil in reflect·mapiterinit; allowing use of nil maps
must have happened after that original CL.
Fixes #3573 .
R=golang-dev, dave, r
CC=golang-dev
https://golang.org/cl/6215078
2012-05-24 22:41:07 -04:00
Rob Pike
11c1b1f96b
runtime: fix docs for Caller and Callers
...
The previous attempt to explain this got it backwards (all the more reason to be
sad we couldn't make the two functions behave the same).
Fixes #3669 .
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6249051
2012-05-24 14:15:43 -07:00
Dmitriy Vyukov
b0702bd0db
runtime: faster GC mark phase
...
Also bump MaxGcproc to 8.
benchmark old ns/op new ns/op delta
Parser 3796323000 3763880000 -0.85%
Parser-2 3591752500 3518560250 -2.04%
Parser-4 3423825250 3334955250 -2.60%
Parser-8 3304585500 3267014750 -1.14%
Parser-16 3313615750 3286160500 -0.83%
Tree 984128500 942501166 -4.23%
Tree-2 932564444 883266222 -5.29%
Tree-4 835831000 799912777 -4.30%
Tree-8 819238500 789717333 -3.73%
Tree-16 880837833 837840055 -5.13%
Tree2 604698100 579716900 -4.13%
Tree2-2 372414500 356765200 -4.20%
Tree2-4 187488100 177455900 -5.56%
Tree2-8 136315300 102086700 -25.11%
Tree2-16 93725900 76705800 -22.18%
ParserPause 157441210 166202783 +5.56%
ParserPause-2 93842650 85199900 -9.21%
ParserPause-4 56844404 53535684 -5.82%
ParserPause-8 35739446 30767613 -16.15%
ParserPause-16 32718255 27212441 -16.83%
TreePause 29610557 29787725 +0.60%
TreePause-2 24001659 20674421 -13.86%
TreePause-4 15114887 12842781 -15.03%
TreePause-8 13128725 10741747 -22.22%
TreePause-16 16131360 12506901 -22.47%
Tree2Pause 2673350920 2651045280 -0.83%
Tree2Pause-2 1796999200 1709350040 -4.88%
Tree2Pause-4 1163553320 1090706480 -6.67%
Tree2Pause-8 987032520 858916360 -25.11%
Tree2Pause-16 864758560 809567480 -6.81%
ParserLastPause 280537000 289047000 +3.03%
ParserLastPause-2 183030000 166748000 -8.90%
ParserLastPause-4 105817000 91552000 -13.48%
ParserLastPause-8 65127000 53288000 -18.18%
ParserLastPause-16 45258000 38334000 -15.30%
TreeLastPause 45072000 51449000 +12.39%
TreeLastPause-2 39269000 37866000 -3.57%
TreeLastPause-4 23564000 20649000 -12.37%
TreeLastPause-8 20881000 15807000 -24.30%
TreeLastPause-16 23297000 17309000 -25.70%
Tree2LastPause 6046912000 5797120000 -4.13%
Tree2LastPause-2 3724034000 3567592000 -4.20%
Tree2LastPause-4 1874831000 1774524000 -5.65%
Tree2LastPause-8 1363108000 1020809000 -12.79%
Tree2LastPause-16 937208000 767019000 -22.18%
R=rsc, 0xe2.0x9a.0x9b
CC=golang-dev
https://golang.org/cl/6223050
2012-05-24 10:55:50 +04:00
Joel Sing
5a043de746
runtime: make go work on netbsd/amd64
...
R=golang-dev, rsc, devon.odell
CC=golang-dev
https://golang.org/cl/6222044
2012-05-24 11:33:11 +10:00
Shenghou Ma
fb3a1b6821
runtime: support conditional execution in ARM softfloat
...
Fixes #3638 .
R=golang-dev, dave, rsc
CC=golang-dev
https://golang.org/cl/6213057
2012-05-23 02:00:40 +08:00
Dmitriy Vyukov
845aa1fc2c
runtime: faster GC sweep phase
...
benchmark old ns/op new ns/op delta
garbage.BenchmarkParser 3731065750 3715543750 -0.41%
garbage.BenchmarkParser-2 3631299750 3495248500 -3.75%
garbage.BenchmarkParser-4 3386486000 3339353000 -1.39%
garbage.BenchmarkParser-8 3267632000 3286422500 +0.58%
garbage.BenchmarkParser-16 3299203000 3316081750 +0.51%
garbage.BenchmarkTree 977532888 919453833 -5.94%
garbage.BenchmarkTree-2 919948555 853478000 -7.23%
garbage.BenchmarkTree-4 841329000 790207000 -6.08%
garbage.BenchmarkTree-8 787792777 740380666 -6.01%
garbage.BenchmarkTree-16 899257166 846594555 -5.86%
garbage.BenchmarkTree2 574876300 571885800 -0.52%
garbage.BenchmarkTree2-2 348162700 345888900 -0.65%
garbage.BenchmarkTree2-4 184912500 179137000 -3.22%
garbage.BenchmarkTree2-8 104243900 103485600 -0.73%
garbage.BenchmarkTree2-16 97269500 85137100 -14.25%
garbage.BenchmarkParserPause 141101976 157746974 +11.80%
garbage.BenchmarkParserPause-2 103096051 83043048 -19.45%
garbage.BenchmarkParserPause-4 52153133 45951111 -11.89%
garbage.BenchmarkParserPause-8 36730190 38901024 +5.91%
garbage.BenchmarkParserPause-16 32678875 29578585 -9.49%
garbage.BenchmarkTreePause 29487065 29648439 +0.55%
garbage.BenchmarkTreePause-2 22443494 21306159 -5.07%
garbage.BenchmarkTreePause-4 15799691 14985647 -5.15%
garbage.BenchmarkTreePause-8 10768112 9531420 -12.97%
garbage.BenchmarkTreePause-16 16329891 15205158 -6.89%
garbage.BenchmarkTree2Pause 2586957240 2577533200 -0.36%
garbage.BenchmarkTree2Pause-2 1683383760 1673923800 -0.56%
garbage.BenchmarkTree2Pause-4 1102860320 1074040280 -2.68%
garbage.BenchmarkTree2Pause-8 902627920 886122400 -1.86%
garbage.BenchmarkTree2Pause-16 856470920 804152320 -6.50%
garbage.BenchmarkParserLastPause 277316000 280839000 +1.25%
garbage.BenchmarkParserLastPause-2 179446000 163687000 -8.78%
garbage.BenchmarkParserLastPause-4 106752000 94144000 -11.81%
garbage.BenchmarkParserLastPause-8 57758000 61640000 +6.72%
garbage.BenchmarkParserLastPause-16 51235000 42552000 -16.95%
garbage.BenchmarkTreeLastPause 45244000 50786000 +12.25%
garbage.BenchmarkTreeLastPause-2 37163000 34654000 -6.75%
garbage.BenchmarkTreeLastPause-4 24178000 21967000 -9.14%
garbage.BenchmarkTreeLastPause-8 20390000 15648000 -30.30%
garbage.BenchmarkTreeLastPause-16 22398000 20180000 -9.90%
garbage.BenchmarkTree2LastPause 5748706000 5718809000 -0.52%
garbage.BenchmarkTree2LastPause-2 3481570000 3458844000 -0.65%
garbage.BenchmarkTree2LastPause-4 1849073000 1791330000 -3.22%
garbage.BenchmarkTree2LastPause-8 1042375000 1034811000 -0.73%
garbage.BenchmarkTree2LastPause-16 972637000 851323000 -14.25%
There is also visible improvement in consumed CPU time:
tree2 -heapsize=8000000000 -cpus=12
before: 248.74user 6.36system 0:52.74elapsed 483%CPU
after: 229.86user 6.33system 0:51.08elapsed 462%CPU
-1.66s of real time, but -18.91s of consumed CPU time
R=golang-dev
CC=golang-dev
https://golang.org/cl/6215065
2012-05-22 13:35:52 -04:00
Russ Cox
85266dfd4d
runtime: relax TestGcSys
...
This fixes occasional 64-bit failures.
Maybe it will fix the 32-bit failures too,
so re-enable on 32-bit for now.
R=golang-dev, bradfitz, r, dvyukov
CC=golang-dev
https://golang.org/cl/6218050
2012-05-22 00:07:13 -04:00
Andrew Gerrand
283a3ddab8
runtime: disable gc test on non-amd64 systems
...
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6210062
2012-05-17 11:34:28 +10:00
Akshat Kumar
f5752848fd
pkg/runtime: Fix semasleep on Plan 9
...
With the timed semacquire patch
(kernel-tsemacquire) for Plan 9,
we can now properly do a timed
wait for the semaphore, in
semasleep.
R=golang-dev, rsc, rminnich, ality, r
CC=0intro, golang-dev, john, mirtchovski
https://golang.org/cl/6197046
2012-05-16 15:09:28 -07:00
Joel Sing
efa67b2c55
runtime: implement getcontext and sigprocmask for netbsd
...
Implement getcontext and sigprocmask for NetBSD - these will soon be
used by the thread handling code.
Also fix netbsd/386 signal handling - there is no sigreturn, just
return so that we hit the trampoline.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6215049
2012-05-16 04:32:49 +10:00
Joel Sing
0b7bcb84e3
runtime: fix netbsd syscalls
...
Use correct system calls/syscall numbers for NetBSD.
R=golang-dev, for.go.yong, rsc
CC=golang-dev
https://golang.org/cl/6200070
2012-05-16 03:33:37 +10:00
Joel Sing
4a5a5b20a5
runtime: fix netbsd signal handling
...
Update/correct NetBSD signal handling - most of this is needed due to
the correctly generated runtime definitions.
R=golang-dev, m4dh4tt3r, rsc
CC=golang-dev
https://golang.org/cl/6195079
2012-05-16 01:53:26 +10:00
Joel Sing
8a9edcf790
runtime: fix netbsd runtime defs
...
Fix and regenerate runtime defs for NetBSD.
Whilst the mcontext struct can be handled across architectures,
the registers are provided as defines that index an array, rather
than as members of the struct. Since these are architecture
dependent, include them via a defs_netbsd_<arch>.go file.
R=golang-dev, m4dh4tt3r, rsc
CC=golang-dev
https://golang.org/cl/6190070
2012-05-16 01:52:20 +10:00
Jan Ziak
773685b4a3
runtime: fix counting of free objects
...
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6206056
2012-05-15 11:48:58 -04:00
Dmitriy Vyukov
01826280eb
runtime: refactor helpgc functionality in preparation for parallel GC
...
Parallel GC needs to know in advance how many helper threads will be there.
Hopefully it's the last patch before I can tackle parallel sweep phase.
The benchmarks are unaffected.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6200064
2012-05-15 19:10:16 +04:00
Joel Sing
b42ebb6fbf
runtime: fix TLS handling for netbsd
...
Set the TLS base using the _lwp_setprivate() syscall, instead of via
sysarch(). NetBSD tracks the pointer passed to _lwp_setprivate() and
restores this value when restoring mcontext. If sysarch() is used
directly, restoring an mcontext trashes the FS/GS value, resulting
in a segfault when we next try to access the TLS.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6206062
2012-05-15 11:26:05 +10:00
Dmitriy Vyukov
eb0bc8164a
runtime: revert MaxGcproc from 16 to 4
...
The change accidentally come in with this revision:
https://code.google.com/p/go/source/detail?spec=svn345cbca96c5550f2e89bc727703301933802923c&r=14c38c23c819a17021b1808cf4a34ef3a1a17db5
R=golang-dev
CC=golang-dev
https://golang.org/cl/6195073
2012-05-11 13:30:34 +04:00
Dmitriy Vyukov
95643647ae
runtime: add parallel for algorithm
...
This is factored out part of:
https://golang.org/cl/5279048/
(parallel GC)
R=bsiegert, mpimenov, rsc, minux.ma, r
CC=golang-dev
https://golang.org/cl/5986054
2012-05-11 10:50:03 +04:00
Shenghou Ma
aa45e52e74
runtime: fix complex division benchmarks
...
we can't add the division result to n during iteration, because it might
turn n into NaN or Inf.
R=golang-dev, rsc, iant, iant
CC=golang-dev
https://golang.org/cl/6197045
2012-05-11 03:09:14 +08:00
Joel Sing
5374ded1f3
runtime: fix syscalls for netbsd
...
Use correct syscall numbers and arguments for NetBSD.
Provide a trampoline for signal returns (using signal API 3).
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6209048
2012-05-11 03:48:43 +10:00
Joel Sing
38445ca089
runtime: fix netbsd sigaction struct
...
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6198063
2012-05-11 03:48:16 +10:00
Shenghou Ma
a642ca4930
runtime: get per-process random number from auxv for hash table
...
Decode AT_RANDOM, AT_HWCAP, and AT_PLATFORM.
This CL only make use of AT_RANDOM, but future CLs will make use of the others.
R=dave, rsc
CC=golang-dev
https://golang.org/cl/5978051
2012-05-05 01:59:14 +08:00
Shenghou Ma
a29304bfb8
runtime: fix c compiler warning
...
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6185047
2012-05-05 01:39:09 +08:00
Shenghou Ma
018bcc3535
runtime, misc/cgo/test: fix build for Linux/ARM
...
1. In CL 5989057, I made a mistake in the last minute change.
"MOVW.W R4, -4(SP)" should really be "MOVW.W R4, -4(R13)",
as 5l will rewrite offset for SP.
2. misc/cgo/test/issue1560.go tests for parallel sleep of 1s,
but on ARM, the deadline is frequently missed, so change sleep
time to 2s on ARM.
R=golang-dev, dave, rsc
CC=golang-dev
https://golang.org/cl/6202043
2012-05-05 01:35:13 +08:00
Akshat Kumar
ccdca2cd6b
pkg/runtime: Plan 9 signal handling in Go
...
This adds proper note handling for Plan 9,
and fixes the issue of properly killing go procs.
Without this change, the first go proc that dies
(using runtime·exit()) would kill all the running
go procs. Proper signal handling is needed.
R=golang-dev, ality, rminnich, rsc
CC=golang-dev, john, mirtchovski
https://golang.org/cl/5617048
2012-05-04 03:48:34 -07:00
Shenghou Ma
5cffce611a
runtime: cgo support for Linux/ARM
...
Part 2 of CL 5601044 (cgo: Linux/ARM support)
R=dave, rsc
CC=golang-dev
https://golang.org/cl/5989057
2012-05-04 18:20:09 +08:00
Russ Cox
d42495aa80
cmd/cc: add PREFETCH built-in (like SET, USED)
...
This makes it possible to inline the prefetch of upcoming
memory addresses during garbage collection, instead of
needing to flush registers, make a function call, and
reload registers. On garbage collection-heavy workloads,
this results in a 5% speedup.
Fixes #3493 .
R=dvyukov, ken, r, dave
CC=golang-dev
https://golang.org/cl/5990066
2012-05-02 16:22:56 -04:00
Dmitriy Vyukov
c1c851bbe8
runtime: avoid unnecessary zeroization of huge memory blocks
...
+move zeroization out of the heap mutex
R=golang-dev, iant, rsc
CC=golang-dev
https://golang.org/cl/6094050
2012-05-02 18:01:11 +04:00
Shenghou Ma
44fd1d1a6a
runtime: give proper messages when user defined DYLD_INSERT_LIBRARIES on Darwin
...
also gives clear error when bsdthread_register fails on Darwin
Fixes #2992 .
R=rsc, krautz
CC=golang-dev
https://golang.org/cl/5966067
2012-04-30 15:55:07 -04:00
Joel Sing
689d5b9163
runtime: use __tfork() syscall on openbsd
...
Switch from using the rfork() syscall on OpenBSD, to the __tfork()
syscall. The __tfork() syscall is the preferred way of creating
system threads and the rfork() syscall has recently been removed.
Note: this will break compatibility with OpenBSD releases prior to 5.1.
R=golang-dev, bradfitz, devon.odell, rsc
CC=golang-dev
https://golang.org/cl/6037048
2012-04-26 00:08:02 +10:00
Shenghou Ma
0f80050542
runtime: fix runtime.Breakpoint for ARM
...
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6100053
2012-04-24 23:19:44 +08:00
Michael Chaten
32c3a626da
runtime: add benchmark for complex128 division
...
R=golang-dev, dave, rsc
CC=golang-dev, minux.ma
https://golang.org/cl/6070043
2012-04-21 13:24:41 +10:00
Ian Lance Taylor
244706bd0f
runtime: disable memory profiler in gc_test
...
This lets the test pass on PPC64 GNU/Linux, which uses a much
larger page size and thus uses more memory to hold blocks
allocated for memory profiling.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6048054
2012-04-20 11:36:06 -07:00
Joel Sing
99fc281743
runtime: update defs for openbsd
...
Update runtime defs for openbsd. Add struct __tfork, which will be
needed by an upcoming change.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/6007050
2012-04-17 02:35:41 +10:00
Dmitriy Vyukov
4945fc8e40
runtime: speedup GC sweep phase (batch free)
...
benchmark old ns/op new ns/op delta
garbage.BenchmarkParser 4370050250 3779668750 -13.51%
garbage.BenchmarkParser-2 3713087000 3628771500 -2.27%
garbage.BenchmarkParser-4 3519755250 3406349750 -3.22%
garbage.BenchmarkParser-8 3386627750 3319144000 -1.99%
garbage.BenchmarkTree 493585529 408102411 -17.32%
garbage.BenchmarkTree-2 500487176 402285176 -19.62%
garbage.BenchmarkTree-4 473238882 361484058 -23.61%
garbage.BenchmarkTree-8 486977823 368334823 -24.36%
garbage.BenchmarkTree2 31446600 31203200 -0.77%
garbage.BenchmarkTree2-2 21469000 21077900 -1.82%
garbage.BenchmarkTree2-4 11007600 10899100 -0.99%
garbage.BenchmarkTree2-8 7692400 7032600 -8.58%
garbage.BenchmarkParserPause 241863263 163249450 -32.50%
garbage.BenchmarkParserPause-2 120135418 112981575 -5.95%
garbage.BenchmarkParserPause-4 83411552 64580700 -22.58%
garbage.BenchmarkParserPause-8 51870697 42207244 -18.63%
garbage.BenchmarkTreePause 20940474 13147011 -37.22%
garbage.BenchmarkTreePause-2 20115124 11146715 -44.59%
garbage.BenchmarkTreePause-4 17217584 7486327 -56.52%
garbage.BenchmarkTreePause-8 18258845 7400871 -59.47%
garbage.BenchmarkTree2Pause 174067190 172674190 -0.80%
garbage.BenchmarkTree2Pause-2 131175809 130615761 -0.43%
garbage.BenchmarkTree2Pause-4 95406666 93972047 -1.50%
garbage.BenchmarkTree2Pause-8 86056095 85334952 -0.84%
garbage.BenchmarkParserLastPause 329932000 324790000 -1.56%
garbage.BenchmarkParserLastPause-2 209383000 210456000 +0.51%
garbage.BenchmarkParserLastPause-4 113981000 112921000 -0.93%
garbage.BenchmarkParserLastPause-8 77967000 76625000 -1.72%
garbage.BenchmarkTreeLastPause 29752000 18444000 -38.01%
garbage.BenchmarkTreeLastPause-2 24274000 14766000 -39.17%
garbage.BenchmarkTreeLastPause-4 19565000 8726000 -55.40%
garbage.BenchmarkTreeLastPause-8 21956000 10530000 -52.04%
garbage.BenchmarkTree2LastPause 314411000 311945000 -0.78%
garbage.BenchmarkTree2LastPause-2 214641000 210836000 -1.77%
garbage.BenchmarkTree2LastPause-4 110024000 108943000 -0.98%
garbage.BenchmarkTree2LastPause-8 76873000 70263000 -8.60%
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5991049
2012-04-12 12:01:24 +04:00
Dmitriy Vyukov
a5dc7793c0
runtime: add lock-free stack
...
This is factored out part of the:
https://golang.org/cl/5279048/
(parallel GC)
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5993043
2012-04-12 11:49:25 +04:00
Dave Cheney
d8e9b04ca6
runtime: add interface microbenchmarks
...
2011 Mac Mini, Core i5 @ 2.3Ghz
BenchmarkConvT2E 50000000 40.4 ns/op
BenchmarkConvT2EBig 20000000 107 ns/op
BenchmarkConvT2I 100000000 28.9 ns/op
BenchmarkConvI2E 500000000 5.93 ns/op
BenchmarkConvI2I 100000000 19.0 ns/op
BenchmarkAssertE2T 100000000 14.1 ns/op
BenchmarkAssertE2TBig 100000000 17.8 ns/op
BenchmarkAssertE2I 100000000 21.3 ns/op
BenchmarkAssertI2T 100000000 14.3 ns/op
BenchmarkAssertI2I 100000000 20.8 ns/op
BenchmarkAssertI2E 500000000 5.58 ns/op
Pandaboard, 2 x Omap4 @ 1.2Ghz
BenchmarkConvT2E 10000000 215 ns/op
BenchmarkConvT2EBig 1000000 3697 ns/op
BenchmarkConvT2I 5000000 666 ns/op
BenchmarkConvI2E 50000000 42.4 ns/op
BenchmarkConvI2I 5000000 489 ns/op
BenchmarkAssertE2T 20000000 90.0 ns/op
BenchmarkAssertE2TBig 20000000 91.6 ns/op
BenchmarkAssertE2I 5000000 515 ns/op
BenchmarkAssertI2T 20000000 124 ns/op
BenchmarkAssertI2I 5000000 517 ns/op
BenchmarkAssertI2E 50000000 47.2 ns/op
BenchmarkAssertE2E 50000000 42.7 ns/op
R=minux.ma, rsc, fullung, bsiegert, dsymonds
CC=golang-dev
https://golang.org/cl/5777048
2012-04-11 22:45:44 +10:00
Joel Sing
8cea1bf102
runtime: update openbsd thread related syscalls to match kernel
...
Update the threxit and thrsleep syscalls to match the ABI of the
OpenBSD 5.1 kernel. These changes are backwards compatible with
older kernels.
Fixes #3311 .
R=golang-dev, rsc, devon.odell
CC=golang-dev
https://golang.org/cl/5777079
2012-04-11 22:02:08 +10:00
Shenghou Ma
1a59e6239c
5l, runtime: remove softfloat emulation code when not used
...
This leads to ~30kB improvement on code size for ARM machines with VFP/NEON.
Example: go test -c math
GOARM=5 GOARM=6
Old: 1884200 1839144
New: 1884165 1805245
-: 35 33899
R=rsc, bradfitz, dave, kai.backman
CC=golang-dev
https://golang.org/cl/5975060
2012-04-11 04:11:27 +08:00
Akshat Kumar
7056ec6bfd
runtime: fix floating point exception on Plan 9
...
Change 5660047 moved an FLDCW instruction
that disables invalid operand traps into
runtime·asminit, which is called from
runtime·mstart. Thus, runtime·check is being
called prior to setting the appropriate control bits,
which on any QNaN comparison will cause Plan 9
to take an invalid operand trap. This change loads
the control bits (for Plan 9) prior to runtime·check.
Ideally, this should be done before the QNaN checks
on any system, but possibly other kernels simply
don't ever trap on invalid operands.
R=golang-dev, rminnich
CC=golang-dev, john, rsc
https://golang.org/cl/5939045
2012-04-10 15:14:10 -04:00
Quan Yong Zhai
e133ee9538
runtime: unregister the SIGILL handler after ARM EABI test
...
Part of issue 3381
R=rsc, minux.ma, dave
CC=golang-dev
https://golang.org/cl/5969064
2012-04-10 15:05:22 -04:00
Russ Cox
3d462449f6
8a, 8l: add PREFETCH instructions
...
R=ken2
CC=golang-dev
https://golang.org/cl/5992082
2012-04-10 10:09:27 -04:00
Russ Cox
35d260fa4c
6a, 6l: add PREFETCH instructions
...
R=ken2
CC=golang-dev
https://golang.org/cl/5989073
2012-04-10 10:09:09 -04:00
Joel Sing
098b9dcf2f
runtime: block signals during thread creation on openbsd
...
Block signals during thread creation, otherwise the new thread can
receive a signal prior to initialisation completing.
Fixes #3102 .
R=golang-dev, rsc, devon.odell, minux.ma
CC=golang-dev
https://golang.org/cl/5757064
2012-04-10 21:57:05 +10:00
Rob Pike
6849c4db0c
runtime.Callers: make documentation match code
...
It is a bug that Caller and Callers disagree about the offset of the skip
parameter. Document the bug.
R=rsc, dsymonds, r, iant
CC=golang-dev
https://golang.org/cl/5976064
2012-04-10 09:47:57 +10:00
Dmitriy Vyukov
342658bbb6
runtime: preparation for parallel GC
...
make MHeap.allspans an array instead on a linked-list,
it's required for parallel for
benchmark old ns/op new ns/op delta
garbage.BenchmarkTree 494435529 487962705 -1.31%
garbage.BenchmarkTree-2 499652705 485358000 -2.86%
garbage.BenchmarkTree-4 468482117 454093117 -3.07%
garbage.BenchmarkTree-8 488533235 471872470 -3.41%
garbage.BenchmarkTree-16 507835176 492558470 -3.01%
garbage.BenchmarkTree2 31453900 31404300 -0.16%
garbage.BenchmarkTree2-2 21440600 21477000 +0.17%
garbage.BenchmarkTree2-4 10982000 11117400 +1.23%
garbage.BenchmarkTree2-8 7544700 7456700 -1.17%
garbage.BenchmarkTree2-16 7049500 6805700 -3.46%
garbage.BenchmarkParser 4448988000 4453264000 +0.10%
garbage.BenchmarkParser-2 4086045000 4057948000 -0.69%
garbage.BenchmarkParser-4 3677365000 3661246000 -0.44%
garbage.BenchmarkParser-8 3517253000 3540190000 +0.65%
garbage.BenchmarkParser-16 3506562000 3463478000 -1.23%
garbage.BenchmarkTreePause 20969784 21100238 +0.62%
garbage.BenchmarkTreePause-2 20215875 20139572 -0.38%
garbage.BenchmarkTreePause-4 17240709 16683624 -3.23%
garbage.BenchmarkTreePause-8 18196386 17639306 -3.06%
garbage.BenchmarkTreePause-16 20621158 20215056 -1.97%
garbage.BenchmarkTree2Pause 173992142 173872380 -0.07%
garbage.BenchmarkTree2Pause-2 131281904 131366666 +0.06%
garbage.BenchmarkTree2Pause-4 93484952 95109619 +1.74%
garbage.BenchmarkTree2Pause-8 88950523 86533333 -2.72%
garbage.BenchmarkTree2Pause-16 86071238 84089190 -2.30%
garbage.BenchmarkParserPause 135815000 135255952 -0.41%
garbage.BenchmarkParserPause-2 92691523 91451428 -1.34%
garbage.BenchmarkParserPause-4 53392190 51611904 -3.33%
garbage.BenchmarkParserPause-8 36059523 35116666 -2.61%
garbage.BenchmarkParserPause-16 30174300 27340600 -9.39%
garbage.BenchmarkTreeLastPause 28420000 29142000 +2.54%
garbage.BenchmarkTreeLastPause-2 23514000 26779000 +13.89%
garbage.BenchmarkTreeLastPause-4 21773000 18660000 -14.30%
garbage.BenchmarkTreeLastPause-8 24072000 21276000 -11.62%
garbage.BenchmarkTreeLastPause-16 25149000 28541000 +13.49%
garbage.BenchmarkTree2LastPause 314491000 313982000 -0.16%
garbage.BenchmarkTree2LastPause-2 214363000 214715000 +0.16%
garbage.BenchmarkTree2LastPause-4 109778000 111115000 +1.22%
garbage.BenchmarkTree2LastPause-8 75390000 74522000 -1.15%
garbage.BenchmarkTree2LastPause-16 70333000 67880000 -3.49%
garbage.BenchmarkParserLastPause 327247000 326815000 -0.13%
garbage.BenchmarkParserLastPause-2 217039000 212529000 -2.08%
garbage.BenchmarkParserLastPause-4 119722000 111535000 -6.84%
garbage.BenchmarkParserLastPause-8 70806000 69613000 -1.68%
garbage.BenchmarkParserLastPause-16 62813000 48009000 -23.57%
R=rsc, r
CC=golang-dev
https://golang.org/cl/5992055
2012-04-09 13:05:43 +04:00
Dmitriy Vyukov
f09e63a2a0
runtime: add memory prefetching to GC
...
benchmark old ns/op new ns/op delta
garbage.BenchmarkParser 4448988000 4370531000 -1.76%
garbage.BenchmarkParser-2 4086045000 4023083000 -1.54%
garbage.BenchmarkParser-4 3677365000 3667020000 -0.28%
garbage.BenchmarkParser-8 3517253000 3543946000 +0.76%
garbage.BenchmarkParser-16 3506562000 3512518000 +0.17%
garbage.BenchmarkTree 494435529 505784058 +2.30%
garbage.BenchmarkTree-2 499652705 502774823 +0.62%
garbage.BenchmarkTree-4 468482117 465713352 -0.59%
garbage.BenchmarkTree-8 488533235 482287000 -1.28%
garbage.BenchmarkTree-16 507835176 500654882 -1.41%
garbage.BenchmarkTree2 31453900 28804600 -8.42%
garbage.BenchmarkTree2-2 21440600 19065800 -11.08%
garbage.BenchmarkTree2-4 10982000 10009100 -8.86%
garbage.BenchmarkTree2-8 7544700 6479800 -14.11%
garbage.BenchmarkTree2-16 7049500 6163200 -12.57%
garbage.BenchmarkParserPause 135815000 125360666 -7.70%
garbage.BenchmarkParserPause-2 92691523 84365476 -8.98%
garbage.BenchmarkParserPause-4 53392190 46995809 -11.98%
garbage.BenchmarkParserPause-8 36059523 30998900 -14.03%
garbage.BenchmarkParserPause-16 30174300 27613350 -8.49%
garbage.BenchmarkTreePause 20969784 22568102 +7.62%
garbage.BenchmarkTreePause-2 20215875 20975130 +3.76%
garbage.BenchmarkTreePause-4 17240709 17180666 -0.35%
garbage.BenchmarkTreePause-8 18196386 18205870 +0.05%
garbage.BenchmarkTreePause-16 20621158 20486867 -0.65%
garbage.BenchmarkTree2Pause 173992142 159995285 -8.04%
garbage.BenchmarkTree2Pause-2 131281904 118013714 -10.11%
garbage.BenchmarkTree2Pause-4 93484952 85092666 -8.98%
garbage.BenchmarkTree2Pause-8 88950523 77340809 -13.05%
garbage.BenchmarkTree2Pause-16 86071238 76557952 -11.05%
garbage.BenchmarkParserLastPause 327247000 288205000 -11.93%
garbage.BenchmarkParserLastPause-2 217039000 187336000 -13.69%
garbage.BenchmarkParserLastPause-4 119722000 105069000 -12.24%
garbage.BenchmarkParserLastPause-8 70806000 64755000 -8.55%
garbage.BenchmarkParserLastPause-16 62813000 53486000 -14.85%
garbage.BenchmarkTreeLastPause 28420000 29735000 +4.63%
garbage.BenchmarkTreeLastPause-2 23514000 25427000 +8.14%
garbage.BenchmarkTreeLastPause-4 21773000 19548000 -10.22%
garbage.BenchmarkTreeLastPause-8 24072000 24046000 -0.11%
garbage.BenchmarkTreeLastPause-16 25149000 25291000 +0.56%
garbage.BenchmarkTree2LastPause 314491000 287988000 -8.43%
garbage.BenchmarkTree2LastPause-2 214363000 190616000 -11.08%
garbage.BenchmarkTree2LastPause-4 109778000 100052000 -8.86%
garbage.BenchmarkTree2LastPause-8 75390000 64753000 -14.11%
garbage.BenchmarkTree2LastPause-16 70333000 61484000 -12.58%
FTR, below are result with the empty prefetch function,
that is, single RET but no real prefetching.
It suggests that inlinable PREFETCH is worth pursuing.
benchmark old ns/op new ns/op delta
garbage.BenchmarkParser 4448988000 4560488000 +2.51%
garbage.BenchmarkParser-2 4086045000 4129728000 +1.07%
garbage.BenchmarkParser-4 3677365000 3728672000 +1.40%
garbage.BenchmarkParser-8 3517253000 3583968000 +1.90%
garbage.BenchmarkParser-16 3506562000 3591414000 +2.42%
garbage.BenchmarkTree 494435529 499580882 +1.04%
garbage.BenchmarkTree-4 468482117 467387294 -0.23%
garbage.BenchmarkTree-8 488533235 478311117 -2.09%
garbage.BenchmarkTree-2 499652705 499324235 -0.07%
garbage.BenchmarkTree-16 507835176 502005705 -1.15%
garbage.BenchmarkTree2 31453900 33296800 +5.86%
garbage.BenchmarkTree2-2 21440600 22466400 +4.78%
garbage.BenchmarkTree2-4 10982000 11402700 +3.83%
garbage.BenchmarkTree2-8 7544700 7476500 -0.90%
garbage.BenchmarkTree2-16 7049500 7338200 +4.10%
garbage.BenchmarkParserPause 135815000 139529142 +2.73%
garbage.BenchmarkParserPause-2 92691523 95229190 +2.74%
garbage.BenchmarkParserPause-4 53392190 53083476 -0.58%
garbage.BenchmarkParserPause-8 36059523 34594800 -4.06%
garbage.BenchmarkParserPause-16 30174300 30063300 -0.37%
garbage.BenchmarkTreePause 20969784 21866920 +4.28%
garbage.BenchmarkTreePause-2 20215875 20731125 +2.55%
garbage.BenchmarkTreePause-4 17240709 17275837 +0.20%
garbage.BenchmarkTreePause-8 18196386 17898777 -1.64%
garbage.BenchmarkTreePause-16 20621158 20662772 +0.20%
garbage.BenchmarkTree2Pause 173992142 184336857 +5.95%
garbage.BenchmarkTree2Pause-2 131281904 138005714 +5.12%
garbage.BenchmarkTree2Pause-4 93484952 98449238 +5.31%
garbage.BenchmarkTree2Pause-8 88950523 89286095 +0.38%
garbage.BenchmarkTree2Pause-16 86071238 89568666 +4.06%
garbage.BenchmarkParserLastPause 327247000 342189000 +4.57%
garbage.BenchmarkParserLastPause-2 217039000 217224000 +0.09%
garbage.BenchmarkParserLastPause-4 119722000 121327000 +1.34%
garbage.BenchmarkParserLastPause-8 70806000 71941000 +1.60%
garbage.BenchmarkParserLastPause-16 62813000 60166000 -4.21%
garbage.BenchmarkTreeLastPause 28420000 27840000 -2.04%
garbage.BenchmarkTreeLastPause-2 23514000 27390000 +16.48%
garbage.BenchmarkTreeLastPause-4 21773000 21414000 -1.65%
garbage.BenchmarkTreeLastPause-8 24072000 21705000 -9.83%
garbage.BenchmarkTreeLastPause-16 25149000 23932000 -4.84%
garbage.BenchmarkTree2LastPause 314491000 332894000 +5.85%
garbage.BenchmarkTree2LastPause-2 214363000 224611000 +4.78%
garbage.BenchmarkTree2LastPause-4 109778000 113976000 +3.82%
garbage.BenchmarkTree2LastPause-8 75390000 67223000 -10.83%
garbage.BenchmarkTree2LastPause-16 70333000 73216000 +4.10%
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5991057
2012-04-07 17:02:44 +04:00
Dmitriy Vyukov
9903d6870f
runtime: minor refactoring in preparation for parallel GC
...
factor sweepspan() out of sweep(), no logical changes
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5991047
2012-04-05 21:02:20 +04:00
Dmitriy Vyukov
d839a809b2
runtime: make GC stats per-M
...
This is factored out part of:
https://golang.org/cl/5279048/
(Parallel GC)
benchmark old ns/op new ns/op delta
garbage.BenchmarkParser 3999106750 3975026500 -0.60%
garbage.BenchmarkParser-2 3720553750 3719196500 -0.04%
garbage.BenchmarkParser-4 3502857000 3474980500 -0.80%
garbage.BenchmarkParser-8 3375448000 3341310500 -1.01%
garbage.BenchmarkParserLastPause 329401000 324097000 -1.61%
garbage.BenchmarkParserLastPause-2 208953000 214222000 +2.52%
garbage.BenchmarkParserLastPause-4 110933000 111656000 +0.65%
garbage.BenchmarkParserLastPause-8 71969000 78230000 +8.70%
garbage.BenchmarkParserPause 230808842 197237400 -14.55%
garbage.BenchmarkParserPause-2 123674365 125197595 +1.23%
garbage.BenchmarkParserPause-4 80518525 85710333 +6.45%
garbage.BenchmarkParserPause-8 58310243 56940512 -2.35%
garbage.BenchmarkTree2 31471700 31289400 -0.58%
garbage.BenchmarkTree2-2 21536800 21086300 -2.09%
garbage.BenchmarkTree2-4 11074700 10880000 -1.76%
garbage.BenchmarkTree2-8 7568600 7351400 -2.87%
garbage.BenchmarkTree2LastPause 314664000 312840000 -0.58%
garbage.BenchmarkTree2LastPause-2 215319000 210815000 -2.09%
garbage.BenchmarkTree2LastPause-4 110698000 108751000 -1.76%
garbage.BenchmarkTree2LastPause-8 75635000 73463000 -2.87%
garbage.BenchmarkTree2Pause 174280857 173147571 -0.65%
garbage.BenchmarkTree2Pause-2 131332714 129665761 -1.27%
garbage.BenchmarkTree2Pause-4 93803095 93422904 -0.41%
garbage.BenchmarkTree2Pause-8 86242333 85146761 -1.27%
R=rsc
CC=golang-dev
https://golang.org/cl/5987045
2012-04-05 20:48:28 +04:00
Dmitriy Vyukov
fd04f05f2f
runtime: replace XOR AX, AX with MOV $0, AX
...
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5985048
2012-04-05 18:59:50 +04:00