Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(17074)

Issue 37540043: code review 37540043: runtime: heap dump experiment (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 4 months ago by khr
Modified:
10 years, 1 month ago
Reviewers:
rsc
CC:
rsc, bradfitz, dvyukov, khr1, golang-codereviews
Visibility:
Public.

Description

runtime: WriteHeapDump dumps the heap to a file. See http://golang.org/s/go13heapdump for the file format.

Patch Set 1 #

Patch Set 2 : diff -r 3afe9c5bc283 https://khr%40golang.org@code.google.com/p/go/ #

Patch Set 3 : diff -r 1c0d6bc1e0b7 https://code.google.com/p/go/ #

Patch Set 4 : diff -r 1c0d6bc1e0b7 https://khr%40golang.org@code.google.com/p/go/ #

Patch Set 5 : diff -r 1c0d6bc1e0b7 https://khr%40golang.org@code.google.com/p/go/ #

Patch Set 6 : diff -r 1c0d6bc1e0b7 https://code.google.com/p/go/ #

Patch Set 7 : diff -r 6835745cc243 https://khr%40golang.org@code.google.com/p/go/ #

Patch Set 8 : diff -r 6835745cc243 https://khr%40golang.org@code.google.com/p/go/ #

Patch Set 9 : diff -r eeb3547ccd1b https://khr%40golang.org@code.google.com/p/go/ #

Total comments: 1

Patch Set 10 : diff -r d763454383f4 https://khr%40golang.org@code.google.com/p/go/ #

Patch Set 11 : diff -r 26aa53304a48 https://khr%40golang.org@code.google.com/p/go/ #

Patch Set 12 : diff -r 26aa53304a48 https://khr%40golang.org@code.google.com/p/go/ #

Patch Set 13 : diff -r 26aa53304a48 https://khr%40golang.org@code.google.com/p/go/ #

Patch Set 14 : diff -r 26aa53304a48 https://khr%40golang.org@code.google.com/p/go/ #

Patch Set 15 : diff -r b238e9cf4c3d https://code.google.com/p/go/ #

Patch Set 16 : diff -r b238e9cf4c3d https://code.google.com/p/go/ #

Patch Set 17 : diff -r b238e9cf4c3d https://code.google.com/p/go/ #

Patch Set 18 : diff -r 26aa53304a48 https://khr%40golang.org@code.google.com/p/go/ #

Patch Set 19 : diff -r 104004fc1da3 https://khr%40golang.org@code.google.com/p/go/ #

Patch Set 20 : diff -r 104004fc1da3 https://khr%40golang.org@code.google.com/p/go/ #

Patch Set 21 : diff -r 104004fc1da3 https://khr%40golang.org@code.google.com/p/go/ #

Patch Set 22 : diff -r 104004fc1da3 https://khr%40golang.org@code.google.com/p/go/ #

Patch Set 23 : diff -r 104004fc1da3 https://khr%40golang.org@code.google.com/p/go/ #

Patch Set 24 : diff -r 104004fc1da3 https://khr%40golang.org@code.google.com/p/go/ #

Patch Set 25 : diff -r 104004fc1da3 https://khr%40golang.org@code.google.com/p/go/ #

Total comments: 42

Patch Set 26 : diff -r 08dcdcdb757b https://khr%40golang.org@code.google.com/p/go/ #

Patch Set 27 : diff -r 08dcdcdb757b https://khr%40golang.org@code.google.com/p/go/ #

Patch Set 28 : diff -r 08dcdcdb757b https://khr%40golang.org@code.google.com/p/go/ #

Patch Set 29 : diff -r 829c926acf37 https://khr%40golang.org@code.google.com/p/go/ #

Patch Set 30 : diff -r 321d42ff40d3 https://code.google.com/p/go/ #

Patch Set 31 : diff -r 321d42ff40d3 https://code.google.com/p/go/ #

Patch Set 32 : diff -r 321d42ff40d3 https://code.google.com/p/go/ #

Patch Set 33 : diff -r 321d42ff40d3 https://code.google.com/p/go/ #

Patch Set 34 : diff -r 5cacef3086fb https://khr%40golang.org@code.google.com/p/go/ #

Patch Set 35 : diff -r 5cacef3086fb https://khr%40golang.org@code.google.com/p/go/ #

Patch Set 36 : diff -r 62052ebe728b https://code.google.com/p/go/ #

Patch Set 37 : diff -r 62052ebe728b https://code.google.com/p/go/ #

Total comments: 3

Patch Set 38 : diff -r ec2ac2c466aa https://code.google.com/p/go/ #

Patch Set 39 : diff -r ec2ac2c466aa https://khr%40golang.org@code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+973 lines, -42 lines) Patch
M src/pkg/runtime/debug/garbage.go View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 1 chunk +5 lines, -0 lines 0 comments Download
A src/pkg/runtime/heapdump.c View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 1 chunk +890 lines, -0 lines 0 comments Download
M src/pkg/runtime/iface.goc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +14 lines, -0 lines 0 comments Download
M src/pkg/runtime/malloc.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 1 chunk +1 line, -0 lines 0 comments Download
M src/pkg/runtime/mgc0.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +41 lines, -0 lines 0 comments Download
M src/pkg/runtime/mgc0.c View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 7 chunks +20 lines, -42 lines 0 comments Download
M src/pkg/runtime/runtime.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 33
rsc
https://codereview.appspot.com/37540043/diff/160001/src/pkg/runtime/string.goc File src/pkg/runtime/string.goc (right): https://codereview.appspot.com/37540043/diff/160001/src/pkg/runtime/string.goc#newcode265 src/pkg/runtime/string.goc:265: runtimeĀ·strlen(byte *s) For reasons that predate my involvement (perhaps ...
10 years, 1 month ago (2014-03-07 01:21:44 UTC) #1
khr
Hello rsc@golang.org (cc: golang-codereviews@googlegroups.com), I'd like you to review this change to https://khr%40golang.org@code.google.com/p/go/
10 years, 1 month ago (2014-03-12 22:51:17 UTC) #2
khr
On 2014/03/12 22:51:17, khr wrote: > Hello mailto:rsc@golang.org (cc: mailto:golang-codereviews@googlegroups.com), > > I'd like you ...
10 years, 1 month ago (2014-03-12 23:07:22 UTC) #3
bradfitz
https://codereview.appspot.com/37540043/diff/430001/src/pkg/runtime/debug/garbage.go File src/pkg/runtime/debug/garbage.go (right): https://codereview.appspot.com/37540043/diff/430001/src/pkg/runtime/debug/garbage.go#newcode150 src/pkg/runtime/debug/garbage.go:150: // Dump description of the heap and the objects ...
10 years, 1 month ago (2014-03-12 23:08:40 UTC) #4
rsc
i'm very excited to see this going in. lots of minor comments but it's great ...
10 years, 1 month ago (2014-03-13 01:04:03 UTC) #5
dvyukov
Cool! I am curious can it be used to debug the flaky finalizer issues that ...
10 years, 1 month ago (2014-03-13 11:13:37 UTC) #6
dvyukov
On 2014/03/13 11:13:37, dvyukov wrote: > Cool! > > I am curious can it be ...
10 years, 1 month ago (2014-03-13 11:17:17 UTC) #7
rsc
On Thu, Mar 13, 2014 at 7:13 AM, <dvyukov@google.com> wrote: > Cool! > > I ...
10 years, 1 month ago (2014-03-13 13:32:03 UTC) #8
rsc
On Thu, Mar 13, 2014 at 7:17 AM, <dvyukov@google.com> wrote: > And also why > ...
10 years, 1 month ago (2014-03-13 13:33:53 UTC) #9
khr
https://codereview.appspot.com/37540043/diff/430001/src/pkg/runtime/heapdump.c File src/pkg/runtime/heapdump.c (right): https://codereview.appspot.com/37540043/diff/430001/src/pkg/runtime/heapdump.c#newcode167 src/pkg/runtime/heapdump.c:167: dumpstackroot(byte *from, byte *to, byte *frame) On 2014/03/13 01:04:04, ...
10 years, 1 month ago (2014-03-13 22:59:08 UTC) #10
rsc
https://codereview.appspot.com/37540043/diff/430001/src/pkg/runtime/heapdump.c File src/pkg/runtime/heapdump.c (right): https://codereview.appspot.com/37540043/diff/430001/src/pkg/runtime/heapdump.c#newcode167 src/pkg/runtime/heapdump.c:167: dumpstackroot(byte *from, byte *to, byte *frame) On 2014/03/13 22:59:09, ...
10 years, 1 month ago (2014-03-13 23:05:39 UTC) #11
rsc
https://codereview.appspot.com/37540043/diff/430001/src/pkg/runtime/heapdump.c File src/pkg/runtime/heapdump.c (right): https://codereview.appspot.com/37540043/diff/430001/src/pkg/runtime/heapdump.c#newcode217 src/pkg/runtime/heapdump.c:217: dumpint(sp); // frame identified by sp On 2014/03/13 22:59:09, ...
10 years, 1 month ago (2014-03-13 23:11:58 UTC) #12
rsc
https://codereview.appspot.com/37540043/diff/430001/src/pkg/runtime/heapdump.c File src/pkg/runtime/heapdump.c (right): https://codereview.appspot.com/37540043/diff/430001/src/pkg/runtime/heapdump.c#newcode217 src/pkg/runtime/heapdump.c:217: dumpint(sp); // frame identified by sp Also, unwinding the ...
10 years, 1 month ago (2014-03-13 23:12:53 UTC) #13
khr
https://codereview.appspot.com/37540043/diff/430001/src/pkg/runtime/heapdump.c File src/pkg/runtime/heapdump.c (right): https://codereview.appspot.com/37540043/diff/430001/src/pkg/runtime/heapdump.c#newcode623 src/pkg/runtime/heapdump.c:623: callback(arg, FieldKindPtr, offset + prog[1] + offsetof(String, str)); On ...
10 years, 1 month ago (2014-03-14 01:11:17 UTC) #14
rsc
https://codereview.appspot.com/37540043/diff/430001/src/pkg/runtime/heapdump.c File src/pkg/runtime/heapdump.c (right): https://codereview.appspot.com/37540043/diff/430001/src/pkg/runtime/heapdump.c#newcode623 src/pkg/runtime/heapdump.c:623: callback(arg, FieldKindPtr, offset + prog[1] + offsetof(String, str)); On ...
10 years, 1 month ago (2014-03-14 04:25:21 UTC) #15
dvyukov
https://codereview.appspot.com/37540043/diff/430001/src/pkg/runtime/heapdump.c File src/pkg/runtime/heapdump.c (right): https://codereview.appspot.com/37540043/diff/430001/src/pkg/runtime/heapdump.c#newcode482 src/pkg/runtime/heapdump.c:482: if((bits & bitAllocated) == 0) On 2014/03/13 22:59:09, khr ...
10 years, 1 month ago (2014-03-14 05:52:06 UTC) #16
khr1
I can filter out things in the freelist, that's fine. Unreachable but not yet GCd ...
10 years, 1 month ago (2014-03-14 15:48:33 UTC) #17
khr1
And to the extent that this tool will be used for debugging GC, running the ...
10 years, 1 month ago (2014-03-14 15:49:22 UTC) #18
khr1
On Thu, Mar 13, 2014 at 9:25 PM, <rsc@golang.org> wrote: > > https://codereview.appspot.com/37540043/diff/430001/src/ > pkg/runtime/heapdump.c ...
10 years, 1 month ago (2014-03-14 15:56:16 UTC) #19
rsc
On Fri, Mar 14, 2014 at 11:56 AM, Keith Randall <khr@google.com> wrote: > On Thu, ...
10 years, 1 month ago (2014-03-14 15:57:51 UTC) #20
dvyukov
On Fri, Mar 14, 2014 at 7:57 PM, Russ Cox <rsc@golang.org> wrote: > On Fri, ...
10 years, 1 month ago (2014-03-14 16:08:38 UTC) #21
dvyukov
On Fri, Mar 14, 2014 at 7:49 PM, Keith Randall <khr@google.com> wrote: > And to ...
10 years, 1 month ago (2014-03-14 16:10:54 UTC) #22
rsc
If you want to dump only live data, call runtime.GC before dumping the heap.
10 years, 1 month ago (2014-03-14 16:14:16 UTC) #23
rsc
Also, in any event, this is only the raw dump. There will be tools to ...
10 years, 1 month ago (2014-03-14 16:15:13 UTC) #24
rsc
[again, replying all] On Fri, Mar 14, 2014 at 12:08 PM, Dmitry Vyukov <dvyukov@google.com> wrote: ...
10 years, 1 month ago (2014-03-14 16:18:49 UTC) #25
dvyukov
On Fri, Mar 14, 2014 at 8:18 PM, Russ Cox <rsc@golang.org> wrote: > [again, replying ...
10 years, 1 month ago (2014-03-14 16:37:46 UTC) #26
rsc
On Fri, Mar 14, 2014 at 12:36 PM, Dmitry Vyukov <dvyukov@google.com> wrote: > On Fri, ...
10 years, 1 month ago (2014-03-14 16:55:05 UTC) #27
dvyukov
On Fri, Mar 14, 2014 at 8:55 PM, Russ Cox <rsc@golang.org> wrote: > On Fri, ...
10 years, 1 month ago (2014-03-14 16:57:18 UTC) #28
khr1
So there's a problem with fixing false retention for slices. To fix the problem I ...
10 years, 1 month ago (2014-03-15 06:06:21 UTC) #29
khr
On 2014/03/15 06:06:21, khr1 wrote: > So there's a problem with fixing false retention for ...
10 years, 1 month ago (2014-03-24 21:53:11 UTC) #30
khr
On 2014/03/24 21:53:11, khr wrote: > On 2014/03/15 06:06:21, khr1 wrote: > > So there's ...
10 years, 1 month ago (2014-03-25 16:27:55 UTC) #31
rsc
LGTM https://codereview.appspot.com/37540043/diff/640002/src/pkg/runtime/debug/garbage.go File src/pkg/runtime/debug/garbage.go (right): https://codereview.appspot.com/37540043/diff/640002/src/pkg/runtime/debug/garbage.go#newcode151 src/pkg/runtime/debug/garbage.go:151: // it to the given file descriptor. // ...
10 years, 1 month ago (2014-03-25 19:37:50 UTC) #32
khr
10 years, 1 month ago (2014-03-25 22:09:52 UTC) #33
*** Submitted as https://code.google.com/p/go/source/detail?r=6815c401f8a1 ***

runtime: WriteHeapDump dumps the heap to a file.

See http://golang.org/s/go13heapdump for the file format.

LGTM=rsc
R=rsc, bradfitz, dvyukov, khr
CC=golang-codereviews
https://codereview.appspot.com/37540043
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b