]> Cypherpunks repositories - gostls13.git/commit
runtime: fix flaky TestBlockProfile test
authorKeith Randall <khr@golang.org>
Mon, 20 Oct 2014 22:48:42 +0000 (15:48 -0700)
committerKeith Randall <khr@golang.org>
Mon, 20 Oct 2014 22:48:42 +0000 (15:48 -0700)
commit3ec8fe45cf4190a55f692f7c6e42936f9d912d36
treed2e3c30bcc8840304f0fdc4d48e0203392817b4e
parent9d06cfc810692911372b80b7ef0dc080ee1d34d4
runtime: fix flaky TestBlockProfile test

It has been failing periodically on Solaris/x64.
Change blockevent so it always records an event if we called
SetBlockProfileRate(1), even if the time delta is negative or zero.

Hopefully this will fix the test on Solaris.
Caveat: I don't actually know what the Solaris problem is, this
is just an educated guess.

LGTM=dave
R=dvyukov, dave
CC=golang-codereviews
https://golang.org/cl/159150043
src/runtime/mprof.go