From da0d23e5cdb305681a55c5475ff2db3e9a254cd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Fri, 10 Mar 2017 17:07:42 +0000 Subject: [PATCH] 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 Run-TryBot: Peter Weinberger TryBot-Result: Gobot Gobot --- src/runtime/mprof.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/runtime/mprof.go b/src/runtime/mprof.go index fc06d8dbe7..555a3ac2a6 100644 --- a/src/runtime/mprof.go +++ b/src/runtime/mprof.go @@ -298,7 +298,7 @@ func blockevent(cycles int64, skip int) { cycles = 1 } 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 } -func saveblockevent(cycles int64, skip int, which bucketType, ratep *uint64) { +func saveblockevent(cycles int64, skip int, which bucketType) { gp := getg() var nstk int 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 // like malloc.go:nextSample() if rate > 0 && int64(fastrand())%rate == 0 { - saveblockevent(cycles, skip+1, mutexProfile, &mutexprofilerate) + saveblockevent(cycles, skip+1, mutexProfile) } }