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>
This commit is contained in:
Kévin Dunglas 2024-03-12 21:33:55 +00:00 committed by Gopher Robot
parent c841ba3a3e
commit 0159150a4a
2 changed files with 2 additions and 0 deletions

View File

@ -3116,6 +3116,7 @@
// //
// -benchmem // -benchmem
// Print memory allocation statistics for benchmarks. // Print memory allocation statistics for benchmarks.
// Allocations made in C or using C.malloc are not counted.
// //
// -blockprofile block.out // -blockprofile block.out
// Write a goroutine blocking profile to the specified file // Write a goroutine blocking profile to the specified file

View File

@ -353,6 +353,7 @@ profile the tests during execution:
-benchmem -benchmem
Print memory allocation statistics for benchmarks. Print memory allocation statistics for benchmarks.
Allocations made in C or using C.malloc are not counted.
-blockprofile block.out -blockprofile block.out
Write a goroutine blocking profile to the specified file Write a goroutine blocking profile to the specified file