]> Cypherpunks repositories - gostls13.git/commit
pprof: add goroutine blocking profiling
authorDmitriy Vyukov <dvyukov@google.com>
Sat, 6 Oct 2012 08:56:04 +0000 (12:56 +0400)
committerDmitriy Vyukov <dvyukov@google.com>
Sat, 6 Oct 2012 08:56:04 +0000 (12:56 +0400)
commit4cc7bf326a26d3cc18f049424729784812fe16b6
treeb99cc48fdbedb23bd355dc8ce1a1d0a11debe873
parentebb0e5db758791966a1afb193ddb021d4250d5d6
pprof: add goroutine blocking profiling
The profiler collects goroutine blocking information similar to Google Perf Tools.
You may see an example of the profile (converted to svg) attached to
http://code.google.com/p/go/issues/detail?id=3946
The public API changes are:
+pkg runtime, func BlockProfile([]BlockProfileRecord) (int, bool)
+pkg runtime, func SetBlockProfileRate(int)
+pkg runtime, method (*BlockProfileRecord) Stack() []uintptr
+pkg runtime, type BlockProfileRecord struct
+pkg runtime, type BlockProfileRecord struct, Count int64
+pkg runtime, type BlockProfileRecord struct, Cycles int64
+pkg runtime, type BlockProfileRecord struct, embedded StackRecord

R=rsc, dave, minux.ma, r
CC=gobot, golang-dev, r, remyoudompheng
https://golang.org/cl/6443115
12 files changed:
src/cmd/go/test.go
src/cmd/go/testflag.go
src/pkg/net/http/pprof/pprof.go
src/pkg/runtime/chan.c
src/pkg/runtime/debug.go
src/pkg/runtime/mprof.goc
src/pkg/runtime/pprof/pprof.go
src/pkg/runtime/runtime.c
src/pkg/runtime/runtime.h
src/pkg/runtime/sema.goc
src/pkg/runtime/signal_linux_arm.c
src/pkg/testing/testing.go