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

Issue 84740043: code review 84740043: runtime: make sure associated defers are copyable befor... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 2 months ago by khr
Modified:
11 years, 1 month ago
CC:
golang-codereviews, rsc
Visibility:
Public.

Description

runtime: make sure associated defers are copyable before trying to copy a stack. Defers generated from cgo lie to us about their argument layout. Mark those defers as not copyable. CL 83820043 contains an additional test for this code and should be checked in (and enabled) after this change is in. Fixes bug 7695.

Patch Set 1 #

Patch Set 2 : diff -r a6073283d113 https://khr%40golang.org@code.google.com/p/go/ #

Patch Set 3 : diff -r a6073283d113 https://khr%40golang.org@code.google.com/p/go/ #

Patch Set 4 : diff -r a6073283d113 https://khr%40golang.org@code.google.com/p/go/ #

Patch Set 5 : diff -r bbf841e16510 https://khr%40golang.org@code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+74 lines, -12 lines) Patch
M src/pkg/runtime/stack.c View 1 2 9 chunks +57 lines, -12 lines 0 comments Download
M src/pkg/runtime/stack_test.go View 1 2 1 chunk +17 lines, -0 lines 0 comments Download

Messages

Total messages: 38
khr
Hello golang-codereviews@googlegroups.com, I'd like you to review this change to https://khr%40golang.org@code.google.com/p/go/
11 years, 2 months ago (2014-04-04 23:58:08 UTC) #1
rsc
LGTM
11 years, 2 months ago (2014-04-07 13:59:29 UTC) #2
khr
*** Submitted as https://code.google.com/p/go/source/detail?r=3374b2b0759f *** runtime: make sure associated defers are copyable before trying to ...
11 years, 2 months ago (2014-04-08 00:40:12 UTC) #3
gobot
This CL appears to have broken the plan9-386-cnielsen builder. See http://build.golang.org/log/5af19cbb425255754504a6923b865189d457e852
11 years, 2 months ago (2014-04-08 01:20:06 UTC) #4
0intro
It seems TestDeferPtrs can run rather slowly, which lead the parallel runtime test to time ...
11 years, 2 months ago (2014-04-08 05:50:52 UTC) #5
rsc
On OS X: g% 386 go test -v -run TestDeferPtrs -cpu=1,2,4 -short === RUN TestDeferPtrs ...
11 years, 2 months ago (2014-04-08 14:42:21 UTC) #6
0intro
> The fact that the slowdown you see varies so much with GOMAXPROCS > suggests ...
11 years, 2 months ago (2014-04-08 17:58:26 UTC) #7
rsc
What does 'time' say about user vs sys vs real?
11 years, 2 months ago (2014-04-08 18:05:36 UTC) #8
0intro
> What does 'time' say about user vs sys vs real? cpu% time go test ...
11 years, 2 months ago (2014-04-08 18:16:26 UTC) #9
rsc
does plan 9 have a system call tracer now?
11 years, 2 months ago (2014-04-08 18:24:28 UTC) #10
0intro
> does plan 9 have a system call tracer now? Yes, Ron Minnich implemented ratrace ...
11 years, 2 months ago (2014-04-08 18:28:29 UTC) #11
0intro
It is also quite surprising the results are better on slower machines (running almost the ...
11 years, 2 months ago (2014-04-08 18:29:42 UTC) #12
0intro
Here is the trace (15 MB) when running: ratrace -c runtime.test -test.run TestDeferPtrs -test.cpu 1,2,4 ...
11 years, 2 months ago (2014-04-08 19:22:06 UTC) #13
0intro
And naturally, the test is much faster when ran through ratrace. -- David du Colombier
11 years, 2 months ago (2014-04-08 19:31:44 UTC) #14
rsc
How much is much faster?
11 years, 2 months ago (2014-04-08 19:33:05 UTC) #15
0intro
> How much is much faster? On the trace I uploaded, I get: --- PASS: ...
11 years, 2 months ago (2014-04-08 19:39:00 UTC) #16
rsc
FWIW, the trace is malformed. This is typical: 224014 runtime.test Sleep 2af87 1224020 runtime.test Tsemacquire ...
11 years, 2 months ago (2014-04-08 20:41:00 UTC) #17
0intro
With your CL 85430046 applied, I get: 1 Errstr 1 Exits 1 Notify 5 Close ...
11 years, 2 months ago (2014-04-08 21:45:09 UTC) #18
rsc
Can you run -cpu=1 -cpu=2 and -cpu=4 separately and see whether the shape of the ...
11 years, 2 months ago (2014-04-08 22:32:11 UTC) #19
0intro
> Can you run -cpu=1 -cpu=2 and -cpu=4 separately and see whether the > shape ...
11 years, 2 months ago (2014-04-08 22:55:56 UTC) #20
rsc
It may not be relevant, but maybe it is. I still want to see why ...
11 years, 2 months ago (2014-04-09 02:34:45 UTC) #21
0intro
> sysmon - 1 per cycle (10ms) > proc.c:2542: now = runtime·nanotime(); As expected, this ...
11 years, 2 months ago (2014-04-09 06:36:45 UTC) #22
dvyukov
GC calls nanotime 6 times. If that is expensive, then there is an issue in ...
11 years, 2 months ago (2014-04-09 06:51:05 UTC) #23
0intro
Nanotime is much cheaper when implemented as a syscall. It's pour intention to move to ...
11 years, 2 months ago (2014-04-09 07:03:14 UTC) #24
rminnich
Yes, the improvement that comes with a syscall is dramatic, both in terms of overhead ...
11 years, 2 months ago (2014-04-09 08:31:54 UTC) #25
aram2
On Wed, Apr 9, 2014 at 9:03 AM, David du Colombier <0intro@gmail.com> wrote: > once ...
11 years, 2 months ago (2014-04-09 09:07:39 UTC) #26
rsc
I missed that growStackIter in stack_test.go calls GC. That explains why there are so many ...
11 years, 2 months ago (2014-04-09 14:31:39 UTC) #27
aram2
On Wed, Apr 9, 2014 at 4:31 PM, Russ Cox <rsc@golang.org> wrote: > assuming the ...
11 years, 2 months ago (2014-04-09 15:34:29 UTC) #28
0intro
I've submitted the patch to Plan 9 only few months ago. It's hasn't be accepted ...
11 years, 2 months ago (2014-04-09 16:08:46 UTC) #29
rsc
Okay, well if it's not in the standard kernel then obviously don't worry about it. ...
11 years, 2 months ago (2014-04-09 16:30:03 UTC) #30
0intro
> The GODEBUG=gctrace=1 output will tell us more. Here are the gc traces with -cpu=1 ...
11 years, 2 months ago (2014-04-09 17:43:20 UTC) #31
rsc
[non-plan9 guys moved to bcc] On Wed, Apr 9, 2014 at 1:42 PM, David du ...
11 years, 2 months ago (2014-04-09 19:16:34 UTC) #32
0intro
Here are the gc traces with the new print: http://www.9legacy.org/go/doc/gctrace.print.1 http://www.9legacy.org/go/doc/gctrace.print.2 http://www.9legacy.org/go/doc/gctrace.print.4 -- David du ...
11 years, 2 months ago (2014-04-09 19:42:58 UTC) #33
rsc
Here is a bug. Whether it's "the" bug is unclear. In os_plan9.c it says: int32 ...
11 years, 2 months ago (2014-04-09 19:49:21 UTC) #34
0intro
> Here is a bug. Whether it's "the" bug is unclear. Amazing find! It really ...
11 years, 2 months ago (2014-04-09 20:14:53 UTC) #35
rsc
great. the rest of the build might be faster too.
11 years, 2 months ago (2014-04-09 20:38:39 UTC) #36
rsc
send me a CL :-)
11 years, 2 months ago (2014-04-09 20:38:47 UTC) #37
0intro
11 years, 2 months ago (2014-04-09 21:06:42 UTC) #38
> send me a CL :-)

I've created CL 86210043 using your description of
the issue, which I find very good.

-- 
David du Colombier
Sign in to reply to this message.

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