From: Aditya Mukerjee Date: Thu, 19 Apr 2018 16:24:53 +0000 (-0400) Subject: runtime: specify behavior of SetMutexProfileFraction for negative values X-Git-Tag: go1.11beta1~757 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=3d8940a9ee791089ad6417b35d9e70ed2bfc7258;p=gostls13.git runtime: specify behavior of SetMutexProfileFraction for negative values Change-Id: Ie4da1a515d5405140d742bdcd55f54a73a7f71fe Reviewed-on: https://go-review.googlesource.com/108175 Reviewed-by: Ian Lance Taylor --- diff --git a/src/runtime/mprof.go b/src/runtime/mprof.go index 259473c9ce..0455fe86ac 100644 --- a/src/runtime/mprof.go +++ b/src/runtime/mprof.go @@ -434,7 +434,7 @@ var mutexprofilerate uint64 // fraction sampled // reported. The previous rate is returned. // // To turn off profiling entirely, pass rate 0. -// To just read the current rate, pass rate -1. +// To just read the current rate, pass rate < 0. // (For n>1 the details of sampling may change.) func SetMutexProfileFraction(rate int) int { if rate < 0 {