Add debugging for mutex, tracing (#6522)

This commit is contained in:
Harshavardhana
2018-09-26 21:02:05 -07:00
committed by Nitish Tiwari
parent 20378821cf
commit 1111419d4a
5 changed files with 22 additions and 15 deletions

View File

@@ -226,6 +226,10 @@ func startProfiler(profilerType, dirPath string) (interface {
profiler = profile.Start(profile.MemProfile, profile.NoShutdownHook, profile.ProfilePath(dirPath))
case "block":
profiler = profile.Start(profile.BlockProfile, profile.NoShutdownHook, profile.ProfilePath(dirPath))
case "mutex":
profiler = profile.Start(profile.MutexProfile, profile.NoShutdownHook, profile.ProfilePath(dirPath))
case "trace":
profiler = profile.Start(profile.TraceProfile, profile.NoShutdownHook, profile.ProfilePath(dirPath))
default:
return nil, errors.New("profiler type unknown")
}