]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: specify behavior of SetMutexProfileFraction for negative values
authorAditya Mukerjee <dev@chimeracoder.net>
Thu, 19 Apr 2018 16:24:53 +0000 (12:24 -0400)
committerIan Lance Taylor <iant@golang.org>
Thu, 19 Apr 2018 17:03:45 +0000 (17:03 +0000)
Change-Id: Ie4da1a515d5405140d742bdcd55f54a73a7f71fe
Reviewed-on: https://go-review.googlesource.com/108175
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/runtime/mprof.go

index 259473c9ceb32d5fc4a013e425ee085995983a00..0455fe86acb83aaf24ee006d0af2b3da4200fd90 100644 (file)
@@ -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 {