1
0
mirror of https://github.com/golang/go synced 2024-09-30 15:38:33 -06:00

runtime: remove unused ratep parameter

Found by github.com/mvdan/unparam.

Change-Id: Iabcdfec2ae42c735aa23210b7183080d750682ca
Reviewed-on: https://go-review.googlesource.com/38030
Reviewed-by: Peter Weinberger <pjw@google.com>
Run-TryBot: Peter Weinberger <pjw@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Daniel Martí 2017-03-10 17:07:42 +00:00 committed by Ian Lance Taylor
parent 7e036521d5
commit da0d23e5cd

View File

@ -298,7 +298,7 @@ func blockevent(cycles int64, skip int) {
cycles = 1 cycles = 1
} }
if blocksampled(cycles) { if blocksampled(cycles) {
saveblockevent(cycles, skip+1, blockProfile, &blockprofilerate) saveblockevent(cycles, skip+1, blockProfile)
} }
} }
@ -310,7 +310,7 @@ func blocksampled(cycles int64) bool {
return true return true
} }
func saveblockevent(cycles int64, skip int, which bucketType, ratep *uint64) { func saveblockevent(cycles int64, skip int, which bucketType) {
gp := getg() gp := getg()
var nstk int var nstk int
var stk [maxStack]uintptr var stk [maxStack]uintptr
@ -353,7 +353,7 @@ func mutexevent(cycles int64, skip int) {
// TODO(pjw): measure impact of always calling fastrand vs using something // TODO(pjw): measure impact of always calling fastrand vs using something
// like malloc.go:nextSample() // like malloc.go:nextSample()
if rate > 0 && int64(fastrand())%rate == 0 { if rate > 0 && int64(fastrand())%rate == 0 {
saveblockevent(cycles, skip+1, mutexProfile, &mutexprofilerate) saveblockevent(cycles, skip+1, mutexProfile)
} }
} }