]> Cypherpunks repositories - gostls13.git/commit
runtime: ensure elapsed cycles are not negative
authorPeter Weinberger <pjw@google.com>
Fri, 28 Oct 2016 19:12:18 +0000 (15:12 -0400)
committerPeter Weinberger <pjw@google.com>
Fri, 28 Oct 2016 22:14:10 +0000 (22:14 +0000)
commita1b6e1692b063488cfcc51c258b159ccce4f7d23
tree8210191abf5c27e1029b37227650645c610b5995
parentec5b6406b76462a1a97ce19f86c5c23ac1d2c830
runtime: ensure elapsed cycles are not negative

On solaris/amd64 sometimes the reported cycle count is negative. Replace
with 0.

Change-Id: I364eea5ca072281245c7ab3afb0bf69adc3a8eae
Reviewed-on: https://go-review.googlesource.com/32258
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/runtime/mprof.go