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

Issue 5489128: code review 5489128: gc: avoid false positives when using scalar struct fields. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 4 months ago by remyoudompheng
Modified:
12 years, 3 months ago
Reviewers:
CC:
lvd, rsc, golang-dev, remy_archlinux.org
Visibility:
Public.

Description

gc: avoid false positives when using scalar struct fields. The escape analysis code does not make a distinction between scalar and pointers fields in structs. Non-pointer fields that escape should not make the whole struct escape.

Patch Set 1 #

Patch Set 2 : code review 5489128: gc: avoid false positives when using scalar struct fields. #

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

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

Total comments: 1

Patch Set 5 : diff -r 9321a5705307 https://go.googlecode.com/hg/ #

Total comments: 2

Patch Set 6 : diff -r c59e44d5c566 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+41 lines, -7 lines) Patch
M src/cmd/gc/esc.c View 1 2 3 4 5 1 chunk +5 lines, -1 line 0 comments Download
M test/escape2.go View 1 2 3 4 5 4 chunks +36 lines, -6 lines 0 comments Download

Messages

Total messages: 15
remyoudompheng
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com, remy@archlinux.org), I'd like you to review this change to https://go.googlecode.com/hg/
12 years, 4 months ago (2011-12-31 11:15:40 UTC) #1
remyoudompheng
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com, remy@archlinux.org), Please take another look.
12 years, 4 months ago (2011-12-31 11:17:55 UTC) #2
lvd
thanks! LGTM but wait for rsc to get back from holiday. http://codereview.appspot.com/5489128/diff/2006/src/cmd/gc/esc.c File src/cmd/gc/esc.c (right): ...
12 years, 4 months ago (2012-01-04 08:38:15 UTC) #3
remyoudompheng
Hello golang-dev@googlegroups.com, lvd@google.com (cc: golang-dev@googlegroups.com, remy@archlinux.org), Please take another look.
12 years, 4 months ago (2012-01-04 10:09:01 UTC) #4
rsc
very nice, thanks. http://codereview.appspot.com/5489128/diff/7001/src/cmd/gc/esc.c File src/cmd/gc/esc.c (right): http://codereview.appspot.com/5489128/diff/7001/src/cmd/gc/esc.c#newcode473 src/cmd/gc/esc.c:473: if(src->type && !haspointers(src->type)) This is great, ...
12 years, 3 months ago (2012-01-10 04:31:16 UTC) #5
lvd
i think the return is correct. and the comment should s/from/to On Jan 10, 2012 ...
12 years, 3 months ago (2012-01-10 07:17:14 UTC) #6
rsc
On Mon, Jan 9, 2012 at 23:17, Luuk van Dijk <lvd@google.com> wrote: > i think ...
12 years, 3 months ago (2012-01-10 07:51:26 UTC) #7
lvd
i shouldnt try to review code on my phone. On Jan 10, 2012 8:51 AM, ...
12 years, 3 months ago (2012-01-10 08:53:44 UTC) #8
lvd
On Tue, Jan 10, 2012 at 09:53, Luuk van Dijk <lvd@google.com> wrote: > i shouldnt ...
12 years, 3 months ago (2012-01-10 13:30:57 UTC) #9
remyoudompheng
and added tests suggested by Luuk. http://codereview.appspot.com/5489128/diff/7001/src/cmd/gc/esc.c File src/cmd/gc/esc.c (right): http://codereview.appspot.com/5489128/diff/7001/src/cmd/gc/esc.c#newcode473 src/cmd/gc/esc.c:473: if(src->type && !haspointers(src->type)) ...
12 years, 3 months ago (2012-01-10 20:16:57 UTC) #10
rsc
hg mail?
12 years, 3 months ago (2012-01-10 20:54:47 UTC) #11
remyoudompheng
Hello lvd@google.com, rsc@golang.org (cc: golang-dev@googlegroups.com, remy@archlinux.org), Please take another look.
12 years, 3 months ago (2012-01-10 21:10:19 UTC) #12
remyoudompheng
On 2012/01/10 21:10:19, remyoudompheng wrote: > Please take another look. Does it look OK now? ...
12 years, 3 months ago (2012-01-11 21:49:51 UTC) #13
lvd
On Wed, Jan 11, 2012 at 22:49, <remyoudompheng@gmail.com> wrote: > On 2012/01/10 21:10:19, remyoudompheng wrote: ...
12 years, 3 months ago (2012-01-12 11:05:56 UTC) #14
lvd
12 years, 3 months ago (2012-01-12 11:08:45 UTC) #15
*** Submitted as http://code.google.com/p/go/source/detail?r=cf2fb43dedaa ***

gc: avoid false positives when using scalar struct fields.

The escape analysis code does not make a distinction between
scalar and pointers fields in structs. Non-pointer fields
that escape should not make the whole struct escape.

R=lvd, rsc
CC=golang-dev, remy
http://codereview.appspot.com/5489128

Committer: Luuk van Dijk <lvd@golang.org>
Sign in to reply to this message.

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