]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: fix windows cpu profiling
authorDmitriy Vyukov <dvyukov@google.com>
Sat, 23 Feb 2013 06:07:41 +0000 (10:07 +0400)
committerDmitriy Vyukov <dvyukov@google.com>
Sat, 23 Feb 2013 06:07:41 +0000 (10:07 +0400)
R=golang-dev, alex.brainman
CC=golang-dev
https://golang.org/cl/7407044

src/pkg/runtime/proc.c

index 4f02d00faaf37d0b3cee205d8f9f959002860cd8..3a5652c91559c3dbc3d7809634ff8371577e6356 100644 (file)
@@ -1715,7 +1715,8 @@ runtime·sigprof(uint8 *pc, uint8 *sp, uint8 *lr, G *gp)
 {
        int32 n;
 
-       if(m == nil || m->mcache == nil)
+       // Windows does profiling in a dedicated thread w/o m.
+       if(!Windows && (m == nil || m->mcache == nil))
                return;
        if(prof.fn == nil || prof.hz == 0)
                return;