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

Issue 11676043: code review 11676043: runtime: reduce frame size for runtime.cgocallback_gofunc (Closed)

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

Description

runtime: reduce frame size for runtime.cgocallback_gofunc Tying preemption to stack splits means that we have to able to complete the call to exitsyscall (inside cgocallbackg at least for now) without any stack split checks, meaning that the whole sequence has to work within 128 bytes of stack, unless we increase the size of the red zone. This CL frees up 24 bytes along that critical path on amd64. (The 32-bit systems have plenty of space because all their words are smaller.)

Patch Set 1 #

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

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

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

Total comments: 1

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

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

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

Patch Set 8 : diff -r 8a26fe6a36cf https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+88 lines, -111 lines) Patch
M src/pkg/runtime/asm_386.s View 1 2 4 chunks +24 lines, -37 lines 0 comments Download
M src/pkg/runtime/asm_amd64.s View 1 2 4 chunks +23 lines, -36 lines 0 comments Download
M src/pkg/runtime/asm_arm.s View 1 2 4 chunks +18 lines, -30 lines 0 comments Download
M src/pkg/runtime/cgocall.c View 1 2 3 4 5 6 3 chunks +19 lines, -4 lines 0 comments Download
M src/pkg/runtime/proc.c View 1 2 1 chunk +4 lines, -4 lines 0 comments Download

Messages

Total messages: 5
rsc
Hello dvyukov (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go/
11 years, 8 months ago (2013-07-22 18:54:09 UTC) #1
dvyukov
https://codereview.appspot.com/11676043/diff/3002/src/pkg/runtime/cgocall.c File src/pkg/runtime/cgocall.c (right): https://codereview.appspot.com/11676043/diff/3002/src/pkg/runtime/cgocall.c#newcode246 src/pkg/runtime/cgocall.c:246: cb = (CallbackArgs*)((byte*)m->g0->sched.sp+4*sizeof(void*)); why it is "+4*sizeof(void*)" here, but ...
11 years, 8 months ago (2013-07-22 19:08:19 UTC) #2
rsc
PTAL On Mon, Jul 22, 2013 at 3:08 PM, <dvyukov@google.com> wrote: > https://codereview.appspot.**com/11676043/diff/3002/src/** > pkg/runtime/cgocall.c<https://codereview.appspot.com/11676043/diff/3002/src/pkg/runtime/cgocall.c> ...
11 years, 8 months ago (2013-07-22 19:20:14 UTC) #3
dvyukov
LGTM
11 years, 8 months ago (2013-07-22 19:32:14 UTC) #4
rsc
11 years, 8 months ago (2013-07-23 22:40:08 UTC) #5
*** Submitted as https://code.google.com/p/go/source/detail?r=1d8320d97ad0 ***

runtime: reduce frame size for runtime.cgocallback_gofunc

Tying preemption to stack splits means that we have to able to
complete the call to exitsyscall (inside cgocallbackg at least for now)
without any stack split checks, meaning that the whole sequence
has to work within 128 bytes of stack, unless we increase the size
of the red zone. This CL frees up 24 bytes along that critical path
on amd64. (The 32-bit systems have plenty of space because all
their words are smaller.)

R=dvyukov
CC=golang-dev
https://codereview.appspot.com/11676043
Sign in to reply to this message.

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