| Age | Commit message (Collapse) | Author |
|
Preparation was in CL 134570043.
This CL contains only the effect of 'hg mv src/pkg/* src'.
For more about the move, see golang.org/s/go14nopkg.
|
|
Because symtab.c was partially converted before,
the diffs are not terribly useful.
The earlier conversion was trying to refactor or
clean up the code in addition to doing the translation.
It also made a mistake by redefining Func to be something
users could overwrite.
I undid those changes, making symtab.go a more
literal line-for-line translation of symtab.c instead.
LGTM=josharian
R=golang-codereviews, dave, bradfitz, josharian
CC=golang-codereviews, iant, khr, r
https://golang.org/cl/140880043
|
|
LGTM=rsc
R=golang-codereviews, rsc, khr
CC=golang-codereviews
https://golang.org/cl/139900043
|
|
The two converted files were nearly identical.
Instead of continuing that duplication, I merged them
into a single traceback.go.
Tested on arm, amd64, amd64p32, and 386.
LGTM=r
R=golang-codereviews, remyoudompheng, dave, r
CC=dvyukov, golang-codereviews, iant, khr
https://golang.org/cl/134200044
|
|
The exported Go definitions appearing in mprof.go are
copied verbatim from debug.go.
The unexported Go funcs and types are new.
The C Bucket type used a union and was not a line-for-line translation.
LGTM=remyoudompheng
R=golang-codereviews, remyoudompheng
CC=dvyukov, golang-codereviews, iant, khr, r
https://golang.org/cl/137040043
|
|
In an earlier CL I wrote a separate Go-only version, but that broke Plan 9,
because the Go-only version assumed a non-Plan 9 system.
Translate the real ones instead.
LGTM=r
R=golang-codereviews, r
CC=0intro, golang-codereviews, iant, khr
https://golang.org/cl/140050044
|
|
LGTM=dvyukov
R=golang-codereviews, bradfitz, dvyukov
CC=golang-codereviews, iant, khr
https://golang.org/cl/135070043
|
|
Once and for all.
Broken in cl/108640043.
I've messed it before. To test scavenger-related changes
one needs to alter the constants during final testing.
And then it's very easy to submit with the altered constants.
LGTM=rsc
R=golang-codereviews
CC=golang-codereviews, rsc
https://golang.org/cl/136720044
|
|
LGTM=khr
R=khr, dvyukov, dave
CC=golang-codereviews, rsc
https://golang.org/cl/124300044
|
|
LGTM=rlh, khr
R=golang-codereviews, rlh, bradfitz, khr
CC=golang-codereviews, rsc
https://golang.org/cl/127490043
|
|
This change introduces gomallocgc, a Go clone of mallocgc.
Only a few uses have been moved over, so there are still
lots of uses from C. Many of these C uses will be moved
over to Go (e.g. in slice.goc), but probably not all.
What should remain of C's mallocgc is an open question.
LGTM=rsc, dvyukov
R=rsc, khr, dave, bradfitz, dvyukov
CC=golang-codereviews
https://golang.org/cl/108840046
|
|
Fixes #7701. (again, differently)
LGTM=rsc
R=iant, rsc
CC=golang-codereviews
https://golang.org/cl/94560043
|
|
This has typically crashed in the past, although usually with
an 'all goroutines are asleep - deadlock!' message that shows
no goroutines (because there aren't any).
Previous discussion at:
https://groups.google.com/d/msg/golang-nuts/uCT_7WxxopQ/BoSBlLFzUTkJ
https://groups.google.com/d/msg/golang-dev/KUojayEr20I/u4fp_Ej5PdUJ
http://golang.org/issue/7711
There is general agreement that runtime.Goexit terminates the
main goroutine, so that main cannot return, so the program does
not exit.
The interpretation that all other goroutines exiting causes an
exit(0) is relatively new and was not part of those discussions.
That is what this CL changes.
Thankfully, even though the exit(0) has been there for a while,
some other accounting bugs made it very difficult to trigger,
so it is reasonable to replace. In particular, see golang.org/issue/7711#c10
for an examination of the behavior across past releases.
Fixes #7711.
LGTM=iant, r
R=golang-codereviews, iant, dvyukov, r
CC=golang-codereviews
https://golang.org/cl/88210044
|
|
Change two-bit stack map entries to encode:
0 = dead
1 = scalar
2 = pointer
3 = multiword
If multiword, the two-bit entry for the following word encodes:
0 = string
1 = slice
2 = iface
3 = eface
That way, during stack scanning we can check if a string
is zero length or a slice has zero capacity. We can avoid
following the contained pointer in those cases. It is safe
to do so because it can never be dereferenced, and it is
desirable to do so because it may cause false retention
of the following block in memory.
Slice feature turned off until issue 7564 is fixed.
Update #7549
LGTM=rsc
R=golang-codereviews, bradfitz, rsc
CC=golang-codereviews
https://golang.org/cl/76380043
|
|
And document it explicitly, even though it already said
it wasn't guaranteed.
Fixes #6857
R=golang-dev, khr
CC=golang-dev
https://golang.org/cl/43580043
|
|
When enabled this new debugging mode will allocate objects on
their own page and never recycle memory addresses. This is an
essential tool to root cause a broad class of heap corruption.
R=golang-dev, dave, daniel.morsing, dvyukov, rsc, iant, cshapiro
CC=golang-dev
https://golang.org/cl/22060046
|
|
Output for an allocation and free (sweep) follows
MProf_Malloc(p=0xc2100210a0, size=0x50, type=0x0 <single object>)
#0 0x46ee15 runtime.mallocgc /usr/local/google/home/cshapiro/go/src/pkg/runtime/malloc.goc:141
#1 0x47004f runtime.settype_flush /usr/local/google/home/cshapiro/go/src/pkg/runtime/malloc.goc:612
#2 0x45f92c gc /usr/local/google/home/cshapiro/go/src/pkg/runtime/mgc0.c:2071
#3 0x45f89e mgc /usr/local/google/home/cshapiro/go/src/pkg/runtime/mgc0.c:2050
#4 0x45258b runtime.mcall /usr/local/google/home/cshapiro/go/src/pkg/runtime/asm_amd64.s:179
MProf_Free(p=0xc2100210a0, size=0x50)
#0 0x46ee15 runtime.mallocgc /usr/local/google/home/cshapiro/go/src/pkg/runtime/malloc.goc:141
#1 0x47004f runtime.settype_flush /usr/local/google/home/cshapiro/go/src/pkg/runtime/malloc.goc:612
#2 0x45f92c gc /usr/local/google/home/cshapiro/go/src/pkg/runtime/mgc0.c:2071
#3 0x45f89e mgc /usr/local/google/home/cshapiro/go/src/pkg/runtime/mgc0.c:2050
#4 0x45258b runtime.mcall /usr/local/google/home/cshapiro/go/src/pkg/runtime/asm_amd64.s:179
R=golang-dev, dvyukov, rsc, cshapiro
CC=golang-dev
https://golang.org/cl/21990045
|
|
Originally the requirement was f(x) where f's argument is
exactly x's type.
CL 11858043 relaxed the requirement in a non-standard
way: f's argument must be exactly x's type or interface{}.
If we're going to relax the requirement, it should be done
in a way consistent with the rest of Go. This CL allows f's
argument to have any type for which x is assignable;
that's the same requirement the compiler would impose
if compiling f(x) directly.
Fixes #5368.
R=dvyukov, bradfitz, pieter
CC=golang-dev
https://golang.org/cl/12895043
|
|
The schedtrace value sets dump period in milliseconds.
In default mode the trace looks as follows:
SCHED 0ms: gomaxprocs=4 idleprocs=0 threads=3 idlethreads=0 runqueue=0 [1 0 0 0]
SCHED 1001ms: gomaxprocs=4 idleprocs=3 threads=6 idlethreads=3 runqueue=0 [0 0 0 0]
SCHED 2008ms: gomaxprocs=4 idleprocs=1 threads=6 idlethreads=1 runqueue=0 [0 1 0 0]
If GODEBUG=scheddetail=1 is set as well, then the detailed trace is printed:
SCHED 0ms: gomaxprocs=4 idleprocs=0 threads=3 idlethreads=0 runqueue=0 singleproc=0 gcwaiting=1 mlocked=0 nmspinning=0 stopwait=0 sysmonwait=0
P0: status=3 tick=1 m=0 runqsize=1/128 gfreecnt=0
P1: status=3 tick=0 m=-1 runqsize=0/128 gfreecnt=0
P2: status=3 tick=0 m=-1 runqsize=0/128 gfreecnt=0
P3: status=3 tick=0 m=-1 runqsize=0/128 gfreecnt=0
M2: p=-1 curg=-1 mallocing=0 throwing=0 gcing=0 locks=1 dying=0 helpgc=0 spinning=0 lockedg=-1
M1: p=-1 curg=-1 mallocing=0 throwing=0 gcing=0 locks=1 dying=0 helpgc=0 spinning=0 lockedg=-1
M0: p=0 curg=1 mallocing=0 throwing=0 gcing=0 locks=1 dying=0 helpgc=0 spinning=0 lockedg=1
G1: status=2() m=0 lockedm=0
G2: status=1() m=-1 lockedm=-1
R=golang-dev, raggi, rsc
CC=golang-dev
https://golang.org/cl/11435044
|
|
Fixes #5368.
R=golang-dev, dvyukov
CC=golang-dev, rsc
https://golang.org/cl/11858043
|
|
Design at http://golang.org/s/go12symtab.
This enables some cleanup of the garbage collector metadata
that will be done in future CLs.
This CL does not move the old symtab and pclntab back into
an unmapped section of the file. That's a bit tricky and will be
done separately.
Fixes #4020.
R=golang-dev, dave, cshapiro, iant, r
CC=golang-dev, nigeltao
https://golang.org/cl/11085043
|
|
Currently it replaces GOGCTRACE env var (GODEBUG=gctrace=1).
The plan is to extend it with other type of debug tracing,
e.g. GODEBUG=gctrace=1,schedtrace=100.
R=rsc
CC=bradfitz, daniel.morsing, gobot, golang-dev
https://golang.org/cl/10026045
|
|
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/10036047
|
|
argument pointer locations
With this change the compiler emits a bitmap for each function
covering its stack frame arguments area. If an argument word
is known to contain a pointer, a bit is set. The garbage
collector reads this information when scanning the stack by
frames and uses it to ignores locations known to not contain a
pointer.
R=golang-dev, bradfitz, daniel.morsing, dvyukov, khr, khr, iant, cshapiro
CC=golang-dev
https://golang.org/cl/9223046
|
|
This provides a way to generate core dumps when people need them.
The settings are:
GOTRACEBACK=0 no traceback on panic, just exit
GOTRACEBACK=1 default - traceback on panic, then exit
GOTRACEBACK=2 traceback including runtime frames on panic, then exit
GOTRACEBACK=crash traceback including runtime frames on panic, then crash
Fixes #3257.
R=golang-dev, devon.odell, r, daniel.morsing, ality
CC=golang-dev
https://golang.org/cl/7666044
|
|
locals information
Previously, the func structure contained an inaccurate value for
the args member and a 0 value for the locals member.
This change populates the func structure with args and locals
values computed by the compiler. The number of args was
already available in the ATEXT instruction. The number of
locals is now passed through in the new ALOCALS instruction.
This change also switches the unit of args and locals to be
bytes, just like the frame member, instead of 32-bit words.
R=golang-dev, bradfitz, cshapiro, dave, rsc
CC=golang-dev
https://golang.org/cl/7399045
|
|
add necessary newlines.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6847067
|
|
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
|
|
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
|
|
Delete Alloc, Free, Lookup, Semacquire, Semrelease
Fixes #2955.
R=golang-dev, r, bradfitz
CC=golang-dev
https://golang.org/cl/5675093
|
|
respectively.
Update some other docs too.
Update #2955.
R=rsc
CC=golang-dev
https://golang.org/cl/5676060
|
|
R=rsc
CC=golang-dev
https://golang.org/cl/5574060
|
|
R=golang-dev, dvyukov
CC=golang-dev
https://golang.org/cl/5540059
|
|
R=golang-dev, robert.hencke, r
CC=golang-dev
https://golang.org/cl/5538050
|
|
It's hard enough to get right once.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5533073
|
|
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5528061
|
|
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5511047
|
|
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
|
|
R=rsc
CC=golang-dev
https://golang.org/cl/4442064
|
|
Follow morestack, so that crashes during a stack split
give complete traces. Also mark stack segment boundaries
as an aid to debugging.
Correct various line number bugs with yet another attempt
at interpreting the pc/ln table. This one has a chance at
being correct, because I based it on reading src/cmd/ld/lib.c
instead of on reading the documentation.
Fixes #1138.
Fixes #1430.
Fixes #1461.
throw: runtime: split stack overflow
runtime.throw+0x3e /home/rsc/g/go2/src/pkg/runtime/runtime.c:78
runtime.throw(0x81880af, 0xf75c8b18)
runtime.newstack+0xad /home/rsc/g/go2/src/pkg/runtime/proc.c:728
runtime.newstack()
runtime.morestack+0x4f /home/rsc/g/go2/src/pkg/runtime/386/asm.s:184
runtime.morestack()
----- morestack called from stack: -----
runtime.new+0x1a /home/rsc/g/go2/src/pkg/runtime/malloc.c:288
runtime.new(0x1, 0x0, 0x0)
gongo.makeBoard+0x33 /tmp/Gongo/gongo_robot_test.go:344
gongo.makeBoard(0x809d238, 0x1, 0xf76092c8, 0x1)
----- stack segment boundary -----
gongo.checkEasyScore+0xcc /tmp/Gongo/gongo_robot_test.go:287
gongo.checkEasyScore(0xf764b710, 0x0, 0x809d238, 0x1)
gongo.TestEasyScore+0x8c /tmp/Gongo/gongo_robot_test.go:255
gongo.TestEasyScore(0xf764b710, 0x818a990)
testing.tRunner+0x2f /home/rsc/g/go2/src/pkg/testing/testing.go:132
testing.tRunner(0xf764b710, 0xf763b5dc, 0x0)
runtime.goexit /home/rsc/g/go2/src/pkg/runtime/proc.c:149
runtime.goexit()
R=ken2, r
CC=golang-dev
https://golang.org/cl/4000053
|
|
R=rsc, mattn
CC=golang-dev
https://golang.org/cl/4047047
|
|
R=rsc
CC=golang-dev
https://golang.org/cl/3308041
|
|
R=rsc
CC=golang-dev
https://golang.org/cl/2472041
|
|
Changes to FuncLine sync it with symtab.c's funcline.
R=r
CC=girard.m1, golang-dev
https://golang.org/cl/2083041
|
|
R=iant, rsc
CC=golang-dev
https://golang.org/cl/1741058
|
|
R=rsc
CC=golang-dev
https://golang.org/cl/1698051
|
|
move mal next to the other malloc functions.
R=r
CC=golang-dev
https://golang.org/cl/1701045
|
|
R=rsc
CC=golang-dev
https://golang.org/cl/1140041
|
|
baby step toward panic+recover.
Fixes #349.
R=r
CC=golang-dev
https://golang.org/cl/825043
|
|
now runtime.MemStats.Sys really is the sum of all the other Sys fields.
R=r
CC=golang-dev
https://golang.org/cl/843041
|