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

Issue 38750047: code review 38750047: runtime: combine small NoScan allocations (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 3 months ago by dvyukov
Modified:
11 years, 2 months ago
Reviewers:
gobot, iant, bradfitz
CC:
golang-codereviews, dave_cheney.net, iant, rsc, bradfitz, khr
Visibility:
Public.

Description

runtime: combine small NoScan allocations Combine NoScan allocations < 16 bytes into a single memory block. Reduces number of allocations on json/garbage benchmarks by 10+%. json-1 allocated 8039872 7949194 -1.13% allocs 105774 93776 -11.34% cputime 156200000 100700000 -35.53% gc-pause-one 4908873 3814853 -22.29% gc-pause-total 2748969 2899288 +5.47% rss 52674560 43560960 -17.30% sys-gc 3796976 3256304 -14.24% sys-heap 43843584 35192832 -19.73% sys-other 5589312 5310784 -4.98% sys-stack 393216 393216 +0.00% sys-total 53623088 44153136 -17.66% time 156193436 100886714 -35.41% virtual-mem 256548864 256540672 -0.00% garbage-1 allocated 2996885 2932982 -2.13% allocs 62904 55200 -12.25% cputime 17470000 17400000 -0.40% gc-pause-one 932757485 925806143 -0.75% gc-pause-total 4663787 4629030 -0.75% rss 1151074304 1133670400 -1.51% sys-gc 66068352 65085312 -1.49% sys-heap 1039728640 1024065536 -1.51% sys-other 38038208 37485248 -1.45% sys-stack 8650752 8781824 +1.52% sys-total 1152485952 1135417920 -1.48% time 17478088 17418005 -0.34% virtual-mem 1343709184 1324204032 -1.45%

Patch Set 1 #

Patch Set 2 : diff -r fecb13086239 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 3 : diff -r ea67ddaa02ef https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 4 : diff -r 3a08deffa322 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 5 : diff -r 3a08deffa322 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 6 : diff -r 50235ae4e784 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 7 : diff -r 50235ae4e784 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 8 : diff -r 50235ae4e784 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 9 : diff -r 50235ae4e784 https://dvyukov%40google.com@code.google.com/p/go/ #

Total comments: 8

Patch Set 10 : diff -r d795425bfa18 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 11 : diff -r 75adcf310434 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 12 : diff -r 75adcf310434 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 13 : diff -r 75adcf310434 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 14 : diff -r e4a4cb47c141 https://dvyukov%40google.com@code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+230 lines, -37 lines) Patch
M src/pkg/runtime/env_posix.c View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +13 lines, -2 lines 0 comments Download
M src/pkg/runtime/malloc.h View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
M src/pkg/runtime/malloc.goc View 1 2 3 4 5 6 7 8 9 10 9 chunks +120 lines, -21 lines 0 comments Download
M src/pkg/runtime/mgc0.c View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +13 lines, -3 lines 0 comments Download
M src/pkg/runtime/mheap.c View 1 2 3 2 chunks +4 lines, -2 lines 0 comments Download
M src/pkg/runtime/runtime.h View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -0 lines 0 comments Download
M src/pkg/sync/pool_test.go View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -2 lines 0 comments Download
M test/deferfin.go View 1 2 3 1 chunk +4 lines, -4 lines 0 comments Download
M test/fixedbugs/issue4618.go View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M test/fixedbugs/issue4667.go View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
A test/tinyfin.go View 1 2 3 4 5 6 7 8 1 chunk +62 lines, -0 lines 0 comments Download

Messages

Total messages: 15
dvyukov
Hello golang-codereviews@googlegroups.com, I'd like you to review this change to https://dvyukov%40google.com@code.google.com/p/go/
11 years, 3 months ago (2013-12-31 11:35:08 UTC) #1
dave_cheney.net
> On 31 Dec 2013, at 22:35, dvyukov@google.com wrote: > > Reviewers: golang-codereviews, > > ...
11 years, 3 months ago (2013-12-31 11:47:28 UTC) #2
dvyukov
On Tue, Dec 31, 2013 at 3:47 PM, Dave Cheney <dave@cheney.net> wrote: > > > ...
11 years, 3 months ago (2013-12-31 11:52:26 UTC) #3
dave_cheney.net
Ahh right. Thank you for the explanation On Tue, Dec 31, 2013 at 10:52 PM, ...
11 years, 3 months ago (2013-12-31 11:54:54 UTC) #4
dvyukov
If this is generally LGTM, then we also need finalizer support for such combined allocations. ...
11 years, 3 months ago (2013-12-31 12:33:53 UTC) #5
dvyukov
On 2013/12/31 12:33:53, dvyukov wrote: > If this is generally LGTM, then we also need ...
11 years, 2 months ago (2014-01-22 13:02:06 UTC) #6
iant
The code looks OK but I think you need a test with a finalizer on ...
11 years, 2 months ago (2014-01-22 16:26:12 UTC) #7
dvyukov
On 2014/01/22 16:26:12, iant wrote: > The code looks OK but I think you need ...
11 years, 2 months ago (2014-01-22 17:22:49 UTC) #8
iant
LGTM
11 years, 2 months ago (2014-01-22 18:59:28 UTC) #9
rsc
https://codereview.appspot.com/38750047/diff/160001/src/pkg/runtime/malloc.goc File src/pkg/runtime/malloc.goc (right): https://codereview.appspot.com/38750047/diff/160001/src/pkg/runtime/malloc.goc#newcode29 src/pkg/runtime/malloc.goc:29: enum please add a nice overview comment here about ...
11 years, 2 months ago (2014-01-22 19:18:13 UTC) #10
bradfitz
https://codereview.appspot.com/38750047/diff/160001/src/pkg/runtime/env_posix.c File src/pkg/runtime/env_posix.c (right): https://codereview.appspot.com/38750047/diff/160001/src/pkg/runtime/env_posix.c#newcode55 src/pkg/runtime/env_posix.c:55: if(len < 16) this is kinda gross, having this ...
11 years, 2 months ago (2014-01-23 00:03:24 UTC) #11
dvyukov
PTAL https://codereview.appspot.com/38750047/diff/160001/src/pkg/runtime/env_posix.c File src/pkg/runtime/env_posix.c (right): https://codereview.appspot.com/38750047/diff/160001/src/pkg/runtime/env_posix.c#newcode55 src/pkg/runtime/env_posix.c:55: if(len < 16) On 2014/01/23 00:03:24, bradfitz wrote: ...
11 years, 2 months ago (2014-01-23 16:44:12 UTC) #12
bradfitz
LGTM for *.go and env_posix.c
11 years, 2 months ago (2014-01-23 23:22:34 UTC) #13
dvyukov
*** Submitted as https://code.google.com/p/go/source/detail?r=54a5513d9d6a *** runtime: combine small NoScan allocations Combine NoScan allocations < 16 ...
11 years, 2 months ago (2014-01-24 18:35:58 UTC) #14
gobot
11 years, 2 months ago (2014-01-24 18:55:15 UTC) #15
Message was sent while issue was closed.
This CL appears to have broken the windows-amd64 builder.
Sign in to reply to this message.

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