• Dmitriy Vyukov's avatar
    pprof: add goroutine blocking profiling · 4cc7bf32
    Dmitriy Vyukov authored
    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
    4cc7bf32
debug.go 6.87 KB