diff options
| author | Keith Randall <khr@golang.org> | 2014-03-25 14:11:34 -0700 |
|---|---|---|
| committer | Keith Randall <khr@golang.org> | 2014-03-25 14:11:34 -0700 |
| commit | 1b45cc45e37cfe67733ebff5eb5cabfef207eef6 (patch) | |
| tree | 011b8304ffbf3cf262473cacd32797f99bb4f107 /src/pkg/runtime/extern.go | |
| parent | 4ebfa8319914e1ed9727592d1fa360ce339b7597 (diff) | |
| download | go-1b45cc45e37cfe67733ebff5eb5cabfef207eef6.tar.xz | |
runtime: redo stack map entries to avoid false retention
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
Diffstat (limited to 'src/pkg/runtime/extern.go')
| -rw-r--r-- | src/pkg/runtime/extern.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pkg/runtime/extern.go b/src/pkg/runtime/extern.go index 30fc34c0ba..0c5041d38b 100644 --- a/src/pkg/runtime/extern.go +++ b/src/pkg/runtime/extern.go @@ -36,6 +36,9 @@ a comma-separated list of name=val pairs. Supported names are: length of the pause. Setting gctrace=2 emits the same summary but also repeats each collection. + gcdead: setting gcdead=1 causes the garbage collector to clobber all stack slots + that it thinks are dead. + scheddetail: setting schedtrace=X and scheddetail=1 causes the scheduler to emit detailed multiline info every X milliseconds, describing state of the scheduler, processors, threads and goroutines. |
