]> Cypherpunks repositories - gostls13.git/commitdiff
undo CL 14231047 / 2f4c2dde2756
authorAlex Brainman <alex.brainman@gmail.com>
Tue, 15 Oct 2013 18:37:43 +0000 (14:37 -0400)
committerRuss Cox <rsc@golang.org>
Tue, 15 Oct 2013 18:37:43 +0000 (14:37 -0400)
undone because the change slows down profile collection
significantly and unpredictable at times (see comments
at https://golang.org/cl/14231047 for details)

««« original CL description
runtime: collect profiles even while on g0 stack

Fixes #6417

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/14231047
»»»

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/14535046

src/pkg/runtime/os_windows.c

index 44c9b342de45dc22facbe5e29718001742055285..c3e296aa670a116fc171f22dce6f091c53f5ebbf 100644 (file)
@@ -402,7 +402,7 @@ profilem(M *mp)
                tls = runtime·tls0;
        gp = *(G**)tls;
 
-       if(gp != nil) {
+       if(gp != nil && gp != mp->g0 && gp->status != Gsyscall) {
                // align Context to 16 bytes
                r = (Context*)((uintptr)(&rbuf[15]) & ~15);
                r->ContextFlags = CONTEXT_CONTROL;