Update comments and debug level for profiling options.

PiperOrigin-RevId: 299448307
This commit is contained in:
Dean Deng
2020-03-06 15:23:46 -08:00
committed by gVisor bot
parent 960f6a975b
commit 228813fd26
+3 -3
View File
@@ -117,15 +117,15 @@ func (p *Profile) HeapProfile(o *ProfileOpts, _ *struct{}) error {
return nil
}
// GoroutineProfile is an RPC stub which dumps out the stack trace for all running
// goroutines.
// GoroutineProfile is an RPC stub which dumps out the stack trace for all
// running goroutines.
func (p *Profile) GoroutineProfile(o *ProfileOpts, _ *struct{}) error {
if len(o.FilePayload.Files) < 1 {
return errNoOutput
}
output := o.FilePayload.Files[0]
defer output.Close()
if err := pprof.Lookup("goroutine").WriteTo(output, 0); err != nil {
if err := pprof.Lookup("goroutine").WriteTo(output, 2); err != nil {
return err
}
return nil