From: Brad Fitzpatrick Date: Thu, 17 Dec 2015 16:34:08 +0000 (+0000) Subject: cmd/pprof: fix scaling of "gigabyte" unit X-Git-Tag: go1.6beta1~30 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=7688f0d9fb13a77113f75f3b85ae7973cabc7044;p=gostls13.git cmd/pprof: fix scaling of "gigabyte" unit Fixes #13654 Change-Id: Id2ce32c52efcfdbd66630725d62d2ca6bf0916d5 Reviewed-on: https://go-review.googlesource.com/17934 Reviewed-by: Russ Cox --- diff --git a/src/cmd/pprof/internal/report/report.go b/src/cmd/pprof/internal/report/report.go index 586f41d4d6..0265e2384c 100644 --- a/src/cmd/pprof/internal/report/report.go +++ b/src/cmd/pprof/internal/report/report.go @@ -1505,7 +1505,7 @@ func memoryLabel(value int64, fromUnit, toUnit string) (v float64, u string, ok case "megabyte", "mb": value *= 1024 * 1024 case "gigabyte", "gb": - value *= 1024 * 1024 + value *= 1024 * 1024 * 1024 default: return 0, "", false }