要打印所有goroutine请使用堆栈跟踪Lookup和WriteTofrom runtime/pprof。 ; I' V% p \% S4 K8 P
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. 1 y4 n. A; C+ |* Y