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
Dmitriy Vyukov
4667571619
runtime: add 64-bit atomics
...
This is factored out part of:
https://golang.org/cl/5279048/
(Parallel GC)
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5985047
2012-04-05 18:47:43 +04:00
Dmitriy Vyukov
a28a10e1a2
runtime: remove redundant code
...
R=rsc
CC=golang-dev
https://golang.org/cl/5987046
2012-04-05 18:37:46 +04:00
Maxim Pimenov
6727a2ad78
runtime: fix a comment
...
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5975043
2012-04-02 11:27:50 -04:00
Russ Cox
5eb007dede
runtime: work around false negative in deadlock detection
...
Not a complete fix for issue 3342, but fixes the trivial case.
There may still be a race in the instants before and after
a scavenger-induced garbage collection.
Intended to be "obviously safe": a call to runtime·gosched
before main.main is no different than a call to runtime.Gosched
at the beginning of main.main, and it is (or had better be)
safe to call runtime.Gosched at any point during main.
Update #3342 .
R=iant
CC=golang-dev
https://golang.org/cl/5919052
2012-03-27 12:22:19 -04:00
Mikio Hara
4c2614c57c
undo CL 5844051 / 5d0322034aa8
...
Breaks closure test when GOMAXPROCS=2 or more.
««« original CL description
runtime: restore deadlock detection in the simplest case.
Fixes #3342 .
R=iant, r, dave, rsc
CC=golang-dev, remy
https://golang.org/cl/5844051
»»»
R=rsc
CC=golang-dev
https://golang.org/cl/5924045
2012-03-27 13:05:17 +09:00
Rémy Oudompheng
84bb2547fb
runtime: restore deadlock detection in the simplest case.
...
Fixes #3342 .
R=iant, r, dave, rsc
CC=golang-dev, remy
https://golang.org/cl/5844051
2012-03-26 23:06:20 -04:00
Shenghou Ma
4b1933dfb2
runtime: remove unused goc2c.c
...
Its functionality has been moved into cmd/dist.
R=golang-dev, r, iant
CC=golang-dev
https://golang.org/cl/5843062
2012-03-21 00:49:45 +08:00
Russ Cox
2e4a035995
runtime: do not handle signals before configuring handler
...
There was a small window during program initialization
where a signal could come in before the handling mechanisms
were set up to handle it. Delay the signal-handler installation
until we're ready for the signals.
Fixes #3314 .
R=golang-dev, dsymonds, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/5833049
2012-03-15 22:17:54 -04:00
Russ Cox
bd6404a4cc
runtime: fix arm build
...
TBR=golang-dev
CC=golang-dev
https://golang.org/cl/5832047
2012-03-15 17:40:17 -04:00
Russ Cox
9e5db8c90a
5l, 6l, 8l: fix stack split logic for stacks near default segment size
...
Fixes #3310 .
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5823051
2012-03-15 15:22:30 -04:00
Shenghou Ma
b2a9079e54
runtime: manage stack by ourselves for badcallback on windows/amd64
...
This function uses 48-byte of precious non-split stack for every callback
function, and without this CL, it can easily overflow the non-split stack.
I encountered this when trying to enable misc/cgo/test on windows/amd64.
R=rsc
CC=golang-dev
https://golang.org/cl/5784075
2012-03-15 02:24:49 +08:00
Mikio Hara
9eeb90945e
runtime/cgo: linux signal masking
...
Fixes #3314 .
Fixes #3101 (again).
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5820047
2012-03-14 13:07:25 +09:00
Mikio Hara
1fc9a17c7e
runtime/cgo: darwin signal masking
...
Fixes #3101 (again).
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5825043
2012-03-14 12:49:59 +09:00
Alex Brainman
16ade99d9d
runtime: fix windows/amd64 exception handler
...
R=golang-dev, rsc
CC=golang-dev, hectorchu
https://golang.org/cl/5797077
2012-03-12 22:42:55 -04:00
Russ Cox
2d3cc97c9c
runtime: fix windows/amd64
...
Maybe.
TBR=bradfitz
CC=golang-dev
https://golang.org/cl/5754091
2012-03-12 16:48:16 -04:00
Russ Cox
b23691148f
runtime: print error on receipt of signal on non-Go thread
...
It's the best we can do before Go 1.
For issue 3250; not a fix but at least less mysterious.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5797068
2012-03-12 15:55:18 -04:00
Russ Cox
c9e5600f7d
runtime: move runtime.write back to C
...
It may have to switch stacks, since we are calling
a DLL instead of a system call.
badcallback says where it is, because it is being called
on a Windows stack already.
R=golang-dev, alex.brainman
CC=golang-dev
https://golang.org/cl/5782060
2012-03-09 00:10:34 -05:00
Russ Cox
8a1b3d5a57
runtime: fix windows build
...
Implement runtime·write, like on the other systems,
and also runtime·badcallback, in assembly to reduce
stack footprint.
TBR=golang-dev
CC=golang-dev
https://golang.org/cl/5785055
2012-03-08 15:53:11 -05:00
Russ Cox
36aa7d4d14
runtime: inline calls to notok
...
When a very low-level system call that should never fail
does fail, we call notok, which crashes the program.
Often, we are then left with only the program counter as
information about the crash, and it is in notok.
Instead, inline calls to notok (it is just one instruction
on most systems) so that the program counter will
tell us which system call is unhappy.
R=golang-dev, gri, minux.ma, bradfitz
CC=golang-dev
https://golang.org/cl/5792048
2012-03-08 14:03:56 -05:00
Russ Cox
9b73238daa
cgo, runtime: diagnose callback on non-Go thread
...
Before:
$ go run x.go
signal 11 (core dumped)
$
After:
$ go run x.go
runtime: cgo callback on thread not created by Go.
signal 11 (core dumped)
$
For issue 3068.
Not a fix, but as much of a fix as we can do before Go 1.
R=golang-dev, rogpeppe, gri
CC=golang-dev
https://golang.org/cl/5781047
2012-03-08 12:12:40 -05:00
Russ Cox
b0beeb1501
runtime: fix freebsd crash
...
FreeBSD, alone among our supported operating systems,
required that usleep not be interrupted. Don't require that.
Fixes #3217 .
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5781045
2012-03-07 15:30:54 -05:00
Rémy Oudompheng
3dcedb620c
runtime: try extending arena size in 32-bit allocator.
...
If it didn't reach the limit, we can try extending the arena
before resorting to random memory mappings and praying for the
kernel to be kind.
Fixes #3173 .
R=rsc, rsc
CC=golang-dev
https://golang.org/cl/5725045
2012-03-07 14:21:45 -05:00
Russ Cox
b37841cc06
runtime/pprof: disable test on Leopard 64-bit
...
Fixes #3234 .
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5756078
2012-03-07 11:44:54 -05:00
Ian Lance Taylor
aabbcda816
runtime: remove unused runtime·signame and runtime·newError
...
R=golang-dev
CC=golang-dev
https://golang.org/cl/5756044
2012-03-06 09:07:00 -08:00
Russ Cox
4e110af169
runtime: add Compiler
...
R=iant, r, gri
CC=golang-dev
https://golang.org/cl/5720073
2012-03-05 22:28:02 -05:00
Rémy Oudompheng
aa1aaee7fd
runtime: wait for main goroutine before setting GOMAXPROCS.
...
Fixes #3182 .
R=golang-dev, dvyukov, rsc
CC=golang-dev, remy
https://golang.org/cl/5732057
2012-03-05 16:40:27 -05:00
Russ Cox
c0a842e57f
runtime/debug: fix test when source cannot be found
...
This happens with GOROOT_FINAL=/somewhere/else
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5727069
2012-03-05 16:13:15 -05:00
Russ Cox
dc159fabff
runtime: run init on main thread
...
Fixes #3125 .
R=golang-dev, r, minux.ma
CC=golang-dev
https://golang.org/cl/5714049
2012-03-01 11:48:17 -05:00
Shenghou Ma
357b257cd1
runtime/pprof: skip test on 64-bit Mac OS X 10.6
...
R=rsc, bsiegert
CC=golang-dev
https://golang.org/cl/5709060
2012-03-01 03:11:37 +08:00
Luuk van Dijk
fb2706113f
pkg/runtime: 2 sanity checks in the runtime-gdb.py prettyprinters.
...
Don't try to print obviously corrupt slices or interfaces.
Doesn't actually solve 3047 or 2818, but seems a good idea anyway.
R=rsc, bsiegert
CC=golang-dev
https://golang.org/cl/5708061
2012-02-29 16:42:25 +01:00