Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

wiki: allocfreetrace=1 doesn't work & traceallocfree is not documented #75183

Open
Assignees
Labels
DocumentationIssues describing a change to documentation. NeedsFixThe path to resolution is known, but the work has not been done. compiler/runtimeIssues related to the Go compiler and/or runtime.
Milestone
@glenjamin

Description

Go version

go version go1.25.0 darwin/arm64

Output of go env in your module/workspace:

AR='ar'
CC='clang'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_ENABLED='1'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
CXX='clang++'
GCCGO='gccgo'
GO111MODULE=''
GOARCH='arm64'
GOARM64='v8.0'
GOAUTH='netrc'
GOBIN='/Users/glen/.local/share/mise/installs/go/1.25.0/bin'
GOCACHE='/Users/glen/Library/Caches/go-build'
GOCACHEPROG=''
GODEBUG=''
GOENV='/Users/glen/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFIPS140='off'
GOFLAGS=''
GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/0y/vtlpbcf55j1_jvbs92x2fsrh0000gn/T/go-build849456377=/tmp/go-build -gno-record-gcc-switches -fno-common'
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMOD='/Users/glen/Development/Geckoboard/turnstile/go.mod'
GOMODCACHE='/Users/glen/go/pkg/mod'
GONOPROXY='github.com/geckoboard'
GONOSUMDB='github.com/geckoboard'
GOOS='darwin'
GOPATH='/Users/glen/go'
GOPRIVATE='github.com/geckoboard'
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/Users/glen/.local/share/mise/installs/go/1.25.0'
GOSUMDB='sum.golang.org'
GOTELEMETRY='local'
GOTELEMETRYDIR='/Users/glen/Library/Application Support/go/telemetry'
GOTMPDIR=''
GOTOOLCHAIN='local'
GOTOOLDIR='/Users/glen/.local/share/mise/installs/go/1.25.0/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.25.0'
GOWORK=''
PKG_CONFIG='pkg-config'

What did you do?

I am attempting to get a trace of allocations being performed on a small amount of code for optimization purposes

As documented here: https://go.dev/wiki/Performance#memory-allocator-trace

So I ran

GODEBUG=traceallocfree=1 go test .

What did you see happen?

Just the output of my tests running

What did you expect to see?

When running under Go 1.19 the flag produces large amounts of allocation trace information

I was able to find #68885, which has been closed and locked, and links to https://go-review.googlesource.com/c/go/+/583376 - however that CL does not reference any related Go issue or explanation.

I can see a related CL https://go-review.googlesource.com/c/go/+/583377/4 that refers to a GODEBUG of traceallocfree, but I can find no further reference to this anywhere else, and enabling it when executing a binary does not appear to do anything

What is the current state of allocation tracing?

Metadata

Metadata

Labels

DocumentationIssues describing a change to documentation. NeedsFixThe path to resolution is known, but the work has not been done. compiler/runtimeIssues related to the Go compiler and/or runtime.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    AltStyle によって変換されたページ (->オリジナル) /