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

Issue 155760043: code review 155760043: runtime: clear stale values from G.param and SudoG.elem (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 5 months ago by rsc
Modified:
10 years, 5 months ago
Reviewers:
gobot, khr, dvyukov
CC:
golang-codereviews, khr, iant, r, rlh
Visibility:
Public.

Description

runtime: clear stale values from G.param and SudoG.elem This change was necessary on the dev.garbage branch to keep the garbage collector from seeing pointers into invalid heap areas. On this default (Go 1.4) branch, the change removes some possibility for memory leaks.

Patch Set 1 #

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

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

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

Total comments: 2

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -2 lines) Patch
M src/runtime/chan.go View 1 6 chunks +9 lines, -2 lines 0 comments Download
M src/runtime/proc.go View 1 2 3 4 2 chunks +10 lines, -0 lines 0 comments Download
M src/runtime/select.go View 1 4 chunks +7 lines, -0 lines 0 comments Download
M src/runtime/sema.go View 1 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 8
rsc
Hello golang-codereviews@googlegroups.com (cc: iant, iant@golang.org, khr, r, r@golang.org, rlh, rlh@golang.org), I'd like you to review ...
10 years, 5 months ago (2014-10-03 16:27:48 UTC) #1
khr
LGTM. https://codereview.appspot.com/155760043/diff/60001/src/runtime/proc.go File src/runtime/proc.go (right): https://codereview.appspot.com/155760043/diff/60001/src/runtime/proc.go#newcode168 src/runtime/proc.go:168: if p.elem != nil { If new is ...
10 years, 5 months ago (2014-10-03 17:17:34 UTC) #2
rsc
https://codereview.appspot.com/155760043/diff/60001/src/runtime/proc.go File src/runtime/proc.go (right): https://codereview.appspot.com/155760043/diff/60001/src/runtime/proc.go#newcode168 src/runtime/proc.go:168: if p.elem != nil { On 2014/10/03 17:17:34, khr ...
10 years, 5 months ago (2014-10-03 17:32:55 UTC) #3
rsc
*** Submitted as https://code.google.com/p/go/source/detail?r=08ccd14a4d7e *** runtime: clear stale values from G.param and SudoG.elem This change ...
10 years, 5 months ago (2014-10-03 17:36:50 UTC) #4
gobot
This changed caused perf changes on linux-amd64-perf: http-4 old new delta sys-gc 1312851 1247315 -4.99 ...
10 years, 5 months ago (2014-10-03 23:57:05 UTC) #5
gobot
This CL appears to have broken the netbsd-amd64-bsiegert builder. See http://build.golang.org/log/6d8efcddaccee8532c4984e45e793ea051286865
10 years, 5 months ago (2014-10-04 00:22:45 UTC) #6
dvyukov
> On this default (Go 1.4) branch, the change removes some possibility for memory leaks. ...
10 years, 5 months ago (2014-10-04 07:16:31 UTC) #7
rsc
10 years, 5 months ago (2014-10-06 18:47:56 UTC) #8
On Sat, Oct 4, 2014 at 3:16 AM, <dvyukov@google.com> wrote:

> On this default (Go 1.4) branch, the change removes some possibility
>>
> for memory leaks.
>
> We clear sudog pool before GC. So GC never scans any free sudog.
>

Yes it does. There are stale links in G.param. I'm not just fixing things
because I feel like it. I am fixing things because they are broken.

Russ
Sign in to reply to this message.

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