aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKévin Dunglas <kevin@dunglas.fr>2024-03-12 21:33:55 +0000
committerGopher Robot <gobot@golang.org>2024-03-14 17:03:49 +0000
commit0159150a4aa0b10f9845af94726cd67ffee93b75 (patch)
treec3ad9ab7805276c7dcdefa7f600c73f54385662e
parentc841ba3a3e4f320c7939a8097f8e54b752644d81 (diff)
downloadgo-0159150a4aa0b10f9845af94726cd67ffee93b75.tar.gz
go-0159150a4aa0b10f9845af94726cd67ffee93b75.zip
cmd/go: update docs for go test -benchmem
Mention that the allocation counter doesn't count allocations made using C.malloc (cgo) or in C. Change-Id: I03c23b6d8cfde68c04a75732a0d3c05eedae2276 GitHub-Last-Rev: 2d805b3322327b73076a197628987ac874311664 GitHub-Pull-Request: golang/go#65430 Reviewed-on: https://go-review.googlesource.com/c/go/+/560397 Auto-Submit: Bryan Mills <bcmills@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: qiulaidongfeng <2645477756@qq.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Bryan Mills <bcmills@google.com>
-rw-r--r--src/cmd/go/alldocs.go1
-rw-r--r--src/cmd/go/internal/test/test.go1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go
index dde47ac1b8..7800c72af3 100644
--- a/src/cmd/go/alldocs.go
+++ b/src/cmd/go/alldocs.go
@@ -3116,6 +3116,7 @@
//
// -benchmem
// Print memory allocation statistics for benchmarks.
+// Allocations made in C or using C.malloc are not counted.
//
// -blockprofile block.out
// Write a goroutine blocking profile to the specified file
diff --git a/src/cmd/go/internal/test/test.go b/src/cmd/go/internal/test/test.go
index f1555fd5d4..ac9d2721f5 100644
--- a/src/cmd/go/internal/test/test.go
+++ b/src/cmd/go/internal/test/test.go
@@ -353,6 +353,7 @@ profile the tests during execution:
-benchmem
Print memory allocation statistics for benchmarks.
+ Allocations made in C or using C.malloc are not counted.
-blockprofile block.out
Write a goroutine blocking profile to the specified file