]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: update docs for go test -benchmem
authorKévin Dunglas <kevin@dunglas.fr>
Tue, 12 Mar 2024 21:33:55 +0000 (21:33 +0000)
committerGopher Robot <gobot@golang.org>
Thu, 14 Mar 2024 17:03:49 +0000 (17:03 +0000)
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>
src/cmd/go/alldocs.go
src/cmd/go/internal/test/test.go

index dde47ac1b86bb3c66bbd1accd250577e44f4195f..7800c72af3b0fd0f1527d7f13fa180385509c396 100644 (file)
 //
 //     -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
index f1555fd5d42b7c2b3f270e911d67c614422c5f4e..ac9d2721f5e78155ab8a941b013d79796d38d5e8 100644 (file)
@@ -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