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

Issue 21990045: code review 21990045: runtime: add an allocation and free tracing for gc debugging (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 4 months ago by cshapiro
Modified:
12 years, 3 months ago
Reviewers:
rsc
CC:
golang-dev, dvyukov, rsc, cshapiro1
Visibility:
Public.

Description

runtime: add an allocation and free tracing for gc debugging 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

Patch Set 1 #

Patch Set 2 : diff -r e081962da65c https://code.google.com/p/go/ #

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

Total comments: 7

Patch Set 4 : diff -r e081962da65c https://code.google.com/p/go/ #

Total comments: 6

Patch Set 5 : diff -r e081962da65c https://code.google.com/p/go/ #

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

Total comments: 2

Patch Set 7 : diff -r e081962da65c https://code.google.com/p/go/ #

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+65 lines, -6 lines) Patch
M src/pkg/runtime/extern.go View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M src/pkg/runtime/malloc.h View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/runtime/malloc.goc View 1 2 chunks +4 lines, -1 line 0 comments Download
M src/pkg/runtime/mprof.goc View 1 2 3 4 5 6 2 chunks +53 lines, -2 lines 0 comments Download
M src/pkg/runtime/runtime.h View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M src/pkg/runtime/runtime.c View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 14
cshapiro
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go/
12 years, 3 months ago (2013-11-12 21:58:06 UTC) #1
dvyukov
https://codereview.appspot.com/21990045/diff/40001/src/pkg/runtime/malloc.goc File src/pkg/runtime/malloc.goc (right): https://codereview.appspot.com/21990045/diff/40001/src/pkg/runtime/malloc.goc#newcode125 src/pkg/runtime/malloc.goc:125: if(runtime·debug.allocfreetrace) can we have this as enum as well? ...
12 years, 3 months ago (2013-11-14 08:26:45 UTC) #2
cshapiro
https://codereview.appspot.com/21990045/diff/40001/src/pkg/runtime/malloc.goc File src/pkg/runtime/malloc.goc (right): https://codereview.appspot.com/21990045/diff/40001/src/pkg/runtime/malloc.goc#newcode125 src/pkg/runtime/malloc.goc:125: if(runtime·debug.allocfreetrace) I'm not seeing this show up in a ...
12 years, 3 months ago (2013-11-14 21:32:17 UTC) #3
rsc
https://codereview.appspot.com/21990045/diff/40001/src/pkg/runtime/mprof.goc File src/pkg/runtime/mprof.goc (right): https://codereview.appspot.com/21990045/diff/40001/src/pkg/runtime/mprof.goc#newcode298 src/pkg/runtime/mprof.goc:298: name = typeinfoname(typ & 3); On 2013/11/14 21:32:18, cshapiro ...
12 years, 3 months ago (2013-11-15 17:02:12 UTC) #4
cshapiro1
PTAL
12 years, 3 months ago (2013-11-15 21:09:00 UTC) #5
cshapiro1
https://codereview.appspot.com/21990045/diff/60001/src/pkg/runtime/extern.go File src/pkg/runtime/extern.go (right): https://codereview.appspot.com/21990045/diff/60001/src/pkg/runtime/extern.go#newcode40 src/pkg/runtime/extern.go:40: profiled and a stack trace printed on each objects ...
12 years, 3 months ago (2013-11-15 21:09:10 UTC) #6
cshapiro
No idea why this comment was held back... https://codereview.appspot.com/21990045/diff/40001/src/pkg/runtime/mprof.goc File src/pkg/runtime/mprof.goc (right): https://codereview.appspot.com/21990045/diff/40001/src/pkg/runtime/mprof.goc#newcode298 src/pkg/runtime/mprof.goc:298: name ...
12 years, 3 months ago (2013-11-15 21:44:37 UTC) #7
rsc
https://codereview.appspot.com/21990045/diff/40001/src/pkg/runtime/mprof.goc File src/pkg/runtime/mprof.goc (right): https://codereview.appspot.com/21990045/diff/40001/src/pkg/runtime/mprof.goc#newcode298 src/pkg/runtime/mprof.goc:298: name = typeinfoname(typ & 3); On 2013/11/15 21:44:37, cshapiro ...
12 years, 3 months ago (2013-11-16 16:38:34 UTC) #8
cshapiro1
On Sat, Nov 16, 2013 at 8:38 AM, <rsc@golang.org> wrote: > No compiler could do ...
12 years, 3 months ago (2013-11-17 08:03:03 UTC) #9
rsc
On Sun, Nov 17, 2013 at 3:02 AM, Carl Shapiro <cshapiro@google.com> wrote: > On Sat, ...
12 years, 3 months ago (2013-11-18 21:34:30 UTC) #10
dvyukov
On Tue, Nov 19, 2013 at 1:34 AM, Russ Cox <rsc@golang.org> wrote: > On Sun, ...
12 years, 3 months ago (2013-11-19 02:20:24 UTC) #11
rsc
LGTM Much clearer, thanks. https://codereview.appspot.com/21990045/diff/100001/src/pkg/runtime/mprof.goc File src/pkg/runtime/mprof.goc (right): https://codereview.appspot.com/21990045/diff/100001/src/pkg/runtime/mprof.goc#newcode269 src/pkg/runtime/mprof.goc:269: uintptr frame; this isn't a ...
12 years, 3 months ago (2013-11-19 14:42:21 UTC) #12
cshapiro1
https://codereview.appspot.com/21990045/diff/100001/src/pkg/runtime/mprof.goc File src/pkg/runtime/mprof.goc (right): https://codereview.appspot.com/21990045/diff/100001/src/pkg/runtime/mprof.goc#newcode269 src/pkg/runtime/mprof.goc:269: uintptr frame; On 2013/11/19 14:42:22, rsc wrote: > this ...
12 years, 3 months ago (2013-11-19 19:40:54 UTC) #13
cshapiro
12 years, 3 months ago (2013-12-03 22:42:43 UTC) #14
*** Submitted as https://code.google.com/p/go/source/detail?r=5f2693e4cfb7 ***

runtime: add an allocation and free tracing for gc debugging

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://codereview.appspot.com/21990045
Sign in to reply to this message.

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