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

Issue 9786044: code review 9786044: runtime: flag static variables as no-pointers (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 1 month ago by atom
Modified:
12 years, 1 month ago
Reviewers:
dvyukov
CC:
golang-dev, dvyukov, minux1
Visibility:
Public.

Description

runtime: flag static variables as no-pointers Variables in data sections of 32-bit executables interfere with garbage collector's ability to free objects and/or unnecessarily slow down the garbage collector. This changeset moves some static variables to .noptr sections. 'files' in symtab.c is now allocated dynamically.

Patch Set 1 #

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

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

Total comments: 5

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

Total comments: 4

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

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -7 lines) Patch
M src/pkg/runtime/hashmap.c View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/pkg/runtime/os_darwin.c View 1 2 chunks +2 lines, -0 lines 0 comments Download
M src/pkg/runtime/os_freebsd.c View 1 2 chunks +2 lines, -0 lines 0 comments Download
M src/pkg/runtime/os_linux.c View 1 3 chunks +3 lines, -0 lines 0 comments Download
M src/pkg/runtime/os_netbsd.c View 1 2 chunks +2 lines, -0 lines 0 comments Download
M src/pkg/runtime/os_openbsd.c View 1 2 chunks +2 lines, -0 lines 0 comments Download
M src/pkg/runtime/os_plan9.c View 1 2 chunks +2 lines, -0 lines 0 comments Download
M src/pkg/runtime/os_windows.c View 1 1 chunk +2 lines, -0 lines 0 comments Download
M src/pkg/runtime/symtab.c View 1 2 3 4 5 chunks +14 lines, -7 lines 0 comments Download

Messages

Total messages: 17
atom
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go/
12 years, 1 month ago (2013-05-26 16:05:34 UTC) #1
dvyukov
Does not linker figure out that an array of int8 is NoPointers?
12 years, 1 month ago (2013-05-26 16:11:06 UTC) #2
minux1
On Mon, May 27, 2013 at 12:11 AM, <dvyukov@google.com> wrote: > Does not linker figure ...
12 years, 1 month ago (2013-05-26 16:12:34 UTC) #3
minux1
https://codereview.appspot.com/9786044/diff/5001/src/pkg/runtime/symtab.c File src/pkg/runtime/symtab.c (left): https://codereview.appspot.com/9786044/diff/5001/src/pkg/runtime/symtab.c#oldcode322 src/pkg/runtime/symtab.c:322: } files[200]; why use malloc for files?
12 years, 1 month ago (2013-05-26 16:14:22 UTC) #4
dvyukov
https://codereview.appspot.com/9786044/diff/5001/src/pkg/runtime/symtab.c File src/pkg/runtime/symtab.c (right): https://codereview.appspot.com/9786044/diff/5001/src/pkg/runtime/symtab.c#newcode316 src/pkg/runtime/symtab.c:316: const int32 maxfiles = 200; we do not use ...
12 years, 1 month ago (2013-05-26 16:16:06 UTC) #5
dvyukov
On 2013/05/26 16:14:22, minux wrote: > https://codereview.appspot.com/9786044/diff/5001/src/pkg/runtime/symtab.c > File src/pkg/runtime/symtab.c (left): > > https://codereview.appspot.com/9786044/diff/5001/src/pkg/runtime/symtab.c#oldcode322 > ...
12 years, 1 month ago (2013-05-26 16:17:14 UTC) #6
dvyukov
On 2013/05/26 16:12:34, minux wrote: > On Mon, May 27, 2013 at 12:11 AM, <mailto:dvyukov@google.com> ...
12 years, 1 month ago (2013-05-26 16:18:17 UTC) #7
atom
On 2013/05/26 16:17:14, dvyukov wrote: > On 2013/05/26 16:14:22, minux wrote: > > https://codereview.appspot.com/9786044/diff/5001/src/pkg/runtime/symtab.c > ...
12 years, 1 month ago (2013-05-26 16:20:45 UTC) #8
minux1
On Mon, May 27, 2013 at 12:17 AM, <dvyukov@google.com> wrote: > On 2013/05/26 16:14:22, minux ...
12 years, 1 month ago (2013-05-26 16:22:45 UTC) #9
atom
https://codereview.appspot.com/9786044/diff/5001/src/pkg/runtime/symtab.c File src/pkg/runtime/symtab.c (right): https://codereview.appspot.com/9786044/diff/5001/src/pkg/runtime/symtab.c#newcode316 src/pkg/runtime/symtab.c:316: const int32 maxfiles = 200; On 2013/05/26 16:16:06, dvyukov ...
12 years, 1 month ago (2013-05-26 16:24:01 UTC) #10
dvyukov
https://codereview.appspot.com/9786044/diff/5001/src/pkg/runtime/symtab.c File src/pkg/runtime/symtab.c (right): https://codereview.appspot.com/9786044/diff/5001/src/pkg/runtime/symtab.c#newcode316 src/pkg/runtime/symtab.c:316: const int32 maxfiles = 200; On 2013/05/26 16:24:01, atom ...
12 years, 1 month ago (2013-05-26 16:28:33 UTC) #11
atom
On 2013/05/26 16:22:45, minux wrote: > On Mon, May 27, 2013 at 12:17 AM, <mailto:dvyukov@google.com> ...
12 years, 1 month ago (2013-05-26 16:33:42 UTC) #12
atom
https://codereview.appspot.com/9786044/diff/5001/src/pkg/runtime/symtab.c File src/pkg/runtime/symtab.c (right): https://codereview.appspot.com/9786044/diff/5001/src/pkg/runtime/symtab.c#newcode316 src/pkg/runtime/symtab.c:316: const int32 maxfiles = 200; On 2013/05/26 16:28:33, dvyukov ...
12 years, 1 month ago (2013-05-26 16:37:16 UTC) #13
dvyukov
LGTM with nitpicks https://codereview.appspot.com/9786044/diff/15001/src/pkg/runtime/symtab.c File src/pkg/runtime/symtab.c (right): https://codereview.appspot.com/9786044/diff/15001/src/pkg/runtime/symtab.c#newcode310 src/pkg/runtime/symtab.c:310: static struct { { on next ...
12 years, 1 month ago (2013-05-26 16:41:26 UTC) #14
atom
https://codereview.appspot.com/9786044/diff/15001/src/pkg/runtime/symtab.c File src/pkg/runtime/symtab.c (right): https://codereview.appspot.com/9786044/diff/15001/src/pkg/runtime/symtab.c#newcode310 src/pkg/runtime/symtab.c:310: static struct { On 2013/05/26 16:41:26, dvyukov wrote: > ...
12 years, 1 month ago (2013-05-26 16:47:37 UTC) #15
atom
On 2013/05/26 16:41:26, dvyukov wrote: > LGTM with nitpicks > > https://codereview.appspot.com/9786044/diff/15001/src/pkg/runtime/symtab.c > File src/pkg/runtime/symtab.c ...
12 years, 1 month ago (2013-05-26 18:06:23 UTC) #16
atom
12 years, 1 month ago (2013-05-27 06:12:26 UTC) #17
*** Submitted as https://code.google.com/p/go/source/detail?r=e6c4fa4c0c25 ***

runtime: flag static variables as no-pointers

Variables in data sections of 32-bit executables interfere with
garbage collector's ability to free objects and/or unnecessarily
slow down the garbage collector.

This changeset moves some static variables to .noptr sections.
'files' in symtab.c is now allocated dynamically.

R=golang-dev, dvyukov, minux.ma
CC=golang-dev
https://codereview.appspot.com/9786044
Sign in to reply to this message.

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