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

Issue 12328044: code review 12328044: cmd/cc, cmd/gc, runtime: emit bitmaps for scanning locals. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 7 months ago by cshapiro1
Modified:
11 years, 7 months ago
Reviewers:
dave, rsc
CC:
rsc, golang-dev
Visibility:
Public.

Description

cmd/cc, cmd/gc, runtime: emit bitmaps for scanning locals. Previously, all word aligned locations in the local variables area were scanned as conservative roots. With this change, a bitmap is generated describing the locations of pointer values in local variables. With this change the argument bitmap information has been changed to only store information about arguments. The locals member, has been removed. In its place, the bitmap data for local variables is now used to store the size of locals. If the size is negative, the magnitude indicates the size of the local variables area.

Patch Set 1 #

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

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

Total comments: 15

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

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

Total comments: 4

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

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+140 lines, -74 lines) Patch
M src/cmd/cc/pgen.c View 1 2 3 3 chunks +20 lines, -6 lines 0 comments Download
M src/cmd/gc/pgen.c View 1 2 3 5 chunks +65 lines, -32 lines 0 comments Download
M src/pkg/runtime/funcdata.h View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M src/pkg/runtime/mgc0.c View 1 2 3 4 5 1 chunk +53 lines, -35 lines 0 comments Download

Messages

Total messages: 17
cshapiro1
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go/
11 years, 7 months ago (2013-08-03 00:10:11 UTC) #1
rsc
Looks pretty good. I was hoping that there would be just a single FUNCDATA for ...
11 years, 7 months ago (2013-08-03 01:01:36 UTC) #2
rsc
https://codereview.appspot.com/12328044/diff/5001/src/cmd/gc/pgen.c File src/cmd/gc/pgen.c (left): https://codereview.appspot.com/12328044/diff/5001/src/cmd/gc/pgen.c#oldcode187 src/cmd/gc/pgen.c:187: off = 0; Specifically, if dumpgcargs and dumpgclocals return ...
11 years, 7 months ago (2013-08-03 01:11:04 UTC) #3
cshapiro1
If I understand your comment in src/cmd/gc/pgen.c correctly, the data would end up looking like ...
11 years, 7 months ago (2013-08-03 01:53:43 UTC) #4
rsc
On Fri, Aug 2, 2013 at 9:53 PM, <cshapiro@google.com> wrote: > If I understand your ...
11 years, 7 months ago (2013-08-03 02:06:22 UTC) #5
cshapiro1
On Fri, Aug 2, 2013 at 7:06 PM, Russ Cox <rsc@golang.org> wrote: > Almost. The ...
11 years, 7 months ago (2013-08-03 02:19:00 UTC) #6
rsc
https://codereview.appspot.com/12328044/diff/5001/src/cmd/gc/pgen.c File src/cmd/gc/pgen.c (right): https://codereview.appspot.com/12328044/diff/5001/src/cmd/gc/pgen.c#newcode172 src/cmd/gc/pgen.c:172: dumpgcargs(fn, gcargssym); can this move down next to dumpglocals, ...
11 years, 7 months ago (2013-08-03 03:15:30 UTC) #7
cshapiro1
PTAL https://codereview.appspot.com/12328044/diff/5001/src/cmd/gc/pgen.c File src/cmd/gc/pgen.c (right): https://codereview.appspot.com/12328044/diff/5001/src/cmd/gc/pgen.c#newcode172 src/cmd/gc/pgen.c:172: dumpgcargs(fn, gcargssym); On 2013/08/03 03:15:31, rsc wrote: > ...
11 years, 7 months ago (2013-08-06 00:05:36 UTC) #8
rsc
LGTM with changes I assume the next step (in a different CL) is to emit ...
11 years, 7 months ago (2013-08-06 17:11:40 UTC) #9
cshapiro1
I will submit this change shortly. https://codereview.appspot.com/12328044/diff/21001/src/pkg/runtime/mgc0.c File src/pkg/runtime/mgc0.c (right): https://codereview.appspot.com/12328044/diff/21001/src/pkg/runtime/mgc0.c#newcode1408 src/pkg/runtime/mgc0.c:1408: for(i = MIN(remptrs, ...
11 years, 7 months ago (2013-08-07 19:36:25 UTC) #10
cshapiro1
*** Submitted as https://code.google.com/p/go/source/detail?r=d91993212194 *** cmd/cc, cmd/gc, runtime: emit bitmaps for scanning locals. Previously, all ...
11 years, 7 months ago (2013-08-07 19:47:04 UTC) #11
dave_cheney.net
On 2013/08/07 19:47:04, cshapiro1 wrote: > *** Submitted as https://code.google.com/p/go/source/detail?r=d91993212194 *** > > cmd/cc, cmd/gc, ...
11 years, 7 months ago (2013-08-08 00:50:10 UTC) #12
cshapiro1
On Wed, Aug 7, 2013 at 5:50 PM, <dave@cheney.net> wrote: > I think CL is ...
11 years, 7 months ago (2013-08-08 01:03:43 UTC) #13
dave_cheney.net
My panda has ~800 mb free, the rpi on to its right < 400 [2196103.666107] ...
11 years, 7 months ago (2013-08-08 01:05:19 UTC) #14
cshapiro1
On Wed, Aug 7, 2013 at 6:05 PM, Dave Cheney <dave@cheney.net> wrote: > My panda ...
11 years, 7 months ago (2013-08-08 01:13:06 UTC) #15
dave_cheney.net
I think the other panda builder has some swap. Combined with the linux overcommit behavior, ...
11 years, 7 months ago (2013-08-08 01:26:52 UTC) #16
dave_cheney.net
11 years, 7 months ago (2013-08-08 02:03:44 UTC) #17
Looks pretty bad, this isn't an arm only thing.

https://code.google.com/p/go/issues/detail?id=6077

On Thu, Aug 8, 2013 at 11:26 AM, Dave Cheney <dave@cheney.net> wrote:
> I think the other panda builder has some swap. Combined with the linux
> overcommit behavior, means you can allocate gigabytes.
>
> On Thu, Aug 8, 2013 at 11:12 AM, Carl Shapiro <cshapiro@google.com> wrote:
>> On Wed, Aug 7, 2013 at 6:05 PM, Dave Cheney <dave@cheney.net> wrote:
>>>
>>> My panda has ~800 mb free, the rpi on to its right < 400
>>>
>>> [2196103.666107] Out of memory: Kill process 31904 (5g) score 843 or
>>> sacrifice child
>>> [2196103.674072] Killed process 31904 (5g) total-vm:846788kB,
>>> anon-rss:843692kB, file-rss:8kB
>>
>>
>> Interesting.  The ARM machine I use for testing has about 1.3gb free which
>> might explain why I have not observe an OOM.  I will take a close look at
>> this later tonight.  Hopefully, something will jump out.
>>
Sign in to reply to this message.

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