要打印所有goroutine请使用堆栈跟踪Lookup和WriteTofrom runtime/pprof。. N5 i1 }. L' ?, X7 _
func Lookup(name string) *Profile// Lookup returns the profile with the given name,// or nil if no such profile exists.func (p *Profile) WriteTo(w io.Writer,debug int) error// WriteTo writes a pprof-formatted snapshot of the profile to w.// If a write to w returns an error,WriteTo returns that error.// Otherwise,WriteTo returns nil.2 z" G8 t J! l. ~1 Q9 m0 p