(writer io.WriteCloser)
| 92 | } |
| 93 | |
| 94 | func writeBlockProfile(writer io.WriteCloser) error { |
| 95 | p := pprof.Lookup("block") |
| 96 | if p != nil { |
| 97 | return p.WriteTo(writer, 0) |
| 98 | } else { |
| 99 | return BlockProfileNotExistError |
| 100 | } |
| 101 | } |
| 102 | |
| 103 | // tracing |
| 104 | // StartGoTrace turns on tracing, writing to the given file. |