| Age | Commit message (Collapse) | Author |
|
Useful for debugging of runtime bugs.
+ Do not print "stack segment boundary" unless GOTRACEBACK>1.
+ Do not traceback system goroutines unless GOTRACEBACK>1.
R=rsc, minux.ma
CC=golang-dev
https://golang.org/cl/7098050
|
|
For gccgo runtime and Darwin where -fno-common is the default.
R=iant, dave
CC=golang-dev
https://golang.org/cl/7094061
|
|
Introduce global stack segment cache and limit per-thread cache size.
This greatly reduces StackSys memory on workloads that create lots of threads.
benchmark old ns/op new ns/op delta
BenchmarkStackGrowth 665 656 -1.35%
BenchmarkStackGrowth-2 333 328 -1.50%
BenchmarkStackGrowth-4 224 172 -23.21%
BenchmarkStackGrowth-8 124 91 -26.13%
BenchmarkStackGrowth-16 82 47 -41.94%
BenchmarkStackGrowth-32 73 40 -44.79%
BenchmarkStackGrowthDeep 97231 94391 -2.92%
BenchmarkStackGrowthDeep-2 47230 58562 +23.99%
BenchmarkStackGrowthDeep-4 24993 49356 +97.48%
BenchmarkStackGrowthDeep-8 15105 30072 +99.09%
BenchmarkStackGrowthDeep-16 10005 15623 +56.15%
BenchmarkStackGrowthDeep-32 12517 13069 +4.41%
TestStackMem#1,MB 310 12 -96.13%
TestStackMem#2,MB 296 14 -95.27%
TestStackMem#3,MB 479 14 -97.08%
TestStackMem#1,sec 3.22 2.26 -29.81%
TestStackMem#2,sec 2.43 2.15 -11.52%
TestStackMem#3,sec 2.50 2.38 -4.80%
R=sougou, no.smile.face, rsc
CC=golang-dev, msolomon
https://golang.org/cl/7029044
|
|
Otherwise we can get predictable collisions.
R=golang-dev, dave, patrick, rsc
CC=golang-dev
https://golang.org/cl/7051043
|
|
benchmark old ns/op new ns/op delta
BenchmarkDefer 165 113 -31.52%
BenchmarkDefer10 155 103 -33.55%
BenchmarkDeferMany 216 158 -26.85%
benchmark old allocs new allocs delta
BenchmarkDefer 1 0 -100.00%
BenchmarkDefer10 1 0 -100.00%
BenchmarkDeferMany 1 0 -100.00%
benchmark old bytes new bytes delta
BenchmarkDefer 64 0 -100.00%
BenchmarkDefer10 64 0 -100.00%
BenchmarkDeferMany 64 66 3.12%
Fixes #2364.
R=ken2
CC=golang-dev
https://golang.org/cl/7001051
|
|
avoid confusion with the global "m" and "g".
R=golang-dev, minux.ma, rsc
CC=bradfitz, golang-dev
https://golang.org/cl/6939064
|
|
Garbage collection code (to be merged later) is calling functions
which have many local variables. This increases the probability that
the stack capacity won't be big enough to hold the local variables.
So, start gc() on a bigger stack to eliminate a potentially large number
of calls to runtime·morestack().
R=rsc, remyoudompheng, dsymonds, minux.ma, iant, iant
CC=golang-dev
https://golang.org/cl/6846044
|
|
Otherwise a poorly timed GC can collect the memory before it
is returned to the Go program.
R=golang-dev, dave, dvyukov, minux.ma
CC=golang-dev
https://golang.org/cl/6819119
|
|
The 'type' field of Itab will be used by the garbage collector.
R=rsc
CC=golang-dev
https://golang.org/cl/6815059
|
|
Fixes #4275.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6759053
|
|
R=rsc
CC=golang-dev
https://golang.org/cl/6569057
|
|
R=rsc, minux.ma, ality
CC=dave, golang-dev
https://golang.org/cl/6620050
|
|
This is a part of a bigger change that adds data race detection feature:
https://golang.org/cl/6456044
R=rsc
CC=gobot, golang-dev
https://golang.org/cl/6535050
|
|
The profiler collects goroutine blocking information similar to Google Perf Tools.
You may see an example of the profile (converted to svg) attached to
http://code.google.com/p/go/issues/detail?id=3946
The public API changes are:
+pkg runtime, func BlockProfile([]BlockProfileRecord) (int, bool)
+pkg runtime, func SetBlockProfileRate(int)
+pkg runtime, method (*BlockProfileRecord) Stack() []uintptr
+pkg runtime, type BlockProfileRecord struct
+pkg runtime, type BlockProfileRecord struct, Count int64
+pkg runtime, type BlockProfileRecord struct, Cycles int64
+pkg runtime, type BlockProfileRecord struct, embedded StackRecord
R=rsc, dave, minux.ma, r
CC=gobot, golang-dev, r, remyoudompheng
https://golang.org/cl/6443115
|
|
The assembly offsets were converted mechanically using
code.google.com/p/rsc/cmd/asmlint. The instruction
changes were done by hand.
Fixes #2188.
R=iant, r, bradfitz, remyoudompheng
CC=golang-dev
https://golang.org/cl/6550058
|
|
R=rsc
CC=golang-dev
https://golang.org/cl/6554060
|
|
This CL makes the runtime understand that the type of
the len or cap of a map, slice, or string is 'int', not 'int32',
and it is also careful to distinguish between function arguments
and results of type 'int' vs type 'int32'.
In the runtime, the new typedefs 'intgo' and 'uintgo' refer
to Go int and uint. The C types int and uint continue to be
unavailable (cause intentional compile errors).
This CL does not change the meaning of int, but it should make
the eventual change of the meaning of int on amd64 a bit
smoother.
Update #2188.
R=iant, r, dave, remyoudompheng
CC=golang-dev
https://golang.org/cl/6551067
|
|
We only pass lower 32 bits of file offset to asm routine.
R=r, dave, rsc
CC=golang-dev
https://golang.org/cl/6499118
|
|
The change is a preparation for the new scheduler.
It introduces runtime.park() function,
that will atomically unlock the mutex and park the goroutine.
It will allow to remove the racy readyonstop flag
that is difficult to implement w/o the global scheduler mutex.
R=rsc, remyoudompheng, dave
CC=golang-dev
https://golang.org/cl/6501077
|
|
R=rsc, dave, minux.ma
CC=golang-dev
https://golang.org/cl/6493123
|
|
R=iant, imkrasin, krasin, iant, minux.ma, rsc, nigeltao, r, fullung
CC=golang-dev
https://golang.org/cl/6454046
|
|
Depends on CL 6197045.
Result obtained on Core i7 620M, Darwin/amd64:
benchmark old ns/op new ns/op delta
BenchmarkComplex128DivNormal 57 28 -50.78%
BenchmarkComplex128DivNisNaN 49 15 -68.90%
BenchmarkComplex128DivDisNaN 49 15 -67.88%
BenchmarkComplex128DivNisInf 40 12 -68.50%
BenchmarkComplex128DivDisInf 33 13 -61.06%
Result obtained on Core i7 620M, Darwin/386:
benchmark old ns/op new ns/op delta
BenchmarkComplex128DivNormal 89 50 -44.05%
BenchmarkComplex128DivNisNaN 307 802 +161.24%
BenchmarkComplex128DivDisNaN 309 788 +155.02%
BenchmarkComplex128DivNisInf 278 237 -14.75%
BenchmarkComplex128DivDisInf 46 22 -52.46%
Result obtained on 700MHz OMAP4460, Linux/ARM:
benchmark old ns/op new ns/op delta
BenchmarkComplex128DivNormal 1557 465 -70.13%
BenchmarkComplex128DivNisNaN 1443 220 -84.75%
BenchmarkComplex128DivDisNaN 1481 218 -85.28%
BenchmarkComplex128DivNisInf 952 216 -77.31%
BenchmarkComplex128DivDisInf 861 231 -73.17%
The 386 version has a performance regression, but as we have
decided to use SSE2 instead of x87 FPU for 386 too (issue 3912),
I won't address this issue.
R=dsymonds, mchaten, iant, dave, mtj, rsc, r
CC=golang-dev
https://golang.org/cl/6024045
|
|
Move panic/defer/recover-related stuff from proc.c/runtime.c to a new file panic.c.
No semantic changes.
proc.c is 1800+ LOC and is a bit difficult to work with.
R=golang-dev, dave, r
CC=golang-dev
https://golang.org/cl/6343071
|
|
It will be required for scheduler that maintains
GOMAXPROCS MCache's.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6350062
|
|
R=rsc, remyoudompheng, minux.ma, ality
CC=golang-dev
https://golang.org/cl/6242061
|
|
Fixes #3543.
R=golang-dev, kardianos, rsc
CC=golang-dev, hectorchu, vcc.163
https://golang.org/cl/6245063
|
|
It's sad to introduce a new macro, but rnd shows up consistently
in profiles, and the function call overwhelms the two arithmetic
instructions it performs.
R=r
CC=golang-dev
https://golang.org/cl/6260051
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
R=golang-dev
CC=golang-dev
https://golang.org/cl/5756044
|
|
Work around profiling kernel bug with signal masks.
Still broken on 64-bit Snow Leopard kernel,
but I think we can ignore that one and let people
upgrade to Lion.
Add new trivial tools addr2line and objdump to take
the place of the GNU tools of the same name, since
those are not installed on OS X.
Adapt pprof to invoke 'go tool addr2line' and
'go tool objdump' if the system tools do not exist.
Clean up disassembly of base register on amd64.
Fixes #2008.
R=golang-dev, bradfitz, mikioh.mikioh, r, iant
CC=golang-dev
https://golang.org/cl/5697066
|
|
For Brad.
Now FreeBSD/386 binaries run on nearlyfreespeech.net.
Fixes #2302.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5700060
|
|
R=golang-dev, r, r
CC=golang-dev
https://golang.org/cl/5687076
|
|
Fixes #3037.
R=rsc, minux.ma, r, rsc
CC=golang-dev
https://golang.org/cl/5674072
|
|
It is possible that Linux and Windows copy the FP control word
from the parent thread when creating a new thread. Empirically,
Darwin does not. Reset the FP control world in all cases.
Enable the floating-point strconv test.
Fixes #2917 (again).
R=golang-dev, r, iant
CC=golang-dev
https://golang.org/cl/5660047
|
|
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5656048
|
|
Restore package os/signal, with new API:
Notify replaces Incoming, allowing clients
to ask for certain signals only. Also, signals
go to everyone who asks, not just one client.
This could plausibly move into package os now
that there are no magic side effects as a result
of the import.
Update runtime for new API: move common Unix
signal handling code into signal_unix.c.
(It's so easy to do this now that we don't have
to edit Makefiles!)
Tested on darwin,linux 386,amd64.
Fixes #1266.
R=r, dsymonds, bradfitz, iant, borman
CC=golang-dev
https://golang.org/cl/3749041
|
|
unsafe: delete Typeof, Reflect, Unreflect, New, NewArray
Part of issue 2955 and issue 2968.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5650069
|
|
Same idea as heap profile: how did each thread get created?
Low memory (256 bytes per OS thread), high reward for
programs that suddenly have many threads running.
Fixes #1477.
R=golang-dev, r, dvyukov
CC=golang-dev
https://golang.org/cl/5639059
|
|
This patch adds a function to get the current cpu ticks. This is
deemed to be 'sufficiently random' to use to seed fastrand to mitigate
the algorithmic complexity attacks on the hash table implementation.
On AMD64 we use the RDTSC instruction. For 386, this instruction,
while valid, is not recognized by 8a so I've inserted the opcode by
hand. For ARM, this routine is currently stubbed to return a constant
0 value.
Future work: update 8a to recognize RDTSC.
Fixes #2630.
R=rsc
CC=golang-dev
https://golang.org/cl/5606048
|
|
Fixes #2609.
R=ken2
CC=golang-dev
https://golang.org/cl/5572069
|
|
BenchmarkChanSem old=127ns new=78.6ns
R=golang-dev, bradfitz, sameer, rsc
CC=golang-dev
https://golang.org/cl/5558049
|
|
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5532100
|
|
TBR=r
CC=golang-dev
https://golang.org/cl/5503052
|
|
Collapse the arch,os-specific directories into the main directory
by renaming xxx/foo.c to foo_xxx.c, and so on.
There are no substantial edits here, except to the Makefile.
The assumption is that the Go tool will #define GOOS_darwin
and GOARCH_amd64 and will make any file named something
like signals_darwin.h available as signals_GOOS.h during the
build. This replaces what used to be done with -I$(GOOS).
There is still work to be done to make runtime build with
standard tools, but this is a big step. After this we will have
to write a script to generate all the generated files so they
can be checked in (instead of generated during the build).
R=r, iant, r, lucio.dere
CC=golang-dev
https://golang.org/cl/5490053
|
|
To allow these types as map keys, we must fill in
equal and hash functions in their algorithm tables.
Structs or arrays that are "just memory", like [2]int,
can and do continue to use the AMEM algorithm.
Structs or arrays that contain special values like
strings or interface values use generated functions
for both equal and hash.
The runtime helper func runtime.equal(t, x, y) bool handles
the general equality case for x == y and calls out to
the equal implementation in the algorithm table.
For short values (<= 4 struct fields or array elements),
the sequence of elementwise comparisons is inlined
instead of calling runtime.equal.
R=ken, mpimenov
CC=golang-dev
https://golang.org/cl/5451105
|
|
Equality on structs will require arbitrary code for type equality,
so change algorithm in type data from uint8 to table pointer.
In the process, trim top-level map structure from
104/80 bytes (64-bit/32-bit) to 24/12.
Equality on structs will require being able to call code generated
by the Go compiler, and C code has no way to access Go return
values, so change the hash and equal algorithm functions to take
a pointer to a result instead of returning the result.
R=ken
CC=golang-dev
https://golang.org/cl/5453043
|