mirror of https://github.com/golang/go.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 <iant@golang.org>
This commit is contained in:
parent
34f5f8a580
commit
3d8940a9ee
|
|
@ -434,7 +434,7 @@ var mutexprofilerate uint64 // fraction sampled
|
||||||
// reported. The previous rate is returned.
|
// reported. The previous rate is returned.
|
||||||
//
|
//
|
||||||
// To turn off profiling entirely, pass rate 0.
|
// 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.)
|
// (For n>1 the details of sampling may change.)
|
||||||
func SetMutexProfileFraction(rate int) int {
|
func SetMutexProfileFraction(rate int) int {
|
||||||
if rate < 0 {
|
if rate < 0 {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue