diff options
author | Russ Cox <rsc@golang.org> | 2014-11-06 09:37:04 -0500 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2014-11-06 09:37:04 -0500 |
commit | 3527f77c64c55d66c6eb9131c0bbd6ce16d5b85b (patch) | |
tree | ea5d6d8ae6d21c4d96b9f5aba31d62b01e6681dd /src | |
parent | c5c528a7ea701534b4e5d5590e46f69f2f893f43 (diff) | |
download | go-3527f77c64c55d66c6eb9131c0bbd6ce16d5b85b.tar.gz |
runtime: fix initial gp->sched.pc in newextram
CL 170720043 missed this one when adding +PCQuantum.
LGTM=iant
R=r, iant
CC=golang-codereviews
https://codereview.appspot.com/168090043
Diffstat (limited to 'src')
-rw-r--r-- | src/runtime/proc.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/runtime/proc.c b/src/runtime/proc.c index 4be51e1e1..91e3fe16d 100644 --- a/src/runtime/proc.c +++ b/src/runtime/proc.c @@ -990,7 +990,7 @@ runtime·newextram(void) // the goroutine stack ends. mp = runtime·allocm(nil); gp = runtime·malg(4096); - gp->sched.pc = (uintptr)runtime·goexit; + gp->sched.pc = (uintptr)runtime·goexit + PCQuantum; gp->sched.sp = gp->stack.hi; gp->sched.sp -= 4*sizeof(uintreg); // extra space in case of reads slightly beyond frame gp->sched.lr = 0; @@ -2424,9 +2424,10 @@ static struct ProfState { int32 hz; } prof; -static void System(void) {} -static void ExternalCode(void) {} -static void GC(void) {} +static void System(void) { System(); } +static void ExternalCode(void) { ExternalCode(); } +static void GC(void) { GC(); } + extern void runtime·cpuproftick(uintptr*, int32); extern byte runtime·etext[]; |