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

Issue 12478043: code review 12478043: runtime: use gcpc/gcsp during traceback of goroutines i... (Closed)

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

Description

runtime: use gcpc/gcsp during traceback of goroutines in syscalls gcpc/gcsp are used by GC in similar situation. gcpc/gcsp are also more stable than gp->sched, because gp->sched is mutated by entersyscall/exitsyscall in morestack and mcall. So it has higher chances of being inconsistent. Also, rename gcpc/gcsp to syscallpc/syscallsp. This is the same as reverted change 12250043 with save marked as textflag 7. The problem was that if save calls morestack, then subsequent lessstack spoils g->sched.pc/sp. And that bad values were remembered in g->syscallpc/sp. Entersyscallblock had the same problem, but it was never triggered to date.

Patch Set 1 #

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

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

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

Patch Set 5 : diff -r 6294f3ca30e1 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -33 lines) Patch
M src/pkg/runtime/mgc0.c View 1 1 chunk +5 lines, -5 lines 0 comments Download
M src/pkg/runtime/proc.c View 1 2 3 5 chunks +20 lines, -20 lines 0 comments Download
M src/pkg/runtime/runtime.h View 1 1 chunk +4 lines, -4 lines 0 comments Download
M src/pkg/runtime/traceback_arm.c View 1 1 chunk +2 lines, -2 lines 0 comments Download
M src/pkg/runtime/traceback_x86.c View 1 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 3
dvyukov
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
11 years, 7 months ago (2013-08-05 20:19:32 UTC) #1
rsc
LGTM
11 years, 7 months ago (2013-08-05 20:34:24 UTC) #2
dvyukov
11 years, 7 months ago (2013-08-06 09:39:25 UTC) #3
*** Submitted as https://code.google.com/p/go/source/detail?r=a29203f71b1f ***

runtime: use gcpc/gcsp during traceback of goroutines in syscalls
gcpc/gcsp are used by GC in similar situation.
gcpc/gcsp are also more stable than gp->sched,
because gp->sched is mutated by entersyscall/exitsyscall
in morestack and mcall. So it has higher chances of being inconsistent.
Also, rename gcpc/gcsp to syscallpc/syscallsp.

This is the same as reverted change 12250043
with save marked as textflag 7.
The problem was that if save calls morestack,
then subsequent lessstack spoils g->sched.pc/sp.
And that bad values were remembered in g->syscallpc/sp.
Entersyscallblock had the same problem,
but it was never triggered to date.

R=golang-dev, rsc
CC=golang-dev
https://codereview.appspot.com/12478043
Sign in to reply to this message.

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