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

Issue 4411045: code review 4411045: runtime: drop chan circular linked list in favor of cir... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 11 months ago by rsc
Modified:
12 years, 11 months ago
Reviewers:
ken3, dfc, r2, lvd
CC:
ken2, r, golang-dev
Visibility:
Public.

Description

runtime: drop chan circular linked list in favor of circular buffer The list elements are already being allocated out of a single memory buffer. We can drop the Link* pointer following and the memory it requires, replacing it with index operations. The change also keeps a channel from containing a pointer back into its own allocation block, which would create a cycle. Blocks involved in cycles are not guaranteed to be finalized properly, and channels depend on finalizers to free OS-level locks on some systems. The self-reference was keeping channels from being garbage collected. runtime-gdb.py will need to be updated in order to dump the content of buffered channels with the new data structure. Fixes issue 1676.

Patch Set 1 #

Patch Set 2 : diff -r fbb8752309fb https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r c7fd6d20426a https://go.googlecode.com/hg/ #

Patch Set 4 : diff -r c7fd6d20426a https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+66 lines, -51 lines) Patch
M src/cmd/ld/dwarf.c View 1 2 2 chunks +1 line, -12 lines 0 comments Download
M src/pkg/runtime/chan.c View 1 2 8 chunks +24 lines, -39 lines 0 comments Download
A test/gc2.go View 1 2 1 chunk +41 lines, -0 lines 0 comments Download

Messages

Total messages: 8
rsc
Hello ken2, r (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
12 years, 11 months ago (2011-04-14 03:36:43 UTC) #1
r
LGTM but i can't speak to the dwarf changes
12 years, 11 months ago (2011-04-14 03:39:48 UTC) #2
rsc
On Wed, Apr 13, 2011 at 23:39, <r@golang.org> wrote: > LGTM but i can't speak ...
12 years, 11 months ago (2011-04-14 03:41:52 UTC) #3
rsc
*** Submitted as http://code.google.com/p/go/source/detail?r=0637076c39bc *** runtime: drop chan circular linked list in favor of circular ...
12 years, 11 months ago (2011-04-14 03:42:08 UTC) #4
r2
+lvd On Apr 13, 2011, at 8:41 PM, Russ Cox wrote: > On Wed, Apr ...
12 years, 11 months ago (2011-04-14 03:43:38 UTC) #5
dfc
Thank you very much for this Ken. On Thu, Apr 14, 2011 at 1:43 PM, ...
12 years, 11 months ago (2011-04-14 03:49:15 UTC) #6
ken3
lgtm On 2011/04/14 03:49:15, dfc wrote: > Thank you very much for this Ken. > ...
12 years, 11 months ago (2011-04-14 21:59:30 UTC) #7
lvd
12 years, 11 months ago (2011-04-15 06:20:55 UTC) #8
already fixed http://code.google.com/p/go/source/detail?r=3706cf40a391

On Thu, Apr 14, 2011 at 05:43, Rob 'Commander' Pike <r@google.com> wrote:
> +lvd
>
> On Apr 13, 2011, at 8:41 PM, Russ Cox wrote:
>
>> On Wed, Apr 13, 2011 at 23:39,  <r@golang.org> wrote:
>>> LGTM but i can't speak to the dwarf changes
>>
>> The gdb stub at the least will need more work.
>> The dwarf changes are the minimal required
>> to keep 6l running (not looking for fields that no
>> longer exist).  I will leave any other changes for Luuk,
>> although I think they will be confined to
>> src/pkg/runtime/runtime-gdb.py.
>>
>> Russ
>
>
Sign in to reply to this message.

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