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

Issue 13314053: code review 13314053: runtime: use special records hung off the MSpan to (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 9 months ago by khr
Modified:
11 years, 6 months ago
Reviewers:
dvyukov
CC:
cshapiro1, khr1, dvyukov, gobot, golang-codereviews
Visibility:
Public.

Description

runtime: use special records hung off the MSpan to record finalizers and heap profile info. Enables removing the special bit from the heap bitmap. Also provides a generic mechanism for annotating occasional heap objects. finalizers overhead per obj old 680 B 80 B avg new 16 B/span 48 B profile overhead per obj old 32KB 24 B + hash tables new 16 B/span 24 B

Patch Set 1 #

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

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

Total comments: 2

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

Total comments: 1

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

Total comments: 12

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

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

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

Total comments: 7

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

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+307 lines, -458 lines) Patch
M src/pkg/runtime/malloc.h View 1 2 3 4 5 6 7 8 5 chunks +55 lines, -7 lines 0 comments Download
M src/pkg/runtime/malloc.goc View 1 2 3 4 5 6 7 8 6 chunks +11 lines, -12 lines 0 comments Download
R src/pkg/runtime/mfinal.c View 1 1 chunk +0 lines, -219 lines 0 comments Download
M src/pkg/runtime/mgc0.c View 1 2 3 4 5 11 chunks +55 lines, -85 lines 0 comments Download
M src/pkg/runtime/mheap.c View 1 2 3 4 5 6 7 8 3 chunks +178 lines, -0 lines 0 comments Download
M src/pkg/runtime/mprof.goc View 1 2 3 4 5 6 7 8 4 chunks +7 lines, -128 lines 0 comments Download
M src/pkg/runtime/proc.c View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M src/pkg/runtime/runtime.h View 1 2 3 4 5 2 chunks +1 line, -1 line 0 comments Download
M src/pkg/runtime/type.h View 1 2 3 4 2 chunks +0 lines, -5 lines 0 comments Download

Messages

Total messages: 17
cshapiro1
https://codereview.appspot.com/13314053/diff/6001/src/pkg/runtime/mgc0.c File src/pkg/runtime/mgc0.c (right): https://codereview.appspot.com/13314053/diff/6001/src/pkg/runtime/mgc0.c#newcode1679 src/pkg/runtime/mgc0.c:1679: // free any special records for this object. This ...
11 years, 9 months ago (2013-09-24 21:56:17 UTC) #1
khr1
On Tue, Sep 24, 2013 at 2:56 PM, <cshapiro@google.com> wrote: > > https://codereview.appspot.**com/13314053/diff/6001/src/** > pkg/runtime/mgc0.c<https://codereview.appspot.com/13314053/diff/6001/src/pkg/runtime/mgc0.c> ...
11 years, 9 months ago (2013-09-24 22:56:58 UTC) #2
cshapiro1
On Tue, Sep 24, 2013 at 3:56 PM, Keith Randall <khr@google.com> wrote: > This isn't ...
11 years, 9 months ago (2013-09-24 23:28:17 UTC) #3
cshapiro1
The special sweeping looks much nicer now. https://codereview.appspot.com/13314053/diff/13001/src/pkg/runtime/mheap.c File src/pkg/runtime/mheap.c (right): https://codereview.appspot.com/13314053/diff/13001/src/pkg/runtime/mheap.c#newcode557 src/pkg/runtime/mheap.c:557: Lock speciallock; ...
11 years, 9 months ago (2013-09-25 22:16:33 UTC) #4
khr1
On Wed, Sep 25, 2013 at 3:16 PM, <cshapiro@google.com> wrote: > The special sweeping looks ...
11 years, 9 months ago (2013-09-25 22:49:58 UTC) #5
dvyukov
generally looks good, I think it's the right direction this flexible "specials" infrastructure will also ...
11 years, 6 months ago (2013-12-27 16:18:27 UTC) #6
dvyukov
and I think it's time to mail it
11 years, 6 months ago (2013-12-27 16:18:43 UTC) #7
khr1
On Fri, Dec 27, 2013 at 8:18 AM, <dvyukov@google.com> wrote: > generally looks good, I ...
11 years, 6 months ago (2013-12-31 20:58:37 UTC) #8
khr1
On Tue, Dec 31, 2013 at 12:58 PM, Keith Randall <khr@google.com> wrote: > > > ...
11 years, 6 months ago (2013-12-31 21:34:05 UTC) #9
khr
Hello cshapiro@google.com, khr@google.com, dvyukov@google.com (cc: golang-codereviews@googlegroups.com), I'd like you to review this change to https://khr%40golang.org@code.google.com/p/go/
11 years, 6 months ago (2013-12-31 21:37:19 UTC) #10
dvyukov
LGTM https://codereview.appspot.com/13314053/diff/19001/src/pkg/runtime/mgc0.c File src/pkg/runtime/mgc0.c (right): https://codereview.appspot.com/13314053/diff/19001/src/pkg/runtime/mgc0.c#newcode1747 src/pkg/runtime/mgc0.c:1747: while(special != nil) { On 2013/12/27 16:18:27, dvyukov ...
11 years, 6 months ago (2014-01-01 11:39:03 UTC) #11
dvyukov
On 2013/12/31 21:34:05, khr1 wrote: > >> https://codereview.appspot.com/13314053/diff/19001/src/ > >> pkg/runtime/mheap.c#newcode721 > >> src/pkg/runtime/mheap.c:721: if(offset ...
11 years, 6 months ago (2014-01-01 11:40:37 UTC) #12
khr1
On Wed, Jan 1, 2014 at 3:39 AM, <dvyukov@google.com> wrote: > LGTM > > > ...
11 years, 6 months ago (2014-01-05 05:54:17 UTC) #13
khr1
Well, we could do that anyway. In malloc.goc:SetFinalizer, we call mlookup which finds the MSpan. ...
11 years, 6 months ago (2014-01-05 05:54:31 UTC) #14
dvyukov
LGTM
11 years, 6 months ago (2014-01-05 08:50:48 UTC) #15
gobot
R=dvyukov@google.com (assigned by rsc@golang.org)
11 years, 6 months ago (2014-01-07 02:32:07 UTC) #16
khr
11 years, 6 months ago (2014-01-07 21:45:54 UTC) #17
*** Submitted as https://code.google.com/p/go/source/detail?r=0dee786a73f7 ***

runtime: use special records hung off the MSpan to
record finalizers and heap profile info.  Enables
removing the special bit from the heap bitmap.  Also
provides a generic mechanism for annotating occasional
heap objects.

finalizers
        overhead      per obj
old	680 B	      80 B avg
new	16 B/span     48 B

profile
        overhead      per obj
old	32KB	      24 B + hash tables
new	16 B/span     24 B

R=cshapiro, khr, dvyukov, gobot
CC=golang-codereviews
https://codereview.appspot.com/13314053
Sign in to reply to this message.

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