]> Cypherpunks repositories - gostls13.git/commit
runtime: fix GODEBUG=schedtrace=X delay handling.
authorRahul Chaudhry <rahulchaudhry@chromium.org>
Thu, 10 Dec 2015 23:06:42 +0000 (15:06 -0800)
committerIan Lance Taylor <iant@golang.org>
Fri, 11 Dec 2015 03:59:20 +0000 (03:59 +0000)
commitf939ee13ae5d54683f31699420b354be50de7e58
tree07703a9d3f040394b3134590cd66d22a907e65ad
parent0816432918ee0e4f1cf06b2a3100935e6293788b
runtime: fix GODEBUG=schedtrace=X delay handling.

debug.schedtrace is an int32. Convert it to int64 before
multiplying with constant 1000000. Otherwise, schedtrace
values more than 2147 result in int32 overflow causing
incorrect delays between traces.

Change-Id: I064e8d7b432c1e892a705ee1f31a2e8cdd2c3ea3
Reviewed-on: https://go-review.googlesource.com/17712
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
src/runtime/proc.go