diff options
| author | Dmitriy Vyukov <dvyukov@google.com> | 2014-06-26 17:16:43 -0700 |
|---|---|---|
| committer | Dmitriy Vyukov <dvyukov@google.com> | 2014-06-26 17:16:43 -0700 |
| commit | a7186dc3035dffef8ac9033966da52e4cc935ef0 (patch) | |
| tree | 8026dd6fa1f6b647cea319d0fbde4a2bf46c0511 /src/pkg/runtime/proc.c | |
| parent | 548dece8f332fdfb55b78ebd678cb8f51207be95 (diff) | |
| download | go-a7186dc3035dffef8ac9033966da52e4cc935ef0.tar.xz | |
runtime: improve scheduler trace
Output number of spinning threads,
this is useful to understanding whether the scheduler
is in a steady state or not.
R=golang-codereviews, khr
CC=golang-codereviews, rsc
https://golang.org/cl/103540045
Diffstat (limited to 'src/pkg/runtime/proc.c')
| -rw-r--r-- | src/pkg/runtime/proc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pkg/runtime/proc.c b/src/pkg/runtime/proc.c index dd98e8ce26..04808f2c50 100644 --- a/src/pkg/runtime/proc.c +++ b/src/pkg/runtime/proc.c @@ -2730,12 +2730,12 @@ runtime·schedtrace(bool detailed) starttime = now; runtime·lock(&runtime·sched); - runtime·printf("SCHED %Dms: gomaxprocs=%d idleprocs=%d threads=%d idlethreads=%d runqueue=%d", + runtime·printf("SCHED %Dms: gomaxprocs=%d idleprocs=%d threads=%d spinningthreads=%d idlethreads=%d runqueue=%d", (now-starttime)/1000000, runtime·gomaxprocs, runtime·sched.npidle, runtime·sched.mcount, - runtime·sched.nmidle, runtime·sched.runqsize); + runtime·sched.nmspinning, runtime·sched.nmidle, runtime·sched.runqsize); if(detailed) { - runtime·printf(" gcwaiting=%d nmidlelocked=%d nmspinning=%d stopwait=%d sysmonwait=%d\n", - runtime·sched.gcwaiting, runtime·sched.nmidlelocked, runtime·sched.nmspinning, + runtime·printf(" gcwaiting=%d nmidlelocked=%d stopwait=%d sysmonwait=%d\n", + runtime·sched.gcwaiting, runtime·sched.nmidlelocked, runtime·sched.stopwait, runtime·sched.sysmonwait); } // We must be careful while reading data from P's, M's and G's. |
